From owner-svn-src-head@FreeBSD.ORG Sun Feb 8 14:04:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A34F810656E8; Sun, 8 Feb 2009 14:04:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 918ED8FC08; Sun, 8 Feb 2009 14:04:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n18E48vN025253; Sun, 8 Feb 2009 14:04:08 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n18E48RK025251; Sun, 8 Feb 2009 14:04:08 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200902081404.n18E48RK025251@svn.freebsd.org> From: Robert Watson Date: Sun, 8 Feb 2009 14:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188311 - in head/sys: nfsserver security/audit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2009 14:04:09 -0000 Author: rwatson Date: Sun Feb 8 14:04:08 2009 New Revision: 188311 URL: http://svn.freebsd.org/changeset/base/188311 Log: Audit the flag argument to the nfssvc(2) system call. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/nfsserver/nfs_syscalls.c head/sys/security/audit/audit_bsm.c Modified: head/sys/nfsserver/nfs_syscalls.c ============================================================================== --- head/sys/nfsserver/nfs_syscalls.c Sun Feb 8 12:40:33 2009 (r188310) +++ head/sys/nfsserver/nfs_syscalls.c Sun Feb 8 14:04:08 2009 (r188311) @@ -137,6 +137,8 @@ nfssvc(struct thread *td, struct nfssvc_ KASSERT(!mtx_owned(&Giant), ("nfssvc(): called with Giant")); + AUDIT_ARG(cmd, uap->flag); + error = priv_check(td, PRIV_NFS_DAEMON); if (error) return (error); Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Sun Feb 8 12:40:33 2009 (r188310) +++ head/sys/security/audit/audit_bsm.c Sun Feb 8 14:04:08 2009 (r188311) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2005 Apple Inc. + * Copyright (c) 1999-2009 Apple Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -639,7 +639,6 @@ kaudit_to_bsm(struct kaudit_record *kar, case AUE_MODLOAD: case AUE_MODUNLOAD: case AUE_MSGSYS: - case AUE_NFS_SVC: case AUE_NTP_ADJTIME: case AUE_PIPE: case AUE_PROFILE: @@ -1017,6 +1016,13 @@ kaudit_to_bsm(struct kaudit_record *kar, } /* FALLTHROUGH */ + case AUE_NFS_SVC: + if (ARG_IS_VALID(kar, ARG_CMD)) { + tok = au_to_arg32(1, "request", ar->ar_arg_cmd); + kau_write(rec, tok); + } + break; + case AUE_UMOUNT: UPATH1_VNODE1_TOKENS; break;