/linux-2.6.21.1-rsbac-1.3.4/include/rsbac/um_types.h

Go to the documentation of this file.
00001 /**************************************/
00002 /* Rule Set Based Access Control      */
00003 /* Author and (c) 1999-2004: Amon Ott */
00004 /* User Management Data structures    */
00005 /* Last modified: 29/Sep/2005         */
00006 /**************************************/
00007 
00008 #ifndef __RSBAC_UM_TYPES_H
00009 #define __RSBAC_UM_TYPES_H
00010 
00011 //#include <rsbac/types.h>
00012 
00013 #if 0
00014 #ifdef __KERNEL__               /* only include in kernel code */
00015 #include <rsbac/debug.h>
00016 #include <rsbac/lists.h>
00017 #endif                          /* __KERNEL__ */
00018 #endif
00019 
00020 #define RSBAC_UM_MAX_MAXNUM 1000000
00021 
00022 #define RSBAC_UM_USER_LIST_NAME  "um_user"
00023 #define RSBAC_UM_GROUP_LIST_NAME  "um_grp"
00024 #define RSBAC_UM_USER_PWHISTORY_LIST_NAME "um_pwh"
00025 #define RSBAC_UM_OLD_USER_LIST_NAME  "um_u."
00026 #define RSBAC_UM_OLD_GROUP_LIST_NAME  "um_g."
00027 #define RSBAC_UM_OLD_USER_PWHISTORY_LIST_NAME "um_pwh."
00028 
00029 #define RSBAC_UM_NR_USER_LISTS  8
00030 #define RSBAC_UM_NR_GROUP_LISTS  8
00031 #define RSBAC_UM_NR_USER_PWHISTORY_LISTS  8
00032 
00033 #define RSBAC_UM_USER_LIST_VERSION 1
00034 #define RSBAC_UM_GROUP_LIST_VERSION 1
00035 #define RSBAC_UM_USER_PWHISTORY_LIST_VERSION 1
00036 
00037 #define RSBAC_UM_USER_LIST_KEY 6363636
00038 #define RSBAC_UM_GROUP_LIST_KEY 9847298
00039 #define RSBAC_UM_USER_PWHISTORY_LIST_KEY 8854687
00040 
00041 
00042 #define RSBAC_UM_NAME_LEN 16
00043 #define RSBAC_UM_PASS_LEN 24
00044 #define RSBAC_UM_FULLNAME_LEN 30
00045 #define RSBAC_UM_HOMEDIR_LEN 50
00046 #define RSBAC_UM_SHELL_LEN 24
00047 
00048 typedef __s32 rsbac_um_days_t;
00049 
00050 enum rsbac_um_mod_t { UM_name, UM_pass, UM_fullname, UM_homedir, UM_shell,
00051         UM_group, UM_lastchange, UM_minchange, UM_maxchange,
00052         UM_warnchange, UM_inactive, UM_expire, UM_ttl,
00053         UM_cryptpass, UM_none
00054 };
00055 
00056 union rsbac_um_mod_data_t {
00057         char string[RSBAC_MAXNAMELEN];
00058         rsbac_gid_t group;
00059         rsbac_um_days_t days;
00060         rsbac_time_t ttl;
00061 };
00062 
00063 struct rsbac_um_user_entry_t {
00064         char name[RSBAC_UM_NAME_LEN];
00065         char pass[RSBAC_UM_PASS_LEN];
00066         char fullname[RSBAC_UM_FULLNAME_LEN];
00067         char homedir[RSBAC_UM_HOMEDIR_LEN];
00068         char shell[RSBAC_UM_SHELL_LEN];
00069         rsbac_gid_t group;
00070         rsbac_um_days_t lastchange;
00071         rsbac_um_days_t minchange;
00072         rsbac_um_days_t maxchange;
00073         rsbac_um_days_t warnchange;
00074         rsbac_um_days_t inactive;
00075         rsbac_um_days_t expire;
00076 };
00077 
00078 #define DEFAULT_UM_U_ENTRY \
00079     { \
00080       "", /* name */ \
00081       "", /* pass */ \
00082       "", /* fullname */ \
00083       "/home", /* homedir */ \
00084       "/bin/sh", /* shell */ \
00085       65534,  /* group */ \
00086       100000,  /* lastchange */ \
00087       0,  /* minchange */ \
00088       365,  /* maxchange */ \
00089       10,  /* warnchange */ \
00090       3,  /* inactive */ \
00091       100000   /* expire */ \
00092     }
00093 
00094 struct rsbac_um_group_entry_t {
00095         char name[RSBAC_UM_NAME_LEN];
00096         char pass[RSBAC_UM_PASS_LEN];
00097 };
00098 
00099 #define DEFAULT_UM_G_ENTRY \
00100     { \
00101       "", /* name */ \
00102       ""  /* pass */ \
00103     }
00104 
00105 #endif

Generated on Wed May 16 11:53:29 2007 for RSBAC by  doxygen 1.5.1