s3/torture/pdbtest: creating a trusted domain requires a valid SID
authorRalph Boehme <slow@samba.org>
Mon, 11 Dec 2017 06:56:02 +0000 (07:56 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sat, 13 Jan 2018 11:55:07 +0000 (12:55 +0100)
Signed-off-by: Ralph Boehme <slow@samba.org>
source3/torture/pdbtest.c

index adbd982ab4421e974df863dc99c9916096085946..71b5c61fc58eeb179b1d48f88fc53e6bb5a1f8e0 100644 (file)
@@ -450,6 +450,7 @@ static bool test_trusted_domains(TALLOC_CTX *ctx,
        struct trustAuthInOutBlob taiob;
        struct AuthenticationInformation aia;
        enum ndr_err_code ndr_err;
+       bool ok;
 
        td = talloc_zero(ctx ,struct pdb_trusted_domain);
        if (!td) {
@@ -463,6 +464,11 @@ static bool test_trusted_domains(TALLOC_CTX *ctx,
                fprintf(stderr, "talloc failed\n");
                return false;
        }
+       ok = dom_sid_parse("S-1-5-21-123-456-789", &td->security_identifier);
+       if (!ok) {
+               fprintf(stderr, "dom_sid_parse S-1-5-21-123-456-789 failed\n");
+               return false;
+       }
 
        td->trust_auth_incoming = data_blob_null;