[SSSD] [PATCHES] python bindings for managing users in local domains

Jakub Hrozek jhrozek at redhat.com
Tue Aug 25 13:02:06 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/25/2009 10:21 AM, Jakub Hrozek wrote:
>> > Also, why are you checking if ops->uid is
>> > nonzero in that if() statement? I think just checking
>> > if(ops->domain && ops->domain != dom) is sufficient (since
>> > get_domain_by_id() has already established the validity of ops->uid)
> Yes and no. Checking for ops->uid is correct but obfuscated the code, I
> changed it to more readable if(dom && ops->domain && ops->domain != dom)
> as you only want to assert ops->domain==dom if domain was given in form
> of FQDN (so it's in ops->domain) and uid (so it's in dom after
> get_domain_by_id()). Hope it makes more sense now.
> 

Sorry, actually the first version was correct. I forgot that you can
specify uid and still not get a valid domain back -- which is when you
select both username at DOMAIN and an UID that is outside all domains.

I also took the liberty of chanking the get_domain_by_id() logic to fix
ticket #112, too. I tested this version extensively with all kinds of
weird domain-uid combinations and it should be finally OK. Sorry for the
noise.

All three patches attached for clarity, but in reality only 0001 changed.

	Jakub

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqT4M4ACgkQHsardTLnvCWjagCg7CIAG9jDRK9SfjIazgEtUZDA
0CkAoNrh9Fu16wXJvAfJssbV3FfSgT/2
=DajG
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactor-tools-code.patch
Type: text/x-patch
Size: 41278 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20090825/e1c86d6a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Decouple-synchronous-sysdb-interface-from-tools.patch
Type: text/x-patch
Size: 106529 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20090825/e1c86d6a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Provide-python-bindings-for-sysdb.patch
Type: text/x-patch
Size: 40349 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20090825/e1c86d6a/attachment-0002.bin>


More information about the sssd-devel mailing list