Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 1997 21:09:36 +1100 (EST)
From:      mark@seeware.DIALix.oz.au
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/3122: _POSIX_SAVED_IDS not defined in 2.2
Message-ID:  <199703271009.VAA00452@putte.seeware.DIALix.oz.au>
Resent-Message-ID: <199703271800.KAA04310@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703271009.VAA00452>