-----BEGIN PGP SIGNED MESSAGE-----
On 08/25/2009 03:02 PM, Jakub Hrozek wrote:
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
>>> >> > get_domain_by_id() has already established the validity of
> > 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@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
All three patches attached for clarity, but in reality only 0001 changed.
One more change, while working on #138 I realized that the copyright
headers were incorrect -- I had a GPLv2 header in my personal c source
file template, while the rest of the project uses GPLv3.
I also squashed in a fix for a typo in user-visible error message (fixes
#136) into patch #1.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----