diff options
author | Ralph Boehme <slow@samba.org> | 2017-10-09 13:25:21 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-10-10 02:57:40 +0200 |
commit | 76a1c5a1625f3593de0feac47741a3405b4c9275 (patch) | |
tree | b10f85509319fb9ac3a5957f351f2b97209bcb3f /nsswitch/wbinfo.c | |
parent | 0666093cb0d820cc27a265c1f0a87bc76cd3c167 (diff) | |
download | samba-76a1c5a1625f3593de0feac47741a3405b4c9275.tar.gz |
wbinfo: return "NOT MAPPED" instead of "S-0-0" for unmapped id-to-sid
Currently wbinfo --unix-ids-to-sids prints "S-0-0" for failed
mappings. Let it print "NOT MAPPED" instead.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 10 02:57:40 CEST 2017 on sn-devel-144
Diffstat (limited to 'nsswitch/wbinfo.c')
-rw-r--r-- | nsswitch/wbinfo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index 67a97b5bbc0..9cd299a2174 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -1105,6 +1105,12 @@ static bool wbinfo_xids_to_sids(const char *arg) for (i=0; i<num_xids; i++) { char str[WBC_SID_STRING_BUFLEN]; + struct wbcDomainSid null_sid = { 0 }; + + if (memcmp(&null_sid, &sids[i], sizeof(struct wbcDomainSid)) == 0) { + d_printf("NOT MAPPED\n"); + continue; + } wbcSidToStringBuf(&sids[i], str, sizeof(str)); d_printf("%s\n", str); } |