diff options
author | Damien Miller <djm@mindrot.org> | 2019-09-02 10:22:02 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-09-02 10:22:02 +1000 |
commit | 6b7c53498def19a14dd9587bf521ab6dbee8988f (patch) | |
tree | 14f12a1648951969806f9c204ef62e2f1e3ea711 /openbsd-compat | |
parent | e50f808712393e86d69e42e9847cdf8d473412d7 (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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsd-compat/port-solaris.c b/openbsd-compat/port-solaris.c index a7c925450..7d5a28cd0 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) | |||
284 | priv_addset(npset, PRIV_FILE_OWNER) != 0) | 284 | priv_addset(npset, PRIV_FILE_OWNER) != 0) |
285 | fatal("priv_addset: %s", strerror(errno)); | 285 | fatal("priv_addset: %s", strerror(errno)); |
286 | 286 | ||
287 | if (priv_delset(npset, PRIV_FILE_LINK_ANY) != 0 || | 287 | if (priv_delset(npset, PRIV_PROC_EXEC) != 0 || |
288 | #ifdef PRIV_NET_ACCESS | 288 | #ifdef PRIV_NET_ACCESS |
289 | priv_delset(npset, PRIV_NET_ACCESS) != 0 || | 289 | priv_delset(npset, PRIV_NET_ACCESS) != 0 || |
290 | #endif | 290 | #endif |
291 | priv_delset(npset, PRIV_PROC_EXEC) != 0 || | ||
292 | priv_delset(npset, PRIV_PROC_FORK) != 0 || | 291 | priv_delset(npset, PRIV_PROC_FORK) != 0 || |
293 | priv_delset(npset, PRIV_PROC_INFO) != 0 || | 292 | priv_delset(npset, PRIV_PROC_INFO) != 0 || |
294 | priv_delset(npset, PRIV_PROC_SESSION) != 0) | 293 | priv_delset(npset, PRIV_PROC_SESSION) != 0) |