[PATCH xserver] check for elevated privileges not uid=0 (V2)

Alan Coopersmith alan.coopersmith at oracle.com
Mon Oct 10 10:58:55 PDT 2011


>  AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
>  		strtol getopt getopt_long vsnprintf walkcontext backtrace \
>  		getisax getzoneid shmctl64 strcasestr ffs vasprintf])
> +
> +dnl Checks for uid/gid functions used for testing elevated privileges
> +AC_CHECK_FUNC([issetugid],
> +        AC_DEFINE(HASSETUGID,1,[Has issetugid() function]))
> +AC_CHECK_FUNC([getresuid],
> +        AC_DEFINE(HASGETRESUID,1,[Has getresuid() & getresgid() functions]))
> +

The libX11 checks used the special names for historical compatibility with imake
builds.   Since you're introducing these long past the point we stopped
supporting imake, you should just use the autoconf standard forms - just add
issetugid & getresuid to the AC_CHECK_FUNCS list of functions and then use
HAVE_ISSETUGID and HAVE_GETRESUID in the xorg-config.h.in & the ifdefs in the
code.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list