svn commit: r306757 - head/usr.bin/login

Ed Maste emaste at FreeBSD.org
Thu Oct 6 13:21:43 UTC 2016


Author: emaste
Date: Thu Oct  6 13:21:42 2016
New Revision: 306757
URL: https://svnweb.freebsd.org/changeset/base/306757

Log:
  login: fix capitalization in errx messages
  
  Reported by:	bde

Modified:
  head/usr.bin/login/login_audit.c

Modified: head/usr.bin/login/login_audit.c
==============================================================================
--- head/usr.bin/login/login_audit.c	Thu Oct  6 13:18:18 2016	(r306756)
+++ head/usr.bin/login/login_audit.c	Thu Oct  6 13:21:42 2016	(r306757)
@@ -73,14 +73,14 @@ au_login_success(void)
  	if (auditon(A_GETCOND, &au_cond, sizeof(au_cond)) < 0) {
 		if (errno == ENOSYS)
 			return;
-		errx(1, "Could not determine audit condition");
+		errx(1, "could not determine audit condition");
 	}
 	if (au_cond == AUC_NOAUDIT)
 		return;
 
 	/* Compute and set the user's preselection mask. */
 	if (au_user_mask(pwd->pw_name, &aumask) == -1)
-		errx(1, "Could not set audit mask");
+		errx(1, "could not set audit mask");
 
 	/* Set the audit info for the user. */
 	auinfo.ai_auid = uid;
@@ -91,19 +91,19 @@ au_login_success(void)
 		err(1, "setaudit failed");
 
 	if ((aufd = au_open()) == -1)
-		errx(1, "Audit Error: au_open() failed");
+		errx(1, "audit error: au_open() failed");
 
 	if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid,
 	    pid, &tid)) == NULL)
-		errx(1, "Audit Error: au_to_subject32() failed");
+		errx(1, "audit error: au_to_subject32() failed");
 	au_write(aufd, tok);
 
 	if ((tok = au_to_return32(0, 0)) == NULL)
-		errx(1, "Audit Error: au_to_return32() failed");
+		errx(1, "audit error: au_to_return32() failed");
 	au_write(aufd, tok);
 
 	if (au_close(aufd, 1, AUE_login) == -1)
-		errx(1, "Audit Record was not committed.");
+		errx(1, "audit record was not committed.");
 }
 
 /*
@@ -124,13 +124,13 @@ au_login_fail(const char *errmsg, int na
  	if (auditon(A_GETCOND, &au_cond, sizeof(au_cond)) < 0) {
 		if (errno == ENOSYS)
 			return;
-		errx(1, "Could not determine audit condition");
+		errx(1, "could not determine audit condition");
 	}
 	if (au_cond == AUC_NOAUDIT)
 		return;
 
 	if ((aufd = au_open()) == -1)
-		errx(1, "Audit Error: au_open() failed");
+		errx(1, "audit error: au_open() failed");
 
 	if (na) {
 		/*
@@ -139,28 +139,28 @@ au_login_fail(const char *errmsg, int na
 		 */
 		if ((tok = au_to_subject32(-1, geteuid(), getegid(), -1, -1,
 		    pid, -1, &tid)) == NULL)
-			errx(1, "Audit Error: au_to_subject32() failed");
+			errx(1, "audit error: au_to_subject32() failed");
 	} else {
 		/* We know the subject -- so use its value instead. */
 		uid = pwd->pw_uid;
 		gid = pwd->pw_gid;
 		if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid,
 		    gid, pid, pid, &tid)) == NULL)
-			errx(1, "Audit Error: au_to_subject32() failed");
+			errx(1, "audit error: au_to_subject32() failed");
 	}
 	au_write(aufd, tok);
 
 	/* Include the error message. */
 	if ((tok = au_to_text(errmsg)) == NULL)
-		errx(1, "Audit Error: au_to_text() failed");
+		errx(1, "audit error: au_to_text() failed");
 	au_write(aufd, tok);
 
 	if ((tok = au_to_return32(1, errno)) == NULL)
-		errx(1, "Audit Error: au_to_return32() failed");
+		errx(1, "audit error: au_to_return32() failed");
 	au_write(aufd, tok);
 
 	if (au_close(aufd, 1, AUE_login) == -1)
-		errx(1, "Audit Error: au_close() was not committed");
+		errx(1, "audit error: au_close() was not committed");
 }
 
 /*
@@ -181,24 +181,24 @@ audit_logout(void)
  	if (auditon(A_GETCOND, &au_cond, sizeof(int)) < 0) {
 		if (errno == ENOSYS)
 			return;
-		errx(1, "Could not determine audit condition");
+		errx(1, "could not determine audit condition");
 	}
 	if (au_cond == AUC_NOAUDIT)
 		return;
 
 	if ((aufd = au_open()) == -1)
-		errx(1, "Audit Error: au_open() failed");
+		errx(1, "audit error: au_open() failed");
 
 	/* The subject that is created (euid, egid of the current process). */
 	if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid,
 	    pid, &tid)) == NULL)
-		errx(1, "Audit Error: au_to_subject32() failed");
+		errx(1, "audit error: au_to_subject32() failed");
 	au_write(aufd, tok);
 
 	if ((tok = au_to_return32(0, 0)) == NULL)
-		errx(1, "Audit Error: au_to_return32() failed");
+		errx(1, "audit error: au_to_return32() failed");
 	au_write(aufd, tok);
 
 	if (au_close(aufd, 1, AUE_logout) == -1)
-		errx(1, "Audit Record was not committed.");
+		errx(1, "audit record was not committed.");
 }


More information about the svn-src-all mailing list