PERFORCE change 91489 for review

Christian S.J. Peron csjp at FreeBSD.org
Fri Feb 10 04:14:25 GMT 2006


http://perforce.freebsd.org/chv.cgi?CH=91489

Change 91489 by csjp at csjp_xor on 2006/02/10 04:13:39

	Conditionally compile audit support into login(1) unless somebody has
	specified the NO_AUDIT flag in /etc/make.conf

Affected files ...

.. //depot/projects/trustedbsd/audit3/usr.bin/login/Makefile#8 edit
.. //depot/projects/trustedbsd/audit3/usr.bin/login/login_audit.c#9 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/usr.bin/login/Makefile#8 (text+ko) ====

@@ -7,10 +7,15 @@
 DPADD=	${LIBUTIL} ${LIBPAM}
 LDADD=	-lutil ${MINUSLPAM} -lbsm
 MAN=	login.1 login.access.5
+
 .if !defined(NO_SETUID_LOGIN)
 BINOWN=	root
 BINMODE=4555
 PRECIOUSPROG=
 .endif
 
+.if !defined(NO_AUDIT)
+CFLAGS += -DUSE_BSM_AUDIT
+.endif
+
 .include <bsd.prog.mk>

==== //depot/projects/trustedbsd/audit3/usr.bin/login/login_audit.c#9 (text+ko) ====

@@ -58,6 +58,7 @@
 void
 au_login_success(void)
 {
+#ifdef USE_BSM_AUDIT
 	token_t *tok;
 	int aufd;
 	au_mask_t aumask;
@@ -102,6 +103,7 @@
 
 	if (au_close(aufd, 1, AUE_login) == -1)
 		errx(1, "login: Audit Record was not committed.");
+#endif	/* USE_BSM_AUDIT */
 }
 
 /*
@@ -111,6 +113,7 @@
 void
 au_login_fail(char *errmsg, int na)
 {
+#ifdef USE_BSM_AUDIT
 	token_t *tok;
 	int aufd;
 	long au_cond;
@@ -159,6 +162,7 @@
 
 	if (au_close(aufd, 1, AUE_login) == -1)
 		errx(1, "login: Audit Error: au_close() was not committed");
+#endif	/* USE_BSM_AUDIT */
 }
 
 /*
@@ -168,6 +172,7 @@
 void
 audit_logout(void)
 {
+#ifdef USE_BSM_AUDIT
 	token_t *tok;
 	int aufd;
 	au_mask_t aumask;
@@ -201,4 +206,5 @@
 
 	if (au_close(aufd, 1, AUE_logout) == -1)
 		errx(1, "login: Audit Record was not committed.");
+#endif	/* USE_BSM_AUDIT */
 }
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list