extern des_cblock session;
extern char *whoami;
-int send_auth(int conn, char *host_name)
+int mr_send_auth(int conn, char *host_name)
{
KTEXT_ST ticket_st;
int code, auth_version = 2;
return MR_SUCCESS;
}
-int execute(int conn, char *path)
+int mr_execute(int conn, char *path)
{
long response;
char *data;
return MR_SUCCESS;
}
-void send_quit(int conn)
+void mr_send_quit(int conn)
{
send_string(conn, "quit", 5);
}
* 1 on error (file not found, etc)
*/
-int send_file(int conn, char *pathname, char *target_path, int encrypt)
+int mr_send_file(int conn, char *pathname, char *target_path, int encrypt)
{
int n, fd, code, n_to_send, i;
char data[UPDATE_BUFSIZ], enc[UPDATE_BUFSIZ];
exit(1);
}
- code = send_auth(conn, host);
+ code = mr_send_auth(conn, host);
if (code)
com_err(whoami, code, "attempting authorization");
file = argv[++i];
rfile = argv[++i];
fprintf(stderr, "Sending file %s to %s as %s\n", file, host, rfile);
- send_file(conn, file, rfile, 0);
+ mr_send_file(conn, file, rfile, 0);
break;
case 'S':
if (i + 2 >= argc)
rfile = argv[++i];
fprintf(stderr, "Sending (encrypted) file %s to %s as %s\n",
file, host, rfile);
- send_file(conn, file, rfile, 1);
+ mr_send_file(conn, file, rfile, 1);
break;
case 'i':
if (i + 1 >= argc)
mktemp(ibuf);
fprintf(stderr, "Sending instructions %s to %s as %s\n",
file, host, ibuf);
- send_file(conn, file, ibuf, 0);
+ mr_send_file(conn, file, ibuf, 0);
break;
case 'I':
if (i + 2 >= argc)
strcpy(ibuf, rfile);
fprintf(stderr, "Sending instructions %s to %s as %s\n",
file, host, ibuf);
- send_file(conn, file, ibuf, 0);
+ mr_send_file(conn, file, ibuf, 0);
break;
case 'x':
if (!ibuf)
usage();
}
fprintf(stderr, "Executing instructions %s on %s\n", ibuf, host);
- code = execute(conn, ibuf);
+ code = mr_execute(conn, ibuf);
if (code)
com_err(whoami, code, "executing");
break;
usage();
file = argv[++i];
fprintf(stderr, "Executing instructions %s on %s\n", file, host);
- code = execute(conn, file);
+ code = mr_execute(conn, file);
if (code)
com_err(whoami, code, "executing");
break;
usage();
}
}
- send_quit(conn);
+ mr_send_quit(conn);
close(conn);
exit(code);
}