aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2024-05-26 12:16:36 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2024-05-26 12:16:36 +0000
commit8a7135132699c731ec53f0f9664d772211eba3b7 (patch)
tree6c14dcd03eb71c4ca1754dd2fe457253913dcbb4
parentb6b85085a0882490dc3cfb68692eeffe4b4ae42c (diff)
downloadports-8a7135132699c731ec53f0f9664d772211eba3b7.tar.gz
ports-8a7135132699c731ec53f0f9664d772211eba3b7.zip
net/samba416: Fix startup script in a jail environment
PR: 275343 Approved by: maintainer timeout (6 months) Approved by: mikael (samba419 maintainer, ports committer)
-rw-r--r--net/samba416/Makefile2
-rw-r--r--net/samba416/files/samba_server.in10
2 files changed, 7 insertions, 5 deletions
diff --git a/net/samba416/Makefile b/net/samba416/Makefile
index a3518fbafe51..d83f339028f6 100644
--- a/net/samba416/Makefile
+++ b/net/samba416/Makefile
@@ -1,6 +1,6 @@
PORTNAME= ${SAMBA4_BASENAME}416
PORTVERSION= ${SAMBA4_VERSION}
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES?= net
MASTER_SITES= SAMBA/samba/stable SAMBA/samba/rc
DISTNAME= ${SAMBA4_DISTNAME}
diff --git a/net/samba416/files/samba_server.in b/net/samba416/files/samba_server.in
index b45811dd9f4d..99c9b64cc78d 100644
--- a/net/samba416/files/samba_server.in
+++ b/net/samba416/files/samba_server.in
@@ -225,10 +225,12 @@ can_mount()
if ! load_kld $kld; then
return 1
fi
- if [ $(${SYSCTL_N} security.jail.jailed) -eq 0 ] ||
- [ $(${SYSCTL_N} security.jail.mount_allowed) -eq 1 ] ||
- [ $(${SYSCTL_N} security.jail.mount_${kld}_allowed) -eq 1 ]; then
- return 0
+ if [ $(${SYSCTL_N} security.jail.jailed) -eq 0 ]; then
+ return 0
+ fi
+ if [ $(${SYSCTL_N} security.jail.mount_allowed) -eq 1 ] &&
+ [ $(${SYSCTL_N} security.jail.mount_${kld}_allowed) -eq 1 ]; then
+ return 0
fi
return 1
}