mirror of https://github.com/borgbackup/borg.git
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:
parent
1f14d1de19
commit
e818026440
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in New Issue