--- libscompat/issetugid.c.orig 2005-12-30 22:23:20.000000000 +0100 +++ libscompat/issetugid.c 2008-06-11 01:02:36.854742920 +0200 @@ -8,20 +8,21 @@ #if !HAVE_ISSETUGID +/* Disabled __libc_enable_secure because it is GLIBC_PRIVATE */ #if HAVE_LIBC_ENABLE_SECURE -extern int __libc_enable_secure; +//extern int __libc_enable_secure; #endif /* HAVE_LIBC_ENABLE_SECURE */ int issetugid() { #if HAVE_LIBC_ENABLE_SECURE - if (__libc_enable_secure) - return 1; - else - return 0; +// if (__libc_enable_secure) return 1; #endif /* HAVE_LIBC_ENABLE_SECURE */ - return 1; /* don't know, better safe than sorry. */ +// return 1; /* don't know, better safe than sorry. */ + if (getuid() != geteuid()) return 1; + if (getgid() != getegid()) return 1; + return 0; } #else static void avoid_error __P((void));