From owner-p4-projects@FreeBSD.ORG Sun Sep 18 17:27:06 2005 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 542AA16A421; Sun, 18 Sep 2005 17:27:06 +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 2F4CC16A41F for ; Sun, 18 Sep 2005 17:27:06 +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 F2BE243D45 for ; Sun, 18 Sep 2005 17:27:05 +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 j8IHR5XT053824 for ; Sun, 18 Sep 2005 17:27:05 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8IHR5u2053821 for perforce@freebsd.org; Sun, 18 Sep 2005 17:27:05 GMT (envelope-from csjp@freebsd.org) Date: Sun, 18 Sep 2005 17:27:05 GMT Message-Id: <200509181727.j8IHR5u2053821@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 83852 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: Sun, 18 Sep 2005 17:27:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=83852 Change 83852 by csjp@csjp_xor on 2005/09/18 17:26:46 Add a test which attempts to use setextattr to get around the policy to manipulate checksum information. Affected files ... .. //depot/projects/trustedbsd/mac/tools/regression/mac/mac_chkexec/mac_chkexec.t#4 edit Differences ... ==== //depot/projects/trustedbsd/mac/tools/regression/mac/mac_chkexec/mac_chkexec.t#4 (text+ko) ==== @@ -11,7 +11,7 @@ sysctl security.mac.chkexec.enforce=0 rm -fr /tmp/prog.sh -echo "1..10" +echo "1..11" # # Make sure that we are dis-allowing the execution of programs which do @@ -142,3 +142,14 @@ else echo ok 10 fi + +# +# Attempt to set the EA using setextattr, this should fail when the policy +# is loaded. +# +setextattr system chkexec test /tmp/prog.sh +if [ $? -eq 0 ]; then + echo not ok 11 +else + echo ok 11 +fi