From owner-p4-projects@FreeBSD.ORG Mon Feb 13 01:11:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31BF816A423; Mon, 13 Feb 2006 01:11:55 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E681616A420 for ; Mon, 13 Feb 2006 01:11:54 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64DBD43D6D for ; Mon, 13 Feb 2006 01:11:51 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1D1Bp8v033816 for ; Mon, 13 Feb 2006 01:11:51 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1D1BoiB033813 for perforce@freebsd.org; Mon, 13 Feb 2006 01:11:50 GMT (envelope-from csjp@freebsd.org) Date: Mon, 13 Feb 2006 01:11:50 GMT Message-Id: <200602130111.k1D1BoiB033813@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 91656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 01:11:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=91656 Change 91656 by csjp@csjp_xor on 2006/02/13 01:11:27 Drop audit failures for reasons which were caused by the operating system instead of reasons caused by the user. An example might be failure to create a set of pipes via pipe(2) or the failure to fork a process. Discussed with: wsalamon Affected files ... .. //depot/projects/trustedbsd/audit3/usr.bin/su/su.c#7 edit Differences ... ==== //depot/projects/trustedbsd/audit3/usr.bin/su/su.c#7 (text+ko) ==== @@ -226,9 +226,6 @@ nargv = malloc(sizeof(char *) * (size_t)(argc + 4)); if (nargv == NULL) { -#ifdef USE_BSM_AUDIT - audit_su(getuid(), AUDIT_SU_FAILURE); -#endif errx(1, "malloc failure"); } @@ -262,9 +259,6 @@ username = strdup(pwd->pw_name); if (username == NULL) { -#ifdef USE_BSM_AUDIT - audit_su(getuid(), AUDIT_SU_FAILURE); -#endif err(1, "strdup failure"); } @@ -451,9 +445,6 @@ statusp = 1; if (pipe(fds) == -1) { PAM_END(); -#ifdef USE_BSM_AUDIT - audit_su(getuid(), AUDIT_SU_FAILURE); -#endif err(1, "pipe"); } child_pid = fork(); @@ -487,18 +478,12 @@ if (tcgetpgrp(STDERR_FILENO) == child_pgrp) tcsetpgrp(STDERR_FILENO, getpgrp()); if (pid == -1) { -#ifdef USE_BSM_AUDIT - audit_su(getuid(), AUDIT_SU_FAILURE); -#endif err(1, "waitpid"); } PAM_END(); exit(WEXITSTATUS(statusp)); case -1: PAM_END(); -#ifdef USE_BSM_AUDIT - audit_su(getuid(), AUDIT_SU_FAILURE); -#endif err(1, "fork"); case 0: close(fds[1]);