PERFORCE change 199873 for review

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Oct 7 22:14:14 UTC 2011


http://p4web.freebsd.org/@@199873?ac=10

Change 199873 by pjd at pjd_anger on 2011/10/07 22:13:54

	White-space cleanups.

Affected files ...

.. //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#47 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#47 (text+ko) ====

@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#46 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#47 $
  */
 
 #include <sys/types.h>
@@ -79,7 +79,7 @@
 
 
 /*
- * LaunchD flag (Mac OS X and, maybe, FreeBSD only.)  See launchd(8) and 
+ * LaunchD flag (Mac OS X and, maybe, FreeBSD only.)  See launchd(8) and
  * http://wiki.freebsd.org/launchd for more information.
  *
  *      In order for auditd to work "on demand" with launchd(8) it can't:
@@ -133,7 +133,7 @@
 	if (cf == NULL) {
 		auditd_log_err("malloc failed: %m");
 		return (NULL);
-	}	
+	}
 
 	len = readlink(AUDIT_CURRENT_LINK, cf, MAXPATHLEN - 1);
 	if (len < 0) {
@@ -142,7 +142,7 @@
 	}
 
 	/* readlink() doesn't terminate string. */
-	cf[len] = '\0';	
+	cf[len] = '\0';
 
 	return (cf);
 }
@@ -160,7 +160,7 @@
 	/* If lastfile is NULL try to get it from the 'current' link.  */
 	if (lastfile == NULL)
 		lastfile = get_curfile();
-	
+
 	if (lastfile != NULL) {
 		len = strlen(lastfile) + 1;
 		oldname = (char *)malloc(len);
@@ -176,16 +176,16 @@
 				    "Could not rename %s to %s: %m", oldname,
 				    lastfile);
 			else {
-				/* 
+				/*
 				 * Remove the 'current' symlink since the link
-				 * is now invalid. 
+				 * is now invalid.
 				 */
 				(void) unlink(AUDIT_CURRENT_LINK);
 				auditd_log_notice( "renamed %s to %s",
 				    oldname, lastfile);
 				audit_warn_closefile(lastfile);
 			}
-		} else 
+		} else
 			auditd_log_err( "Could not rename %s to %s", oldname,
 			    lastfile);
 		free(lastfile);
@@ -229,13 +229,13 @@
 	 * enabled) so updated the cached state as well.
 	 */
 	auditd_set_state(AUD_STATE_ENABLED);
-	
+
 	/*
 	 *  Create 'current' symlink.  Recover from crash, if needed.
 	 */
 	if (auditd_new_curlink(newfile) != 0)
-               	auditd_log_err("auditd_new_curlink(\"%s\") failed: %s: %m",
-		     newfile, auditd_strerror(err)); 
+		auditd_log_err("auditd_new_curlink(\"%s\") failed: %s: %m",
+		     newfile, auditd_strerror(err));
 
 	lastfile = newfile;
 	auditd_log_notice("New audit file is %s", newfile);
@@ -306,19 +306,18 @@
 	/* Generate an audit record. */
 	err = auditd_gen_record(AUE_audit_startup, NULL);
 	if (err)
-		auditd_log_err("auditd_gen_record(AUE_audit_startup) %s: %m", 
+		auditd_log_err("auditd_gen_record(AUE_audit_startup) %s: %m",
 		    auditd_strerror(err));
-	
+
 	if (auditd_config_controls() == 0)
 		auditd_log_info("Audit controls init successful");
 	else
 		auditd_log_err("Audit controls init failed");
-	
 }
 
 
 /*
- * Close auditd pid file and trigger mechanism. 
+ * Close auditd pid file and trigger mechanism.
  */
 static int
 close_misc(void)
@@ -352,7 +351,7 @@
 
 	err = auditd_gen_record(AUE_audit_shutdown, NULL);
 	if (err)
