summaryrefslogtreecommitdiff
path: root/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/platform.c b/platform.c
index aee4b01e7..e3a428aaa 100644
--- a/platform.c
+++ b/platform.c
@@ -1,4 +1,4 @@
1/* $Id: platform.c,v 1.1 2006/08/30 17:24:41 djm Exp $ */ 1/* $Id: platform.c,v 1.3 2009/12/20 23:49:22 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved. 4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -22,6 +22,15 @@
22#include "openbsd-compat/openbsd-compat.h" 22#include "openbsd-compat/openbsd-compat.h"
23 23
24void 24void
25platform_pre_listen(void)
26{
27#ifdef LINUX_OOM_ADJUST
28 /* Adjust out-of-memory killer so listening process is not killed */
29 oom_adjust_setup();
30#endif
31}
32
33void
25platform_pre_fork(void) 34platform_pre_fork(void)
26{ 35{
27#ifdef USE_SOLARIS_PROCESS_CONTRACTS 36#ifdef USE_SOLARIS_PROCESS_CONTRACTS
@@ -43,4 +52,17 @@ platform_post_fork_child(void)
43#ifdef USE_SOLARIS_PROCESS_CONTRACTS 52#ifdef USE_SOLARIS_PROCESS_CONTRACTS
44 solaris_contract_post_fork_child(); 53 solaris_contract_post_fork_child();
45#endif 54#endif
55#ifdef LINUX_OOM_ADJUST
56 oom_adjust_restore();
57#endif
58}
59
60char *
61platform_krb5_get_principal_name(const char *pw_name)
62{
63#ifdef USE_AIX_KRB_NAME
64 return aix_krb5_get_principal_name(pw_name);
65#else
66 return NULL;
67#endif
46} 68}