platform.h revision 296633
1169689Skan/* $Id: platform.h,v 1.9 2013/09/22 09:02:40 dtucker Exp $ */ 2169689Skan 3169689Skan/* 4169689Skan * Copyright (c) 2006 Darren Tucker. All rights reserved. 5169689Skan * 6169689Skan * Permission to use, copy, modify, and distribute this software for any 7169689Skan * purpose with or without fee is hereby granted, provided that the above 8169689Skan * copyright notice and this permission notice appear in all copies. 9169689Skan * 10169689Skan * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11169689Skan * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12169689Skan * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13169689Skan * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14169689Skan * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15169689Skan * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16169689Skan * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17169689Skan */ 18169689Skan 19169689Skan#include <sys/types.h> 20169689Skan 21169689Skan#include <pwd.h> 22169689Skan 23169689Skanvoid platform_pre_listen(void); 24169689Skanvoid platform_pre_fork(void); 25169689Skanvoid platform_pre_restart(void); 26169689Skanvoid platform_post_fork_parent(pid_t child_pid); 27169689Skanvoid platform_post_fork_child(void); 28169689Skanint platform_privileged_uidswap(void); 29169689Skanvoid platform_setusercontext(struct passwd *); 30169689Skanvoid platform_setusercontext_post_groups(struct passwd *); 31169689Skanchar *platform_get_krb5_client(const char *); 32169689Skanchar *platform_krb5_get_principal_name(const char *); 33169689Skanint platform_sys_dir_uid(uid_t); 34169689Skan 35169689Skan/* in platform-pledge.c */ 36169689Skanvoid platform_pledge_agent(void); 37169689Skanvoid platform_pledge_sftp_server(void); 38169689Skanvoid platform_pledge_mux(void); 39169689Skan