From owner-freebsd-bugs Thu Mar 27 10:00:30 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA04347 for bugs-outgoing; Thu, 27 Mar 1997 10:00:30 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA04310; Thu, 27 Mar 1997 10:00:22 -0800 (PST) Resent-Date: Thu, 27 Mar 1997 10:00:22 -0800 (PST) Resent-Message-Id: <199703271800.KAA04310@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:"from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA03975 for" ; Thu, 27 Mar 1997 09:57:53.-0800 (PST) Received: from melbourne.dialix.com.au (melbourne.dialix.com.au [203.12.2.24]) by who.cdrom.com (8.8.5/8.6.11) with ESMTP id CAA03033 for ; Thu, 27 Mar 1997 02:36:51 -0800 (PST) Received: (from seeuucp@localhost) by melbourne.dialix.com.au with UUCP id VAA15292 for FreeBSD-gnats-submit@freebsd.org; Thu, 27 Mar 1997 21:34:08 +1100 (EST) Received: from putte.seeware.DIALix.oz.au (putte.seeware.DIALix.oz.au [10.0.0.1]) by doorway.seeware.DIALix.oz.au (8.8.5/8.7.3) with ESMTP id VAA16525 for ; Thu, 27 Mar 1997 21:09:37 +1100 (EST) Received: (from mark@localhost) by putte.seeware.DIALix.oz.au (8.8.5/8.7.3) id VAA00452; Thu, 27 Mar 1997 21:09:36 +1100 (EST) Message-Id: <199703271009.VAA00452@putte.seeware.DIALix.oz.au> Date: Thu, 27 Mar 1997 21:09:36 +1100 (EST) From: mark@seeware.DIALix.oz.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/3122: _POSIX_SAVED_IDS not defined in 2.2 Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 3122 >Category: kern >Synopsis: _POSIX_SAVED_IDS not defined in 2.2 >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 27 10:00:18 PST 1997 >Last-Modified: >Originator: Mark Hannon >Organization: None >Release: FreeBSD 2.2-RELEASE i386 >Environment: >Description: A week ago I reported a problem with Xinside's dtmail client not starting under 2.2-RELEASE. The same program had worked under 2.1.[567] and 2.2-GAMMA. The error message was "Mailer has not been properly installed and cannot be run because the execution group is incorrectly set" dtmail is sgid bin and the mail spool permissions are set to 775. After some hints from Joerg I managed to trace the execution on both a 2.2 and 2.1.7 kernel (this required the removal of a check which dissallows ktrace in an suid/sgid process). Upon examination I saw that the failure point in 2.2 was in a failing call to the setgid call. The call failed with a permission error in 2.2 but not in 2.1.7. Further digging showed that /sys/sys/unistd.h has changed in 2.2 and says: #ifdef _NOT_AVAILABLE #define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ #endif The code in /sys/kern/kern_prot.c checks for _POSIX_SAVED_IDS before including the code to allow setgid. I could not find a #def _NOT_AVAILABLE in the include files. A recompile of a new kernel with the unistd.h file from 2.2-GAMMA has solved my problems. >How-To-Repeat: Try to run dtmail (part of Xinside's CDE) under 2.2-RELEASE >Fix: See above >Audit-Trail: >Unformatted: