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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Samba - samba-technical mailing list
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.

Thanks!
-slow
Reply | Threaded
Open this post in threaded view
|

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

Samba - samba-technical mailing list
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 !

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 ?

Reply | Threaded
Open this post in threaded view
|

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

Samba - samba-technical mailing list
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