]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: Debug only when we failed to decode
authorNoel Power <noel.power@suse.com>
Wed, 15 Nov 2023 11:29:46 +0000 (11:29 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 16 Nov 2023 01:51:39 +0000 (01:51 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/sddl.c

index 2cad84a937ab727306b803ce11e899063d8a0497..a4659c107b5532ffafb0c5c08fcc8cfc3a95015b 100644 (file)
@@ -995,11 +995,14 @@ struct security_descriptor *sddl_decode(TALLOC_CTX *mem_ctx, const char *sddl,
                                                             ACE_CONDITION_FLAG_ALLOW_DEVICE,
                                                             &msg,
                                                             &msg_offset);
-       DBG_NOTICE("could not decode '%s'\n", sddl);
-       if (msg != NULL) {
-               DBG_NOTICE("                  %*c\n", (int)msg_offset, '^');
-               DBG_NOTICE("error '%s'\n", msg);
-               talloc_free(discard_const(msg));
+       if (sd == NULL) {
+               DBG_NOTICE("could not decode '%s'\n", sddl);
+               if (msg != NULL) {
+                       DBG_NOTICE("                  %*c\n",
+                                  (int)msg_offset, '^');
+                       DBG_NOTICE("error '%s'\n", msg);
+                       talloc_free(discard_const(msg));
+               }
        }
        return sd;
 }