summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2019-09-02 10:22:02 +1000
committerDamien Miller <djm@mindrot.org>2019-09-02 10:22:02 +1000
commit6b7c53498def19a14dd9587bf521ab6dbee8988f (patch)
tree14f12a1648951969806f9c204ef62e2f1e3ea711 /openbsd-compat
parente50f808712393e86d69e42e9847cdf8d473412d7 (diff)
retain Solaris PRIV_FILE_LINK_ANY in sftp-server
Dropping this privilege removes the ability to create hard links to files owned by other users. This is required for the legacy sftp rename operation. bz#3036; approach ok Alex Wilson (the original author of the Solaris sandbox/pledge replacement code)
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/port-solaris.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsd-compat/port-solaris.c b/openbsd-compat/port-solaris.c
index a7c92545..7d5a28cd 100644
--- a/openbsd-compat/port-solaris.c
+++ b/openbsd-compat/port-solaris.c
@@ -284,11 +284,10 @@ solaris_drop_privs_pinfo_net_fork_exec(void)
priv_addset(npset, PRIV_FILE_OWNER) != 0)
fatal("priv_addset: %s", strerror(errno));
- if (priv_delset(npset, PRIV_FILE_LINK_ANY) != 0 ||
+ if (priv_delset(npset, PRIV_PROC_EXEC) != 0 ||
#ifdef PRIV_NET_ACCESS
priv_delset(npset, PRIV_NET_ACCESS) != 0 ||
#endif
- priv_delset(npset, PRIV_PROC_EXEC) != 0 ||
priv_delset(npset, PRIV_PROC_FORK) != 0 ||
priv_delset(npset, PRIV_PROC_INFO) != 0 ||
priv_delset(npset, PRIV_PROC_SESSION) != 0)