mirror of https://github.com/restic/restic.git
Merge pull request #1611 from qbit/master
On OpenBSD only root can set sticky bit
This commit is contained in:
commit
be02008025
|
@ -209,8 +209,11 @@ func TestNodeRestoreAt(t *testing.T) {
|
||||||
rtest.Assert(t, test.GID == n2.GID,
|
rtest.Assert(t, test.GID == n2.GID,
|
||||||
"%v: GID doesn't match (%v != %v)", test.Type, test.GID, n2.GID)
|
"%v: GID doesn't match (%v != %v)", test.Type, test.GID, n2.GID)
|
||||||
if test.Type != "symlink" {
|
if test.Type != "symlink" {
|
||||||
rtest.Assert(t, test.Mode == n2.Mode,
|
// On OpenBSD only root can set sticky bit (see sticky(8)).
|
||||||
"%v: mode doesn't match (0%o != 0%o)", test.Type, test.Mode, n2.Mode)
|
if runtime.GOOS != "openbsd" && test.Name == "testSticky" {
|
||||||
|
rtest.Assert(t, test.Mode == n2.Mode,
|
||||||
|
"%v: mode doesn't match (0%o != 0%o)", test.Type, test.Mode, n2.Mode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue