extern char *shell_cmd;
extern char *batch_name;
extern char *password_file;
+extern char *backup_dir;
extern char curr_dir[MAXPATHLEN];
+extern char backup_dir_buf[MAXPATHLEN];
extern char *basis_dir[MAX_BASIS_DIRS+1];
extern struct file_list *first_flist;
-extern struct filter_list_struct daemon_filter_list;
+extern filter_rule_list daemon_filter_list;
uid_t our_uid;
+gid_t our_gid;
int am_generator = 0;
int local_server = 0;
int daemon_over_rsh = 0;
exit_cleanup(RERR_IPC);
}
+ if (backup_dir) {
+ int ret = make_path(backup_dir_buf, MKP_DROP_NAME); /* drops trailing slash */
+ if (ret < 0)
+ exit_cleanup(RERR_SYNTAX);
+ if (ret)
+ rprintf(FINFO, "Created backup_dir %s\n", backup_dir_buf);
+ else if (INFO_GTE(BACKUP, 1))
+ rprintf(FINFO, "backup_dir is %s\n", backup_dir_buf);
+ }
+
io_flush(NORMAL_FLUSH);
if ((pid = do_fork()) == -1) {
if (daemon_filter_list.head) {
char **dir_p;
- struct filter_list_struct *elp = &daemon_filter_list;
+ filter_rule_list *elp = &daemon_filter_list;
for (dir_p = basis_dir; *dir_p; dir_p++) {
char *dir = *dir_p;
if (write_batch && !am_server)
start_write_batch(f_out);
flist = send_file_list(f_out, argc, argv);
- set_msg_fd_in(-1);
if (DEBUG_GTE(FLIST, 3))
rprintf(FINFO,"file list sent\n");
starttime = time(NULL);
our_uid = MY_UID();
+ our_gid = MY_GID();
am_root = our_uid == 0;
memset(&stats, 0, sizeof(stats));