Merge pull request #3413 from lambdageek/reflection-split
[mono.git] / mono / io-layer / security.c
index 6486839d0aa40d98650ed4ad9f1080368d619002..d1bf3d0362c5b355311ab9af67c9c7c636872383 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
-
-/* Disclaimers */
-
-#if defined(__GNUC__)
-#ifndef HAVE_GETRESUID
-       #warning getresuid not supported. WindowsImpersonationContext wont work
-#endif
-#ifndef HAVE_SETRESUID
-       #warning setresuid not supported. WindowsImpersonationContext wont work
-#endif
-#endif
-
-
 gboolean 
 ImpersonateLoggedOnUser (gpointer handle)
 {
-       uid_t token = (uid_t) handle;
+       uid_t token = (uid_t) GPOINTER_TO_INT (handle);
 #ifdef HAVE_SETRESUID
        if (setresuid (-1, token, getuid ()) < 0)
                return FALSE;