1262566Sdes/* $Id: platform.h,v 1.9 2013/09/22 09:02:40 dtucker Exp $ */
2162852Sdes
3162852Sdes/*
4162852Sdes * Copyright (c) 2006 Darren Tucker.  All rights reserved.
5162852Sdes *
6162852Sdes * Permission to use, copy, modify, and distribute this software for any
7162852Sdes * purpose with or without fee is hereby granted, provided that the above
8162852Sdes * copyright notice and this permission notice appear in all copies.
9162852Sdes *
10162852Sdes * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11162852Sdes * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12162852Sdes * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13162852Sdes * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14162852Sdes * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15162852Sdes * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16162852Sdes * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17162852Sdes */
18162852Sdes
19162852Sdes#include <sys/types.h>
20162852Sdes
21221420Sdes#include <pwd.h>
22221420Sdes
23204917Sdesvoid platform_pre_listen(void);
24162852Sdesvoid platform_pre_fork(void);
25262566Sdesvoid platform_pre_restart(void);
26162852Sdesvoid platform_post_fork_parent(pid_t child_pid);
27162852Sdesvoid platform_post_fork_child(void);
28221420Sdesint  platform_privileged_uidswap(void);
29221420Sdesvoid platform_setusercontext(struct passwd *);
30221420Sdesvoid platform_setusercontext_post_groups(struct passwd *);
31204917Sdeschar *platform_get_krb5_client(const char *);
32204917Sdeschar *platform_krb5_get_principal_name(const char *);
33248619Sdesint platform_sys_dir_uid(uid_t);
34323124Sdesvoid platform_disable_tracing(int);
35296781Sdes
36296781Sdes/* in platform-pledge.c */
37296781Sdesvoid platform_pledge_agent(void);
38296781Sdesvoid platform_pledge_sftp_server(void);
39296781Sdesvoid platform_pledge_mux(void);
40