00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __RSBAC_UM_TYPES_H
00009 #define __RSBAC_UM_TYPES_H
00010
00011
00012
00013 #if 0
00014 #ifdef __KERNEL__
00015 #include <rsbac/debug.h>
00016 #include <rsbac/lists.h>
00017 #endif
00018 #endif
00019
00020 #define RSBAC_UM_MAX_MAXNUM 1000000
00021
00022 #define RSBAC_UM_USER_LIST_NAME "um_u."
00023 #define RSBAC_UM_GROUP_LIST_NAME "um_g."
00024 #define RSBAC_UM_NR_USER_LISTS 8
00025 #define RSBAC_UM_NR_GROUP_LISTS 8
00026
00027 #define RSBAC_UM_USER_LIST_VERSION 1
00028 #define RSBAC_UM_GROUP_LIST_VERSION 1
00029 #define RSBAC_UM_USER_LIST_KEY 6363636
00030 #define RSBAC_UM_GROUP_LIST_KEY 9847298
00031
00032 #define RSBAC_UM_NAME_LEN 16
00033 #define RSBAC_UM_PASS_LEN 24
00034 #define RSBAC_UM_FULLNAME_LEN 30
00035 #define RSBAC_UM_HOMEDIR_LEN 50
00036 #define RSBAC_UM_SHELL_LEN 24
00037
00038 typedef __s32 rsbac_um_days_t;
00039
00040 enum rsbac_um_mod_t {UM_name, UM_pass, UM_fullname, UM_homedir, UM_shell, \
00041 UM_group, UM_lastchange, UM_minchange, UM_maxchange, \
00042 UM_warnchange, UM_inactive, UM_expire, UM_ttl, \
00043 UM_cryptpass, UM_none};
00044
00045 union rsbac_um_mod_data_t
00046 {
00047 char string[RSBAC_MAXNAMELEN];
00048 rsbac_gid_t group;
00049 rsbac_um_days_t days;
00050 rsbac_time_t ttl;
00051 };
00052
00053 struct rsbac_um_user_entry_t
00054 {
00055 char name[RSBAC_UM_NAME_LEN];
00056 char pass[RSBAC_UM_PASS_LEN];
00057 char fullname[RSBAC_UM_FULLNAME_LEN];
00058 char homedir[RSBAC_UM_HOMEDIR_LEN];
00059 char shell[RSBAC_UM_SHELL_LEN];
00060 rsbac_gid_t group;
00061 rsbac_um_days_t lastchange;
00062 rsbac_um_days_t minchange;
00063 rsbac_um_days_t maxchange;
00064 rsbac_um_days_t warnchange;
00065 rsbac_um_days_t inactive;
00066 rsbac_um_days_t expire;
00067 };
00068
00069 #define DEFAULT_UM_U_ENTRY \
00070 { \
00071 "", \
00072 "", \
00073 "", \
00074 "/home", \
00075 "/bin/sh", \
00076 65534, \
00077 100000, \
00078 0, \
00079 365, \
00080 10, \
00081 3, \
00082 100000 \
00083 }
00084
00085 struct rsbac_um_group_entry_t
00086 {
00087 char name[RSBAC_UM_NAME_LEN];
00088 char pass[RSBAC_UM_PASS_LEN];
00089 };
00090
00091 #define DEFAULT_UM_G_ENTRY \
00092 { \
00093 "", \
00094 "" \
00095 }
00096
00097 #endif