s4:dsdb/descriptor: the old nTSecurityDescriptor is always expected there on modify
authorStefan Metzmacher <metze@samba.org>
Fri, 23 Nov 2012 09:58:49 +0000 (10:58 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 30 Nov 2012 16:17:20 +0000 (17:17 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source4/dsdb/samdb/ldb_modules/descriptor.c

index 4b4704b6641fd70496b287a3862f272b9c2902b8..96bc356485490f0c2db91e2ae67cb4e28d9ad1fc 100644 (file)
@@ -714,6 +714,9 @@ static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
        }
 
        old_sd = ldb_msg_find_ldb_val(current_res->msgs[0], "nTSecurityDescriptor");
+       if (old_sd == NULL) {
+               return ldb_operr(ldb);
+       }
 
        sd = get_new_descriptor(module, dn, req,
                                objectclass, parent_sd,