#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;