[PATCH 2/2] xfree86: include os.h for FatalError

Mark Kettenis mark.kettenis at xs4all.nl
Sun Jul 28 04:41:54 PDT 2013


> Date: Sun, 28 Jul 2013 10:51:01 +0200
> From: Julien Cristau <jcristau at debian.org>
> Cc: xorg-devel at lists.x.org
> Content-Disposition: inline
> X-Operating-System: Linux 3.2.0-4-amd64 x86_64
> X-XS4ALL-DNSBL-Checked: mxdrop212.xs4all.nl checked 91.121.16.100 against DNS blacklists
> X-CNFS-Analysis: v=2.1 cv=We81NSRX c=1 sm=0 tr=0
>  a=PAG87HyMH6xFeOwRsYjSeg==:117 a=PAG87HyMH6xFeOwRsYjSeg==:17
>  a=UAK43fMWAAAA:8 a=wom5GMh1gUkA:10 a=VZT0cVo4VI0A:10 a=srffwNklkrEA:10
>  a=IN6AV_5xcM8A:10 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=xNf9USuDAAAA:8
>  a=Ed9kp7G8V3AA:10 a=JYLEuv0i0YDh2m6074UA:9 a=CjuIK1q_8ugA:10
>  a=YPTUPuSgPjgA:10
> X-Virus-Scanned: by XS4ALL Virus Scanner
> X-XS4ALL-Spam-Score: 0.0 () none
> X-XS4ALL-Spam: NO
> Envelope-To: mark.kettenis at xs4all.nl
> 
> On Sat, Jul 27, 2013 at 23:38:43 +0200, Mark Kettenis wrote:
> 
> > > From: Julien Cristau <jcristau at debian.org>
> > > Date: Sat, 27 Jul 2013 21:08:29 +0200
> > 
> > The "os.h" header should probably be included even in if
> > HAS_SAVED_IDS_AND_SETEUID is defined, as in that case ErrorF gets
> > called, which also lives in "os.h".  Not sure why that doesn't cause
> > warnings on other systems.  Probably they pull in "os.h" as a
> > side-effect.  So perhaps you should just include it unconditionally
> > with the other Xserver headers.
> > 
> ack
> 
> > Note that the fact that you're hitting this code on GNU/kFreeBSD is
> > almost certainly wrong.  No modern UNIX-line OS should hit that code.
> > 
> That path is used unless defined(SVR4) || defined(__linux__) ||
> defined(CSRG_BASED).  Maybe that should be changed to an autoconf test
> instead...

something like:

#if defined(HAVE_SETEUID) && defined(_POSIX_SAVED_IDS) && _POSIX_SAVED_IDS > 0
...
#endif

with an autoconf check for seteuid(2) should do the trick.


More information about the xorg-devel mailing list