[PATCH] winbindd: idmap_rid: error code for failing id-to-sid mappings

Ralph Böhme slow at samba.org
Mon Oct 9 19:30:15 UTC 2017


On Mon, Oct 09, 2017 at 07:12:18PM +0000, Jeremy Allison wrote:
> On Mon, Oct 09, 2017 at 02:12:58PM +0200, Ralph Böhme via samba-technical wrote:
> > Hi!
> > 
> > Can we let wbinfo return a slightly more indicative message for failed id-to-sid
> > mappings? Example:
> > 
> > $ bin/wbinfo --unix-ids-to-sids=u200002,g300001,g200001
> > S-1-5-21-3630213715-3911067759-4130201097-2
> > S-0-0
> > S-1-5-21-3630213715-3911067759-4130201097-1
> > 
> > 
> > Currently it just prints "S-0-0" which I find a little ass backwards. Can we
> > print something like "NOT MAPPED" instead:
> > 
> > $ bin/wbinfo --unix-ids-to-sids=u200002,g300001,g200001
> > S-1-5-21-3630213715-3911067759-4130201097-2
> > NOT MAPPED
> > S-1-5-21-3630213715-3911067759-4130201097-1
> > 
> > Patch attached. Please review&push if happy.
> 
> LGTM. Pushed - thanks !

thanks.

> On a follow-up note, should we make a --verbose
> option print something like:
> 
> bin/wbinfo --verbose --unix-ids-to-sids=u200002,g300001,g200001
> id:u200002=S-1-5-21-3630213715-3911067759-4130201097-2
> id:g300001=NOT MAPPED
> id:g200001=S-1-5-21-3630213715-3911067759-4130201097-1
> 
> for easier script parsing ?

yeah, that would be nice.

-slow



More information about the samba-technical mailing list