diff options
author | David Disseldorp <ddiss@samba.org> | 2014-05-27 11:04:11 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-28 20:18:21 +0200 |
commit | 8605564f41f8f87dc4f2777294fb5abd9285e6e0 (patch) | |
tree | 2b09e7eeba5ea548bf1ed25585da66e516d43f08 /source3 | |
parent | 58b8c87d0f56b7f868594357d014e4c662644b22 (diff) | |
download | samba-8605564f41f8f87dc4f2777294fb5abd9285e6e0.tar.gz samba-8605564f41f8f87dc4f2777294fb5abd9285e6e0.tar.xz samba-8605564f41f8f87dc4f2777294fb5abd9285e6e0.zip |
s3/profiles: improve copy_registry_tree() errors
The current error logic doesn't distinguish between a NULL source
security descriptor and ENOMEM.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 28 20:18:21 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/profiles.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index a193582387c..0f274ad604a 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -130,11 +130,12 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, /* swap out the SIDs in the security descriptor */ if (nk->sec_desc->sec_desc == NULL) { - new_sd = NULL; - } else { - new_sd = security_descriptor_copy(outfile->mem_ctx, - nk->sec_desc->sec_desc); + fprintf(stderr, "Invalid (NULL) security descriptor!\n"); + return false; } + + new_sd = security_descriptor_copy(outfile->mem_ctx, + nk->sec_desc->sec_desc); if (new_sd == NULL) { fprintf(stderr, "Failed to copy security descriptor!\n"); return False; |