Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jul 2016 14:17:36 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302526 - head/sys/kern
Message-ID:  <201607101417.u6AEHaFC083508@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Sun Jul 10 14:17:36 2016
New Revision: 302526
URL: https://svnweb.freebsd.org/changeset/base/302526

Log:
  In process-descriptor close(2) and fstat(2), audit target process
  information.  pgkill(2) already audits target process ID.
  
  MFC after:	3 days
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/kern/sys_procdesc.c

Modified: head/sys/kern/sys_procdesc.c
==============================================================================
--- head/sys/kern/sys_procdesc.c	Sun Jul 10 13:42:33 2016	(r302525)
+++ head/sys/kern/sys_procdesc.c	Sun Jul 10 14:17:36 2016	(r302526)
@@ -1,10 +1,15 @@
 /*-
- * Copyright (c) 2009 Robert N. M. Watson
+ * Copyright (c) 2009, 2016 Robert N. M. Watson
  * All rights reserved.
  *
  * This software was developed at the University of Cambridge Computer
  * Laboratory with support from a grant from Google, Inc.
  *
+ * Portions of this software were developed by BAE Systems, the University of
+ * Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL
+ * contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent
+ * Computing (TC) research program.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -383,6 +388,7 @@ procdesc_close(struct file *fp, struct t
 		sx_xunlock(&proctree_lock);
 	} else {
 		PROC_LOCK(p);
+		AUDIT_ARG_PROCESS(p);
 		if (p->p_state == PRS_ZOMBIE) {
 			/*
 			 * If the process is already dead and just awaiting
@@ -529,6 +535,7 @@ procdesc_stat(struct file *fp, struct st
 	sx_slock(&proctree_lock);
 	if (pd->pd_proc != NULL) {
 		PROC_LOCK(pd->pd_proc);
+		AUDIT_ARG_PROCESS(pd->pd_proc);
 
 		/* Set birth and [acm] times to process start time. */
 		pstart = pd->pd_proc->p_stats->p_start;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607101417.u6AEHaFC083508>