search for: set_refuse_opt

Displaying 6 results from an estimated 6 matches for "set_refuse_opt".

2004 Feb 20
1
[patch] fix for "refuse options" ignored due to popt
Hello, I found the reason why "refuse options" is ignored on the server side. When then 5th argument (int val) in the poptOption struct is set to zero, the parsing function poptGetNextOpt() just continues with the next arg, without returning. So check_refuse_options() is simply not called in such cases. The attached patch makes "refuse options" work with checksum and
2020 Feb 09
3
[draft PATCH] whitelist support for refuse options
...on in "refuse options". --- options.c | 114 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 82 insertions(+), 32 deletions(-) diff --git a/options.c b/options.c index e5b0cb68..02d1b174 100644 --- a/options.c +++ b/options.c @@ -1133,39 +1133,101 @@ static void set_refuse_options(char *bp) { struct poptOption *op; char *cp, shortname[2]; - int is_wild, found_match; + int is_wild, found_match, whitelist_mode, archive_whitelisted; shortname[1] = '\0'; + whitelist_mode = 0; + archive_whitelisted = 0; + /* We flag options for refusal by abusing the "...
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
..., @@ -1261,6 +1264,11 @@ return 0; #endif + case 'w': + write_devices = 1; + inplace = 1; + break; + default: /* A large opt value means that set_refuse_options() * turned this option off. */ @@ -2069,6 +2077,9 @@ else if (remove_source_files) args[ac++] = "--remove-sent-files"; + if (write_devices) + args[ac++] = "--write-devices"; + if (ac > MAX_SER...
2020 Feb 06
0
[PATCH] Add support for zstd compression
...ndif {"old-compress", 0, POPT_ARG_VAL, &do_compression, 1, 0, 0 }, {"new-compress", 0, POPT_ARG_VAL, &do_compression, 2, 0, 0 }, {"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 }, @@ -1163,6 +1173,7 @@ static void set_refuse_options(char *bp) refused_archive_part = op->val; break; case 'z': + case 'Z': refused_compress = op->val; break; case '\0': @@ -1575,6 +1586,16 @@ int parse_arguments(int *argc_p, const char ***argv_p) do_compression++; break;...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...break; +#else + snprintf(err_buf, sizeof err_buf, + "hard links are not supported on this %s\n", + am_server ? "server" : "client"); + rprintf(FERROR, "ERROR: %s", err_buf); + return 0; +#endif + default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ @@ -934,6 +950,11 @@ args[ac++] = compare_dest; } + if (link_by_hash_dir && am_sender) { + args[ac++] = "--link-by-hash"; + args[ac++] = link_by_hash_dir; + } + if (files_from && (!am_sender || remo...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...break; +#else + snprintf(err_buf, sizeof err_buf, + "hard links are not supported on this %s\n", + am_server ? "server" : "client"); + rprintf(FERROR, "ERROR: %s", err_buf); + return 0; +#endif + default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ @@ -934,6 +950,11 @@ args[ac++] = compare_dest; } + if (link_by_hash_dir && am_sender) { + args[ac++] = "--link-by-hash"; + args[ac++] = link_by_hash_dir; + } + if (files_from && (!am_sender || remo...