smbd: avoid extra churn on a debug print
authorUri Simchoni <uri@samba.org>
Thu, 1 Dec 2016 04:29:34 +0000 (06:29 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 1 Dec 2016 13:16:23 +0000 (14:16 +0100)
Remove the user / group name in debug-printing of a
POSIX-ACL-derived ACE.

Obtaining the user name might result an extra lookup
to the domain. In a typical case, a user raises logging
level to 10 to troubleshoot an issue, so connectivity
problems are likely to exist. In that case we won't want
the extra debug printing to create more issues.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/posix_acls.c

index e8e819c7eeb8f7565a0fd8463bdfa603f9d1ad62..f7829fea5dcb87bfbfb1bf6b1ce7e480e324a955 100644 (file)
@@ -802,11 +802,9 @@ static void print_canon_ace(canon_ace *pace, int num)
        dbgtext( "canon_ace index %d. Type = %s ", num, pace->attr == ALLOW_ACE ? "allow" : "deny" );
        dbgtext( "SID = %s ", sid_string_dbg(&pace->trustee));
        if (pace->owner_type == UID_ACE) {
-               const char *u_name = uidtoname(pace->unix_ug.id);
-               dbgtext( "uid %u (%s) ", (unsigned int)pace->unix_ug.id, u_name );
+               dbgtext( "uid %u ", (unsigned int)pace->unix_ug.id);
        } else if (pace->owner_type == GID_ACE) {
-               char *g_name = gidtoname(pace->unix_ug.id);
-               dbgtext( "gid %u (%s) ", (unsigned int)pace->unix_ug.id, g_name );
+               dbgtext( "gid %u ", (unsigned int)pace->unix_ug.id);
        } else
                dbgtext( "other ");
        switch (pace->type) {