s3:smbcacls: fix parsing of multiple flags
authorGregor Beck <gbeck@sernet.de>
Thu, 26 May 2011 08:15:56 +0000 (10:15 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 30 May 2011 15:42:27 +0000 (17:42 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/utils/smbcacls.c

index 2fd9a53..1d5789d 100644 (file)
@@ -360,7 +360,12 @@ static bool parse_ace_flags(const char *str, unsigned int *pflags)
                        return false;
                }
 
-               if (*p != '|' && *p != '\0') {
+               switch (*p) {
+               case '|':
+                       p++;
+               case '\0':
+                       continue;
+               default:
                        return false;
                }
        }