We can't use ndr_pull_struct_blob_all ntSecurityDescriptor
authorAndrew Bartlett <abartlet@samba.org>
Thu, 13 Nov 2008 22:40:57 +0000 (09:40 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 13 Nov 2008 22:40:57 +0000 (09:40 +1100)
The problem is the same as found elsewhere in Samba - this function is
not compatible with relative pointers.

Andrew Bartlett

source4/lib/ldb-samba/ldif_handlers.c

index 58da780d7d47e9d23ca73e8d27102bc11fe47439..e858e95a82a1952f96148ea6f72ae80840fb642d 100644 (file)
@@ -334,7 +334,8 @@ static int ldif_write_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ct
        if (sd == NULL) {
                return -1;
        }
-       ndr_err = ndr_pull_struct_blob_all(in, sd, NULL, sd,
+       /* We can't use ndr_pull_struct_blob_all because this contains relative pointers */
+       ndr_err = ndr_pull_struct_blob(in, sd, NULL, sd,
                                           (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                talloc_free(sd);