s3:auth Give more clues in message about conflicting SIDs
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 11:00:54 +0000 (21:00 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 12:34:20 +0000 (22:34 +1000)
This should never happen, but particularly with the guest account, it
seems to happen in s3compat.  This should help the next person trying
to work it out.

Andrew Bartlett

source3/auth/server_info.c

index f72cdbaae9a1cd36db2e0da6d1ab118e966d1ee9..9dce81e187d00259389643f511f5c4f0ec8817c9 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "../lib/crypto/arcfour.h"
+#include "../libcli/security/security.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
@@ -328,8 +329,10 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
        ok = sid_peek_check_rid(&domain_sid, group_sid,
                                &info3->base.primary_gid);
        if (!ok) {
-               DEBUG(1, ("The primary group sid domain does not"
-                         "match user sid domain for user: %s\n",
+               DEBUG(1, ("The primary group sid %s does not have the same domain portion as "
+                         "user sid %s of user: %s\n",
+                         dom_sid_string(info3, group_sid), 
+                         dom_sid_string(info3, user_sid),
                          pdb_get_username(samu)));
                TALLOC_FREE(info3);
                return NT_STATUS_UNSUCCESSFUL;