summaryrefslogtreecommitdiffstats
path: root/platform.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2024-05-17 12:21:27 +1000
committerDamien Miller <djm@mindrot.org>2024-05-17 14:41:37 +1000
commit02e679a2cb3f6df8e9dbb1519ed578226485157f (patch)
tree4f40d442feb58e6745e46ad27060f1aa6067c6f0 /platform.c
parentc0416035c5eaf70a8450d11c8833c5f7068ee7ad (diff)
Makefile support for sshd-session
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c60
1 files changed, 2 insertions, 58 deletions
diff --git a/platform.c b/platform.c
index 9cf81815..4c4fe57e 100644
--- a/platform.c
+++ b/platform.c
@@ -32,64 +32,8 @@
#include "openbsd-compat/openbsd-compat.h"
-extern int use_privsep;
extern ServerOptions options;
-void
-platform_pre_listen(void)
-{
-#ifdef LINUX_OOM_ADJUST
- /* Adjust out-of-memory killer so listening process is not killed */
- oom_adjust_setup();
-#endif
-}
-
-void
-platform_post_listen(void)
-{
-#ifdef SYSTEMD_NOTIFY
- ssh_systemd_notify_ready();
-#endif
-}
-
-void
-platform_pre_fork(void)
-{
-#ifdef USE_SOLARIS_PROCESS_CONTRACTS
- solaris_contract_pre_fork();
-#endif
-}
-
-void
-platform_pre_restart(void)
-{
-#ifdef SYSTEMD_NOTIFY
- ssh_systemd_notify_reload();
-#endif
-#ifdef LINUX_OOM_ADJUST
- oom_adjust_restore();
-#endif
-}
-
-void
-platform_post_fork_parent(pid_t child_pid)
-{
-#ifdef USE_SOLARIS_PROCESS_CONTRACTS
- solaris_contract_post_fork_parent(child_pid);
-#endif
-}
-
-void
-platform_post_fork_child(void)
-{
-#ifdef USE_SOLARIS_PROCESS_CONTRACTS
- solaris_contract_post_fork_child();
-#endif
-#ifdef LINUX_OOM_ADJUST
- oom_adjust_restore();
-#endif
-}
-
/* return 1 if we are running with privilege to swap UIDs, 0 otherwise */
int
platform_privileged_uidswap(void)
@@ -136,7 +80,7 @@ platform_setusercontext(struct passwd *pw)
*/
if (getuid() == 0 || geteuid() == 0) {
if (options.use_pam) {
- do_pam_setcred(use_privsep);
+ do_pam_setcred();
}
}
# endif /* USE_PAM */
@@ -164,7 +108,7 @@ platform_setusercontext_post_groups(struct passwd *pw)
* Reestablish them here.
*/
if (options.use_pam) {
- do_pam_setcred(use_privsep);
+ do_pam_setcred();
}
#endif /* USE_PAM */