Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/include/avahi-core/../userdefs.h
Real path: /usr/include/userdefs.h
Zurück
/* * Copyright (c) 1989, 2020, Oracle and/or its affiliates. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #ifndef _USERDEFS_H #define _USERDEFS_H #include <stddef.h> #include <project.h> #include <limits.h> #include <user_attr.h> #ifdef __cplusplus extern "C" { #endif /* * The definitions in this file are local to the OA&M subsystem. General * use is not encouraged. */ /* User/group default values */ #define DEFGID 99 /* max reserved group id */ #define DEFRID 99 #define DEFPROJ 3 #define DEFPROJNAME "default" #define DEFGROUP 10 #define DEFGNAME "staff" #define DEFPARENT "/export/home" #define DEFSKL "/etc/skel" #define DEFSHL "/usr/bin/bash" #define DEFROLESHL "/usr/bin/pfbash" #define DEFINACT 0 #define DEFEXPIRE "" #define DEFAUTH "" #define DEFPROF "" #define DEFROLEPROF "All" #define DEFROLE "" #define DEFLIMPRIV "" #define DEFDFLTPRIV "" #define DEFLOCK_AFTER_RETRIES "" #define DEFROLEAUTH "" #define DEFROLEAUTHROLE "role" #define DEFAUTHPROF "" #define DEFCLEARANCE "" #define DEFMINLABEL "" #define DEFPAMPOLICY "" #define DEFPROJECT "" #define DEFANNOTATION "" #define DEFTPD "" #define DEFACCESSTIMES "" #define DEFACCESSTZ "" #define DEFUNLOCKAFTER "" #define DEFAUDITFLAGS "" #define DEFZFSHOME "yes" /* Defaults file keywords */ #define RIDSTR "defrid=" #define GIDSTR "defgroup=" #define GNAMSTR "defgname=" #define PARSTR "defparent=" #define SKLSTR "defskel=" #define SHELLSTR "defshell=" #define INACTSTR "definact=" #define EXPIRESTR "defexpire=" #define AUTHSTR "defauthorization=" #define PROFSTR "defprofile=" #define ROLESTR "defrole=" #define PROJSTR "defproj=" #define PROJNMSTR "defprojname=" #define LIMPRSTR "deflimitpriv=" #define DFLTPRSTR "defdefaultpriv=" #define FHEADER "# Default values for useradd. Changed " #define FHEADER_ROLE "# Default values for roleadd. Changed " #define LOCK_AFTER_RETRIESSTR "deflock_after_retries=" #define ROLEAUTHSTR "defroleauth=" #define AUTHPROFSTR "defauthprofile=" #define CLEARANCESTR "defclearance=" #define MINLABELSTR "defminlabel=" #define PAMPOLICYSTR "defpampolicy=" #define PROJECTSTR "defproject=" #define ACCESSTIMESSTR "defaccesstimes=" #define ACCESSTZSTR "defaccesstz=" #define UNLOCKAFTERSTR "defunlockafter=" #define AUDITFLAGSSTR "defauditflags=" #define TPDSTR "deftpd=" #define ANNOTATIONSTR "defannotation=" #define ZFSHOMESTR "defzfshome=" /* Defaults file */ #define DEFFILE "/usr/sadm/defadduser" #define DEFROLEFILE "/usr/sadm/defaddrole" #define GROUP "/etc/group" /* various limits */ #define MAXGLEN (LOGNAME_MAX + 1) /* max length of group name */ #define MAXDLEN 80 /* max length of a date string */ /* defaults structure */ struct userdefs { int defrid; /* highest reserved uid */ int defgroup; /* default group id */ char *defgname; /* default group name */ char *defparent; /* default base directory for new logins */ char *defskel; /* default skel directory */ char *defshell; /* default shell */ int definact; /* default inactive */ char *defexpire; /* default expire date */ char *defauth; /* default authorization */ char *defprof; /* default profile */ char *defrole; /* default role */ projid_t defproj; /* default project id */ char *defprojname; /* default project name */ char *deflimpriv; /* default limitpriv */ char *defdfltpriv; /* default defaultpriv */ char *deflock_after_retries; /* default lock_after_retries */ char *defroleauth; /* default roleauth */ char *defauthprof; /* default authenticated profile */ char *defclearance; /* default clearance */ char *defminlabel; /* defualt minimum label */ char *defpampolicy; /* default pam policy */ char *defproject; /* default projecto */ char *defannotation; /* default annotation */ char *deftpd; /* default Trusted Path Domain */ char *defaccesstimes; /* default access times */ char *defaccesstz; /* default access timezone */ char *defunlockafter; /* default unlock after */ char *defauditflags; /* default audit flags */ char *defzfshome; /* default home dir style */ }; #define DEFOFF(field) offsetof(struct userdefs, field) #define FIELD(up, pe, type) (*(type *)((char *)(up) + (pe)->off)) #define SKIPWS(ptr) while (*ptr && *ptr == ' ' || *ptr == '\t') ptr++ typedef struct parsent { const char *name; /* deffoo= */ const size_t nmsz; /* length of def= string (excluding \0) */ const int type; /* type of entry */ const ptrdiff_t off; /* offset in userdefs structure */ const char *uakey; /* user_attr key, if defined */ } parsent_t; #ifdef _INIT_PARSE_TABLE #define INT 0 #define STR 1 #define PROJID 2 static const parsent_t tab[] = { { GIDSTR, sizeof (GIDSTR) - 1, INT, DEFOFF(defgroup) }, { GNAMSTR, sizeof (GNAMSTR) - 1, STR, DEFOFF(defgname) }, { PARSTR, sizeof (PARSTR) - 1, STR, DEFOFF(defparent) }, { SKLSTR, sizeof (SKLSTR) - 1, STR, DEFOFF(defskel) }, { SHELLSTR, sizeof (SHELLSTR) - 1, STR, DEFOFF(defshell) }, { INACTSTR, sizeof (INACTSTR) - 1, INT, DEFOFF(definact) }, { EXPIRESTR, sizeof (EXPIRESTR) - 1, STR, DEFOFF(defexpire) }, { AUTHSTR, sizeof (AUTHSTR) - 1, STR, DEFOFF(defauth), USERATTR_AUTHS_KW }, { ROLESTR, sizeof (ROLESTR) - 1, STR, DEFOFF(defrole), USERATTR_ROLES_KW }, { PROFSTR, sizeof (PROFSTR) - 1, STR, DEFOFF(defprof), USERATTR_PROFILES_KW }, { PROJSTR, sizeof (PROJSTR) - 1, PROJID, DEFOFF(defproj) }, { PROJNMSTR, sizeof (PROJNMSTR) - 1, STR, DEFOFF(defprojname) }, { LIMPRSTR, sizeof (LIMPRSTR) - 1, STR, DEFOFF(deflimpriv), USERATTR_LIMPRIV_KW }, { DFLTPRSTR, sizeof (DFLTPRSTR) - 1, STR, DEFOFF(defdfltpriv), USERATTR_DFLTPRIV_KW }, { LOCK_AFTER_RETRIESSTR, sizeof (LOCK_AFTER_RETRIESSTR) - 1, STR, DEFOFF(deflock_after_retries), USERATTR_LOCK_AFTER_RETRIES_KW }, { ROLEAUTHSTR, sizeof (ROLEAUTHSTR) - 1, STR, DEFOFF(defroleauth), USERATTR_ROLE_AUTH_KW }, { AUTHPROFSTR, sizeof (AUTHPROFSTR) - 1, STR, DEFOFF(defauthprof), USERATTR_APROFILES_KW }, { CLEARANCESTR, sizeof (CLEARANCESTR) - 1, STR, DEFOFF(defclearance), USERATTR_CLEARANCE }, { MINLABELSTR, sizeof (MINLABELSTR) - 1, STR, DEFOFF(defminlabel), USERATTR_MINLABEL }, { PAMPOLICYSTR, sizeof (PAMPOLICYSTR) - 1, STR, DEFOFF(defpampolicy), USERATTR_PAM_POLICY }, { PROJECTSTR, sizeof (PROJECTSTR) - 1, STR, DEFOFF(defproject), USERATTR_DEFAULTPROJ_KW }, { AUDITFLAGSSTR, sizeof (AUDITFLAGSSTR) - 1, STR, DEFOFF(defauditflags), USERATTR_AUDIT_FLAGS_KW }, { ACCESSTIMESSTR, sizeof (ACCESSTIMESSTR) - 1, STR, DEFOFF(defaccesstimes), USERATTR_ACCESS_TIMES }, { ACCESSTZSTR, sizeof (ACCESSTZSTR) - 1, STR, DEFOFF(defaccesstz), USERATTR_ACCESS_TZ }, { UNLOCKAFTERSTR, sizeof (UNLOCKAFTERSTR) - 1, STR, DEFOFF(defunlockafter), USERATTR_UNLOCK_AFTER_KW }, { TPDSTR, sizeof (TPDSTR) - 1, STR, DEFOFF(deftpd), USERATTR_TPD_KW }, { ANNOTATIONSTR, sizeof (ANNOTATIONSTR) - 1, STR, DEFOFF(defannotation), USERATTR_ANNOTATION_KW }, { ZFSHOMESTR, sizeof (ZFSHOMESTR) -1, STR, DEFOFF(defzfshome) } }; #endif /* _INIT_PARSE_TABLE */ #define NDEF (sizeof (tab) / sizeof (parsent_t)) /* exit() values for user/group commands */ /* Everything succeeded */ #define EX_SUCCESS 0 /* No permission */ #define EX_NO_PERM 1 /* Command syntax error */ #define EX_SYNTAX 2 /* Invalid argument given */ #define EX_BADARG 3 /* A gid or uid already exists */ #define EX_ID_EXISTS 4 /* PASSWD and SHADOW are inconsistent with each other */ #define EX_INCONSISTENT 5 /* A group or user name doesn't exist */ #define EX_NAME_NOT_EXIST 6 /* GROUP, PASSWD, or SHADOW file missing */ #define EX_MISSING 7 /* GROUP, PASSWD, or SHAWOW file is busy */ #define EX_BUSY 8 /* A group or user name already exists */ #define EX_NAME_EXISTS 9 /* Unable to update PASSWD, SHADOW ,USERATTR file */ #define EX_UPDATE 10 /* Not enough space */ #define EX_NOSPACE 11 /* Unable to create/remove/move home directory */ #define EX_HOMEDIR 12 /* new login already in use */ #define EX_NL_USED 13 /* Unexpected failure */ #define EX_FAILURE 14 /* A user name is in a non-local name service */ #define EX_NOT_LOCAL 15 /* Unable to update the group database. */ #define EX_GRP_UPDATE 16 /* Unable to update the project database. */ #define EX_PROJ_UPDATE 17 /* Insufficient authorization. */ #define EX_NO_AUTH 18 /* Does not have role. */ #define EX_NO_ROLE 19 /* Does not have profile. */ #define EX_NO_PROFILE 20 /* Does not have privilege. */ #define EX_NO_PRIVILEGE 21 /* Does not have label. */ #define EX_NO_LABEL 22 /* Does not have group. */ #define EX_NO_GROUP 23 /* System not running TX. */ #define EX_NO_SYSLABEL 24 /* Does not have project. */ #define EX_NO_PROJECT 25 /* Unable to update auto_home */ #define EX_AUTO_HOME 26 #ifdef __cplusplus } #endif #endif /* _USERDEFS_H */