Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef PAM_NETNS_H
00028 #define PAM_NETNS_H PAM_NETNS_H
00029
00030
00031 #include "common.h"
00032 #include <security/pam_ext.h>
00033
00034
00035 #ifndef CLONE_NEWNET
00036 #include <linux/sched.h>
00037 #endif
00038
00039 #include "util.h"
00040 #include "pexec.h"
00041 #define MAX_NUMBER_OF_PROXIES 10
00042 #define DEFAULT_SESID_LEN 48
00043
00048 typedef struct {
00049 pam_handle_t *pamh;
00051 bool debug;
00053 char before_script[UNIX_PATH_MAX];
00055 char after_script[UNIX_PATH_MAX];
00057 char setup_script[UNIX_PATH_MAX];
00059 char cleanup_script[UNIX_PATH_MAX];
00061 char shm_name[UNIX_PATH_MAX];
00063 char shm_hlpr_name[UNIX_PATH_MAX];
00066 int nodaemon;
00069 int timeout;
00072 char prefix[NAME_MAX];
00075 int ns_id;
00079 char helper[UNIX_PATH_MAX];
00081 const char *user;
00083 int out_sfd;
00086 char out_socket[UNIX_PATH_MAX];
00088 bool bind_mount;
00091 bool shm_del;
00093 bool unshare_fs;
00095 bool affect_root;
00097 } options_t;
00098
00099 #define DEFAULT_BEFORE_SCRIPT "/etc/security/netns_before"
00100 #define DEFAULT_AFTER_SCRIPT "/etc/security/netns_after"
00101 #define DEFAULT_SETUP_SCRIPT "/etc/security/netns_setup"
00102 #define DEFAULT_CLEANUP_SCRIPT "/etc/security/netns_cleanup"
00103 #define DEFAULT_SHM_NAME "/tmp/pam_netns_shmXXXXXX"
00104 #define DEFAULT_TIMEOUT_SECS 4
00105 #define DEFAULT_PREFIX "ns"
00106 #define DEFAULT_HELPER "/lib/security/pam_netns_helper"
00107
00108 #ifdef _POSIX_THREADS
00109
00110 #else // _POSIX_THREADS
00111 #error "No Posix Threads available"
00112 #endif
00113
00114 void parse_options(int argc, const char **argv);
00115
00116 typedef int (*cb_ft) (const void *param1, ...);
00117
00118 #endif