<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -834,6 +834,9 @@ AC_CHECK_FUNCS( \
 	closefrom \
 	gettimeofday \
 	getpeereid \
+	setuid \
+	setresuid \
+	getresuid \
 	strlcat \
 	strlcpy
 )</diff>
      <filename>configure.in</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,10 @@ char *debug_condition = NULL;
  *	Temporary local variables for parsing the configuration
  *	file.
  */
-#ifndef __MINGW32__
+#ifdef HAVE_SETUID
+/*
+ *	Systems that have set/getresuid also have setuid.
+ */
 uid_t server_uid;
 static gid_t server_gid;
 static const char *uid_name = NULL;
@@ -403,7 +406,7 @@ static int r_mkdir(const char *part)
 }
 
 
-#ifndef __MINGW32__
+#ifdef HAVE_SETUID
 int did_setuid = FALSE;
 
 #if defined(HAVE_SETRESUID) &amp;&amp; defined (HAVE_GETRESUID)
@@ -813,9 +816,9 @@ int read_mainconfig(int reload)
 		}
 	}
 
-#ifndef __MINGW32__
+#ifdef HAVE_SETUID
 	/*
-	 *	We should really switch users earlier in the process.
+	 *	Switch users as early as possible.
 	 */
 	if (!switch_users(cs)) exit(1);
 #endif</diff>
      <filename>src/main/mainconfig.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>451d5da93a4f19a37bc5d3ba9fc8d4d97adbeabc</id>
    </parent>
  </parents>
  <author>
    <name>Alan T. DeKok</name>
    <email>aland@freeradius.org</email>
  </author>
  <url>http://github.com/Antti/freeradius-server/commit/ab8297a0d666c19367717169eba68dc7b3ce6b50</url>
  <id>ab8297a0d666c19367717169eba68dc7b3ce6b50</id>
  <committed-date>2009-01-21T05:35:40-08:00</committed-date>
  <authored-date>2009-01-21T05:35:40-08:00</authored-date>
  <message>Check for setuid, and use those checks

Conflicts:

	configure.in</message>
  <tree>59ff87f24a48b839dfb883d872db4a7bc910328f</tree>
  <committer>
    <name>Alan T. DeKok</name>
    <email>aland@freeradius.org</email>
  </committer>
</commit>
