* lib/prototypes.h, libmisc/audit_help.c: Define new type
shadow_audit_result for the result argument of audit_logger(). This permits stronger type checking and a better readability of the results (SHADOW_AUDIT_FAILURE/SHADOW_AUDIT_SUCCESS constants). * src/groupadd.c, src/groupdel.c, src/useradd.c, src/userdel.c: Use the SHADOW_AUDIT_FAILURE/SHADOW_AUDIT_SUCCESS results instead of 0 or 1 in audit_logger().
This commit is contained in:
@@ -136,8 +136,12 @@ extern int audit_fd;
|
||||
extern void audit_help_open (void);
|
||||
/* Use AUDIT_NO_ID when a name is provided to audit_logger instead of an ID */
|
||||
#define AUDIT_NO_ID ((unsigned int) -1)
|
||||
typedef enum {
|
||||
SHADOW_AUDIT_FAILURE = 0,
|
||||
SHADOW_AUDIT_SUCCESS = 1} shadow_audit_result;
|
||||
extern void audit_logger (int type, const char *pgname, const char *op,
|
||||
const char *name, unsigned int id, int result);
|
||||
const char *name, unsigned int id,
|
||||
shadow_audit_result result);
|
||||
#endif
|
||||
|
||||
/* limits.c */
|
||||
|
Reference in New Issue
Block a user