s3 passdb: Add back some useful debug statements
authorTim Prouty <tprouty@samba.org>
Wed, 4 Mar 2009 00:47:48 +0000 (16:47 -0800)
committerTim Prouty <tprouty@samba.org>
Wed, 4 Mar 2009 00:49:36 +0000 (16:49 -0800)
Originally removed in be1dfff02d562e42a7847bd02fed8538630d3f41

source3/passdb/lookup_sid.c

index 10ff36d51b8bef04849609011de1df59bb103fc4..9c20042a6282ae7fb06410db05c92ec25052d53b 100644 (file)
@@ -1309,15 +1309,18 @@ void uid_to_sid(DOM_SID *psid, uid_t uid)
                /* Not in cache. Ask winbindd. */
                if (!winbind_uid_to_sid(psid, uid)) {
                        /*
-                        * We shouldn't return the NULL SID
-                        * here if winbind was running and
-                        * couldn't map, as winbind will have
-                        * added a negative entry that will
-                        * cause us to go though the
-                        * legacy_uid_to_sid()
-                        * function anyway in the case above
-                        * the next time we ask.
-                        */
+                        * We shouldn't return the NULL SID
+                        * here if winbind was running and
+                        * couldn't map, as winbind will have
+                        * added a negative entry that will
+                        * cause us to go though the
+                        * legacy_uid_to_sid()
+                        * function anyway in the case above
+                        * the next time we ask.
+                        */
+                       DEBUG(5, ("uid_to_sid: winbind failed to find a sid "
+                                 "for uid %u\n", uid));
+
                        legacy_uid_to_sid(psid, uid);
                        return;
                }
@@ -1359,15 +1362,18 @@ void gid_to_sid(DOM_SID *psid, gid_t gid)
                /* Not in cache. Ask winbindd. */
                if (!winbind_gid_to_sid(psid, gid)) {
                        /*
-                        * We shouldn't return the NULL SID
-                        * here if winbind was running and
-                        * couldn't map, as winbind will have
-                        * added a negative entry that will
-                        * cause us to go though the
-                        * legacy_gid_to_sid()
-                        * function anyway in the case above
-                        * the next time we ask.
-                        */
+                        * We shouldn't return the NULL SID
+                        * here if winbind was running and
+                        * couldn't map, as winbind will have
+                        * added a negative entry that will
+                        * cause us to go though the
+                        * legacy_gid_to_sid()
+                        * function anyway in the case above
+                        * the next time we ask.
+                        */
+                       DEBUG(5, ("gid_to_sid: winbind failed to find a sid "
+                                 "for gid %u\n", gid));
+
                        legacy_gid_to_sid(psid, gid);
                        return;
                }