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: 24/Aug/2004         */
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_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       "", /* name */ \
00072       "", /* pass */ \
00073       "", /* fullname */ \
00074       "/home", /* homedir */ \
00075       "/bin/sh", /* shell */ \
00076       65534,  /* group */ \
00077       100000,  /* lastchange */ \
00078       0,  /* minchange */ \
00079       365,  /* maxchange */ \
00080       10,  /* warnchange */ \
00081       3,  /* inactive */ \
00082       100000   /* expire */ \
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       "", /* name */ \
00094       ""  /* pass */ \
00095     }
00096 
00097 #endif

Generated on Fri Jun 17 09:45:18 2005 for RSBAC by  doxygen 1.4.2