wbinfo: make --verbose --pam-logon print sids
authorVolker Lendecke <vl@samba.org>
Fri, 9 Oct 2015 10:18:53 +0000 (12:18 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 12 Oct 2015 12:01:49 +0000 (14:01 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Oct 12 14:01:50 CEST 2015 on sn-devel-104

nsswitch/wbinfo.c

index f45d7b583351cab5d7da0d2ff03dbd9390ff4035..330fa910938893e649baeee2a694f23bb4b439f8 100644 (file)
@@ -1831,6 +1831,7 @@ static bool wbinfo_pam_logon(char *username, bool verbose)
 
        if (verbose && (info != NULL)) {
                struct wbcAuthUserInfo *i = info->info;
+               uint32_t j;
 
                if (i->account_name != NULL) {
                        d_printf("account_name: %s\n", i->account_name);
@@ -1863,6 +1864,15 @@ static bool wbinfo_pam_logon(char *username, bool verbose)
                        d_printf("home_drive: %s\n", i->home_drive);
                }
 
+               d_printf("sids:");
+
+               for (j=0; j<i->num_sids; j++) {
+                       char buf[WBC_SID_STRING_BUFLEN];
+                       wbcSidToStringBuf(&i->sids[j].sid, buf, sizeof(buf));
+                       d_printf(" %s", buf);
+               }
+               d_printf("\n");
+
                wbcFreeMemory(info);
                info = NULL;
        }