From: Andrew Tridgell Date: Thu, 19 Nov 1998 06:45:21 +0000 (+0000) Subject: improved the "refuse options" code a bit X-Git-Tag: v2.2.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=055af776668c0878dd830f82d4bc6ca6aaca8e7a;p=thirdparty%2Frsync.git improved the "refuse options" code a bit --- diff --git a/options.c b/options.c index 6fa59636..482f85e6 100644 --- a/options.c +++ b/options.c @@ -236,7 +236,8 @@ static int check_refuse_options(char *ref, int opt) len = strlen(name); while ((p = strstr(ref,name))) { - if (p[len] == ' ' || p[len] == 0) { + if ((p==ref || p[-1]==' ') && + (p[len] == ' ' || p[len] == 0)) { slprintf(err_buf,sizeof(err_buf), "The '%s' option is not supported by this server\n", name); return 1;