[Freeipa-devel] [PATCH] use same regex for user/group names as shadow-utils

Rob Crittenden rcritten at redhat.com
Wed Aug 6 13:44:21 UTC 2008


Stephen Gallagher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Rob Crittenden wrote:
>> The user/group name validator didn't match the standard *nix validator
>> and disallowed some valid names and allowed some invalid ones (including
>> those with spaces).
>>
>> This brings it inline with shadow-utils from Fedora 9.
>>
>> rob
>>
> 
> I have a problem with a validate function returning True on failure. I
> think it's a reasonable expectation that it should return True only if
> the regex is matched properly.

Technically it returns 1 and 0 where 1 is often a failure in C programs. 
Welcome to the world of C-turned-Python programmer.

In truth all the validators should return True/False but that is an 
optimization for another day.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20080806/a49ca119/attachment.bin>


More information about the Freeipa-devel mailing list