From owner-p4-projects Sat Jun 8 15:12:14 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 569B237B423; Sat, 8 Jun 2002 15:11:56 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 02D6D37B412 for ; Sat, 8 Jun 2002 15:11:34 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g58MBYd70857 for perforce@freebsd.org; Sat, 8 Jun 2002 15:11:34 -0700 (PDT) (envelope-from amigus@FreeBSD.org) Date: Sat, 8 Jun 2002 15:11:34 -0700 (PDT) Message-Id: <200206082211.g58MBYd70857@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to amigus@FreeBSD.org using -f From: Adam Migus Subject: PERFORCE change 12579 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12579 Change 12579 by amigus@amigus_vmganyopa on 2002/06/08 15:11:31 Temporary fix to allow suid programs to work. Affected files ... ... //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#48 edit ... //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#35 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#48 (text+ko) ==== @@ -1158,6 +1158,14 @@ return (EINVAL); /* + * XXX: Allow processes with root privilege to set labels outside + * their range, so suid things like "su" work. This WILL go away + * when we figure out the 'correct' solution... + */ + if (!suser_cred(cred, 0)) + return (0); + + /* * The new single must be in the old range. */ if (!mac_biba_single_in_range(new, subj)) ==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#35 (text+ko) ==== @@ -1151,6 +1151,14 @@ return (EINVAL); /* + * XXX: Allow processes with root privilege to set labels outside + * their range, so suid things like "su" work. This WILL go away + * when we figure out the 'correct' solution... + */ + if (!suser_cred(cred, 0)) + return (0); + + /* * The new single must be in the old range. */ if (!mac_mls_single_in_range(new, subj)) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message