]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/search.t: update permissions check for OpenBSD
authorEric Wong <e@80x24.org>
Sun, 22 Dec 2019 22:17:40 +0000 (22:17 +0000)
committerEric Wong <e@80x24.org>
Tue, 24 Dec 2019 03:48:32 +0000 (03:48 +0000)
OpenBSD (tested 6.5 on amd64) seems to follow the same semantics
as FreeBSD for S_ISGID, even if config.mak.uname in git.git
doesn't say so.

t/search.t

index c40e1363d07b7b91b77568ef0988ec8f9d25b9be..b9aa995b51623e6a59680525a4aa386852157b78 100644 (file)
@@ -438,9 +438,9 @@ $ibx->with_umask(sub {
 my $all_mask = 07777;
 my $dir_mask = 02770;
 
-# FreeBSD does not allow non-root users to set S_ISGID, so
-# git doesn't set it, either (see DIR_HAS_BSD_GROUP_SEMANTICS in git.git)
-if ($^O =~ /freebsd/i) {
+# FreeBSD and apparently OpenBSD does not allow non-root users to set S_ISGID,
+# so git doesn't set it, either (see DIR_HAS_BSD_GROUP_SEMANTICS in git.git)
+if ($^O =~ /(?:free|open)bsd/i) {
        $all_mask = 0777;
        $dir_mask = 0770;
 }