[master/f21-branch][PATCH] Strip suggested usernames to 8 characters

David Shea dshea at redhat.com
Wed Sep 10 18:16:08 UTC 2014


On 09/10/2014 01:55 PM, Vratislav Podzimek wrote:
> On Tue, 2014-08-26 at 10:40 +0200, Vratislav Podzimek wrote:
>> This is a practical and widely used pattern.
>>
>> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
>> ---
>>   pyanaconda/users.py | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/pyanaconda/users.py b/pyanaconda/users.py
>> index 82cd2d3..f25c8fa 100644
>> --- a/pyanaconda/users.py
>> +++ b/pyanaconda/users.py
>> @@ -192,8 +192,9 @@ def guess_username(fullname):
>>       if len(fullname) > 1:
>>           username = fullname[0].decode("utf-8")[0].lower() + username
>>   
>> +    # strip accents and make the username at most 8 characters long
>>       username = strip_accents(username).encode("utf-8")
>> -    return username
>> +    return username[0:8]
>>   
>>   class Users:
>>       def __init__ (self):
> Anybody against this change on master?
>

Do any other tools in Fedora strip or warn about long user names? I 
don't see any reason to do this if long usernames aren't breaking something.


More information about the anaconda-patches mailing list