acls (linux): remove int() cast

it seems like the (non-numerical) name or group might get into fields[3] if the name -> uid or group -> gid mapping is unknown.
This commit is contained in:
Thomas Waldmann 2015-10-19 00:28:53 +02:00
parent 1f14d1de19
commit e818026440
1 changed files with 2 additions and 2 deletions

View File

@ -35,9 +35,9 @@ def acl_use_local_uid_gid(acl):
if entry:
fields = entry.split(':')
if fields[0] == 'user' and fields[1]:
fields[1] = str(user2uid(fields[1], int(fields[3])))
fields[1] = str(user2uid(fields[1], fields[3]))
elif fields[0] == 'group' and fields[1]:
fields[1] = str(group2gid(fields[1], int(fields[3])))
fields[1] = str(group2gid(fields[1], fields[3]))
entries.append(':'.join(fields[:3]))
return '\n'.join(entries).encode('utf-8', 'surrogatescape')