-		auditd_log_err("auditd_gen_record(AUE_audit_shutdown) %s: %m", 
+		auditd_log_err("auditd_gen_record(AUE_audit_shutdown) %s: %m",
 		    auditd_strerror(err));
 
 	/* Flush contents. */
@@ -513,7 +512,7 @@
 
 	/*
 	 * Message processing is done here.
- 	 */
+	 */
 	switch(trigger) {
 	case AUDIT_TRIGGER_LOW_SPACE:
 		auditd_log_notice("Got low space trigger");
@@ -554,7 +553,7 @@
 		 * send SIGTERM.
 		 */
 		if (!launchd_flag) {
-			auditd_log_info("auditd exiting.");	
+			auditd_log_info("auditd exiting.");
 			exit (err);
 		}
 		break;
@@ -570,7 +569,7 @@
 		err = auditd_expire_trails(audit_warn_expired);
 		if (err)
 			auditd_log_err("auditd_expire_trails(): %s",
-		    	    auditd_strerror(err));
+			    auditd_strerror(err));
 		break;
 
 	default:
@@ -609,7 +608,7 @@
 	int ret;
 
 	auditd_reap_children();
-	
+
 	if (launchd_flag)
 		ret = close_misc();
 	else
@@ -630,7 +629,7 @@
 
 	/*
 	 * Configure event to class mappings in kernel.
-	 */	
+	 */
 	cnt = auditd_set_evcmap();
 	if (cnt < 0) {
 		auditd_log_err("auditd_set_evcmap() failed: %m");
@@ -646,7 +645,7 @@
 	 */
 	err = auditd_set_namask();
 	if (err) {
-		auditd_log_err("auditd_set_namask() %s: %m", 
+		auditd_log_err("auditd_set_namask() %s: %m",
 		    auditd_strerror(err));
 		ret = -1;
 	} else
@@ -657,12 +656,12 @@
 	 */
 	err = auditd_set_policy();
 	if (err) {
-		auditd_log_err("auditd_set_policy() %s: %m", 
+		auditd_log_err("auditd_set_policy() %s: %m",
 		    auditd_strerror(err));
 		ret = -1;
 	} else
 		auditd_log_debug("Set audit policy in kernel.");
-	
+
 	/*
 	 * Configure audit trail log size in kernel.
 	 */
@@ -673,9 +672,9 @@
 		ret = -1;
 	} else
 		auditd_log_debug("Set audit trail size in kernel.");
-	
+
 	/*
-	 * Configure audit trail volume minimum free percentage of blocks in 
+	 * Configure audit trail volume minimum free percentage of blocks in
 	 * kernel.
 	 */
 	err = auditd_set_minfree();
@@ -684,11 +683,11 @@
 		    auditd_strerror(err));
 		ret = -1;
 	} else
-		auditd_log_debug( 
+		auditd_log_debug(
 		    "Set audit trail min free percent in kernel.");
 
 	/*
-	 * Configure host address in the audit kernel information. 
+	 * Configure host address in the audit kernel information.
 	 */
 	err = auditd_set_host();
 	if (err) {
@@ -730,7 +729,7 @@
 	 */
 	err = auditd_prevent_audit();
 	if (err) {
-		auditd_log_err("auditd_prevent_audit() %s: %m", 
+		auditd_log_err("auditd_prevent_audit() %s: %m",
 		    auditd_strerror(err));
 		fail_exit();
 	}
@@ -785,7 +784,7 @@
 	 * likely the wheel group.  Is there a better way to deal with this?
 	 */
 	grp = getgrnam(AUDIT_REVIEW_GROUP);
-	if (grp != NULL) 
+	if (grp != NULL)
 		audit_review_gid = grp->gr_gid;
 #endif
 
@@ -815,7 +814,7 @@
 	setup();
 
 	/*
-	 * auditd_wait_for_events() shouldn't return unless something is wrong. 
+	 * auditd_wait_for_events() shouldn't return unless something is wrong.
 	 */
 	auditd_wait_for_events();
 


More information about the p4-projects mailing list