torture: add more string_to_sid torture testcases
authorJeff Layton <jlayton@samba.org>
Wed, 31 Jul 2013 14:38:22 +0000 (10:38 -0400)
committerJeremy Allison <jra@samba.org>
Wed, 31 Jul 2013 22:16:15 +0000 (15:16 -0700)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/torture.c

index 3c6db30399d5b7ded6caa043839ad3cc3b841a2a..25561e230d38c97d942116a34d51561ee48389a7 100644 (file)
@@ -8469,6 +8469,22 @@ static bool run_local_string_to_sid(int dummy) {
                printf("allowing S-1-5-32-545-abc\n");
                return false;
        }
+       if (string_to_sid(&sid, "S-300-5-32-545")) {
+               printf("allowing S-300-5-32-545\n");
+               return false;
+       }
+       if (string_to_sid(&sid, "S-1-0xfffffffffffffe-32-545")) {
+               printf("allowing S-1-0xfffffffffffffe-32-545\n");
+               return false;
+       }
+       if (string_to_sid(&sid, "S-1-0xffffffffffff-5294967297-545")) {
+               printf("allowing S-1-0xffffffffffff-5294967297-545\n");
+               return false;
+       }
+       if (!string_to_sid(&sid, "S-1-0xfffffffffffe-32-545")) {
+               printf("could not parse S-1-0xfffffffffffe-32-545\n");
+               return false;
+       }
        if (!string_to_sid(&sid, "S-1-5-32-545")) {
                printf("could not parse S-1-5-32-545\n");
                return false;