Browse Source

freebsd: fix nfs4 acl processing, fixes #8756

This only happened when:
- using borg extract --numeric-ids
- processing NFS4 ACLs

It didn't affect POSIX ACL processing.

This is rather old code, so it looks like nobody used that
code or the bug was not reported.

The bug was discovered by PyCharm's "Junie" AI. \o/
Thomas Waldmann 1 month ago
parent
commit
df2bb8c988
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/borg/platform/freebsd.pyx

+ 1 - 1
src/borg/platform/freebsd.pyx

@@ -200,7 +200,7 @@ cdef _nfs4_use_stored_uid_gid(acl):
         if entry:
         if entry:
             if entry.startswith('user:') or entry.startswith('group:'):
             if entry.startswith('user:') or entry.startswith('group:'):
                 fields = entry.split(':')
                 fields = entry.split(':')
-                entries.append(':'.join(fields[0], fields[5], *fields[2:-1]))
+                entries.append(':'.join([fields[0], fields[5]] + fields[2:-1]))
             else:
             else:
                 entries.append(entry)
                 entries.append(entry)
     return safe_encode('\n'.join(entries))
     return safe_encode('\n'.join(entries))