Skip to content

Commit 8882bfc

Browse files
authored
Merge pull request #2244 from stgraber/idmap
shared/idmap: Skip ACLs that are out of range
2 parents 07baf74 + 89e0df8 commit 8882bfc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

shared/idmap/shift_linux.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ func shiftACLType(path string, aclType int, shiftIDs func(uid int64, gid int64)
527527
_, newID = shiftIDs(-1, (int64)(*idp))
528528
}
529529

530+
// Skip values that are out of range.
531+
if newID == -1 {
532+
continue
533+
}
534+
530535
// Update the new entry with the shifted value
531536
ret = C.acl_set_qualifier(ent, unsafe.Pointer(&newID))
532537
if ret == -1 {

0 commit comments

Comments
 (0)