extern int daemon_over_rsh;
extern unsigned int module_dirlen;
extern struct filter_list_struct filter_list;
-extern struct filter_list_struct server_filter_list;
+extern struct filter_list_struct daemon_filter_list;
int make_backups = 0;
set_refuse_options(ref);
if (am_daemon) {
set_refuse_options("log-file*");
+#ifdef ICONV_OPTION
if (!*lp_charset(module_id))
set_refuse_options("iconv");
+#endif
}
#ifdef ICONV_OPTION
case OPT_INCLUDE_FROM:
arg = poptGetOptArg(pc);
if (sanitize_paths)
- arg = sanitize_path(NULL, arg, NULL, 0);
- if (server_filter_list.head) {
+ arg = sanitize_path(NULL, arg, NULL, 0, SP_DEFAULT);
+ if (daemon_filter_list.head) {
int rej;
char *dir, *cp = strdup(arg);
if (!cp)
goto options_rejected;
dir = cp + (*cp == '/' ? module_dirlen : 0);
clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
- rej = check_filter(&server_filter_list, dir, 0) < 0;
+ rej = check_filter(&daemon_filter_list, dir, 0) < 0;
free(cp);
if (rej)
goto options_rejected;
if (sanitize_paths) {
int i;
for (i = argc; i-- > 0; )
- argv[i] = sanitize_path(NULL, argv[i], "", 0);
+ argv[i] = sanitize_path(NULL, argv[i], "", 0, SP_KEEP_DOT_DIRS);
if (tmpdir)
- tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
+ tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
- backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
+ backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
- if (server_filter_list.head && !am_sender) {
- struct filter_list_struct *elp = &server_filter_list;
+ if (daemon_filter_list.head && !am_sender) {
+ struct filter_list_struct *elp = &daemon_filter_list;
if (tmpdir) {
char *dir;
if (!*tmpdir)
}
} else {
if (sanitize_paths)
- files_from = sanitize_path(NULL, files_from, NULL, 0);
- if (server_filter_list.head) {
+ files_from = sanitize_path(NULL, files_from, NULL, 0, SP_DEFAULT);
+ if (daemon_filter_list.head) {
char *dir;
if (!*files_from)
goto options_rejected;
dir = files_from + (*files_from == '/' ? module_dirlen : 0);
clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(&server_filter_list, dir, 0) < 0)
+ if (check_filter(&daemon_filter_list, dir, 0) < 0)
goto options_rejected;
}
filesfrom_fd = open(files_from, O_RDONLY|O_BINARY);