Poor debug 10 message in modules/vfs-acl-common.c

Richard Sharpe realrichardsharpe at gmail.com
Mon Jul 16 15:28:38 MDT 2012


Hi folks,

In tracking down an issue, I came across this sub-optimal code in
get_nt_acl_internal:

        if (memcmp(&hash[0], &hash_tmp[0], XATTR_SD_HASH_SIZE) == 0) {
                /* Hash matches, return blob sd. */
                DEBUG(10, ("get_nt_acl_internal: blob hash "
                        "matches for file %s\n",
                        name ));
                goto out;
        }

The code only spits out a debug message if the hashes match and does
not spit out a debug message if they do not match. However, from the
point of view of debugging, we really should spit out a message if
they do not match so that people who don't read the code or don't know
where to look can figure out what is going wrong.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list