22 lines
609 B
Plaintext
22 lines
609 B
Plaintext
$OpenBSD: patch-ntpd_ntpd_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
|
|
--- ntpd/ntpd.c.orig 2004-02-25 00:58:13.000000000 -0500
|
|
+++ ntpd/ntpd.c 2004-06-04 09:39:45.000000000 -0400
|
|
@@ -399,11 +399,16 @@ ntpdmain(
|
|
}
|
|
#endif
|
|
|
|
-#if defined(HAVE_GETUID) && !defined(MPE) /* MPE lacks the concept of root */
|
|
+#if (defined(HAVE_GETUID) || defined(HAVE_GETEUID)) \
|
|
+ && !defined(MPE) /* MPE lacks the concept of root */
|
|
{
|
|
uid_t uid;
|
|
|
|
+#if defined(HAVE_GETEUID)
|
|
+ uid = geteuid();
|
|
+#else
|
|
uid = getuid();
|
|
+#endif
|
|
if (uid)
|
|
{
|
|
msyslog(LOG_ERR, "ntpd: must be run as root, not uid %ld", (long)uid);
|