Check for AF_SUN_SETUGID
authorDavid Bartley <dtbartle@maltodextrin.csclub.uwaterloo.ca>
Tue, 16 Sep 2008 04:58:35 +0000 (04:58 +0000)
committerDavid Bartley <dtbartle@maltodextrin.csclub.uwaterloo.ca>
Tue, 16 Sep 2008 04:58:35 +0000 (04:58 +0000)
sysdeps/unix/sysv/solaris2/kopensolaris-gnu/dl-sysdep.h

index 885e799..9ba9ed9 100644 (file)
 #include <sys/auxv.h>
 #include_next <dl-sysdep.h>
 
+#ifdef SHARED
+# define SECURE_DECIDED
+#else
+# define SECURE_DECIDED        __libc_enable_secure_decided = 1;
+#endif
+
 #define DL_PLATFORM_AUXV                                    \
       case AT_SUN_EXECNAME:                                 \
        GLRO(dl_sun_execname) = (void *) av->a_un.a_val;        \
+       break;                                                  \
+      case AT_SUN_AUXFLAGS:                                 \
+       if (av->a_un.a_val & AF_SUN_SETUGID)                    \
+         {                                                     \
+               __libc_enable_secure = 1;                           \
+               SECURE_DECIDED                                      \
+         }                                                     \
        break;