* 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:
nekral-guest
2008-09-04 19:35:48 +00:00
parent 3dcaaf87e7
commit a21809cdae
6 changed files with 142 additions and 70 deletions

View File

@ -76,13 +76,14 @@ void audit_help_open (void)
* result - 1 is "success" and 0 is "failed"
*/
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)
{
if (audit_fd < 0) {
return;
} else {
audit_log_acct_message (audit_fd, type, NULL, op, name, id,
NULL, NULL, NULL, result);
NULL, NULL, NULL, (int) result);
}
}