Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2009 20:44:17 GMT
From:      "Christian S.J. Peron" <csjp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 160213 for review
Message-ID:  <200904042044.n34KiHsk015984@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

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

Change 160213 by csjp@hvm02 on 2009/04/04 20:43:34

	- Fix code example in man page
	- make it clear we are after the audit id

Affected files ...

.. //depot/projects/trustedbsd/openbsm/NEWS#38 edit
.. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#16 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/NEWS#38 (text+ko) ====

@@ -13,6 +13,8 @@
   definitions of constants in audit_fcntl.h.
 - A bug, introduced in OpenBSM 1.1 alpha 4, in which AUT_RETURN32 tokens
   generated by audit_submit(3) were improperly encoded has been fixed.
+- Fix example in audit_submit(3) man page.  Also, make it clear that we want
+  the audit ID as the argument.
 
 OpenBSM 1.1 beta 1
 
@@ -445,4 +447,4 @@
   to support reloading of kernel event table.
 - Allow comments in /etc/security configuration files.
 
-$P4: //depot/projects/trustedbsd/openbsm/NEWS#37 $
+$P4: //depot/projects/trustedbsd/openbsm/NEWS#38 $

==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#16 (text+ko) ====

@@ -27,7 +27,7 @@
 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#15 $
+.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#16 $
 .\"
 .Dd January 18, 2008
 .Dt audit_submit 3
@@ -101,9 +101,12 @@
 int
 audit_bad_su(char *from_login, char *to_login)
 {
+	struct auditinfo_addr aia;
 	int error;
 
-	error = audit_submit(AUE_su, getuid(), 1, EPERM,
+	if (getaudit_addr(&aia, sizeof(aia) < 0)
+		err(1, "getaudit_addr");
+	error = audit_submit(AUE_su, aia.ai_auid, EPERM, 1,
 	    "bad su from %s to %s", from_login, to_login);
 	return (error);
 }



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