Print this page
Add libuserdefs and use in cmd/{oamuser,passwd}


  26 
  27 #ifndef _FUNCS_H
  28 #define _FUNCS_H
  29 
  30 #ifdef  __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #define CMD_PREFIX_USER "user"
  35 
  36 #define AUTH_SEP        ","
  37 #define PROF_SEP        ","
  38 #define ROLE_SEP        ","
  39 
  40 #define MAX_TYPE_LENGTH 64
  41 
  42 char *getusertype(char *cmdname);
  43 
  44 int is_role(char *usertype);
  45 



  46 void change_key(const char *, char *);
  47 void addkey_args(char **, int *);
  48 char *getsetdefval(const char *, char *);
  49 
  50 extern int nkeys;
  51 
  52 /* create_home() or rm_files() flags */
  53 #define MANAGE_ZFS_OPT  "MANAGE_ZFS="
  54 #define MANAGE_ZFS      1
  55 
  56 #ifdef  __cplusplus
  57 }
  58 #endif
  59 
  60 #endif  /* _FUNCS_H */


  26 
  27 #ifndef _FUNCS_H
  28 #define _FUNCS_H
  29 
  30 #ifdef  __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #define CMD_PREFIX_USER "user"
  35 
  36 #define AUTH_SEP        ","
  37 #define PROF_SEP        ","
  38 #define ROLE_SEP        ","
  39 
  40 #define MAX_TYPE_LENGTH 64
  41 
  42 char *getusertype(char *cmdname);
  43 
  44 int is_role(char *usertype);
  45 
  46 struct userdefs;
  47 void import_def(struct userdefs *ud);
  48 void update_def(struct userdefs *ud);
  49 void change_key(const char *, char *);
  50 void addkey_args(char **, int *);
  51 char *getsetdefval(const char *, char *);
  52 
  53 extern int nkeys;
  54 
  55 /* create_home() or rm_files() flags */
  56 #define MANAGE_ZFS_OPT  "MANAGE_ZFS="
  57 #define MANAGE_ZFS      1
  58 
  59 #ifdef  __cplusplus
  60 }
  61 #endif
  62 
  63 #endif  /* _FUNCS_H */