improved the "refuse options" code a bit
authorAndrew Tridgell <tridge@samba.org>
Thu, 19 Nov 1998 06:45:21 +0000 (06:45 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 19 Nov 1998 06:45:21 +0000 (06:45 +0000)
options.c

index 6fa5963..482f85e 100644 (file)
--- 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;