[PATCH] Fixing Bug 10720 - error: Unable to convert first SID

Garming Sam garming at catalyst.net.nz
Tue Nov 25 20:11:37 MST 2014


Hi,

This issue was a consequence of the winbind transition and id mapping 
not correctly handling ID_TYPE_BOTH. It was fairly easy to hit and so 
we've already had affected users.

The first two patches improves our current testing to correctly identify 
the error. They simply build upon the existing wbinfo_sid2xid tests and 
are currently in auto-build.

Specifically the structure of the test to reproduce the bug is:
     net cache flush
     wbinfo --uid-to-sid=[some uid which will have ID_TYPE_BOTH]
     wbinfo --sids-to-unix-ids=[the corresponding SID]
     -- alternatively net cache list which will give id:U instead of id:B

The other three patches fix the actual issue. The first plumbs a pointer 
to struct unixid instead of uid/gid. The second fixes the return of the 
id type and the last fixes the ABI - which with renaming, we can also 
fix another bug (https://bugzilla.samba.org/show_bug.cgi?id=10355) where 
it has naming conflicts with Brookhaven Protein DataBank libpdb.

I just wanted to note that the id is now an in-out parameter, which is 
somewhat subtle, although the reverse query with sids to ids does handle 
this in a similar manner.

Any thoughts?
Otherwise, please review these last three patches and push.


More info on the original bug:
https://bugzilla.samba.org/show_bug.cgi?id=10720



Cheers,

Garming
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wbinfo-fix-tests-and-lack-of-cache-flushing.patch
Type: text/x-patch
Size: 1245 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141126/61565e78/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-wbinfo-create-a-more-comprehensive-test-for-sids2xid.patch
Type: text/x-patch
Size: 4889 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141126/61565e78/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-idmap-unify-passdb-id_to_sid-methods.patch
Type: text/x-patch
Size: 17187 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141126/61565e78/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-idmap-return-the-correct-id-type-to-id_to_sid-method.patch
Type: text/x-patch
Size: 2745 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141126/61565e78/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-pdb-Increase-version-number-to-fix-ABI.patch
Type: text/x-patch
Size: 24137 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141126/61565e78/attachment-0004.bin>


More information about the samba-technical mailing list