[Pommed-commits] r468 - trunk/pommed
jblache at alioth.debian.org
jblache at alioth.debian.org
Sun May 25 10:51:26 UTC 2008
Author: jblache
Date: 2008-05-25 10:51:25 +0000 (Sun, 25 May 2008)
New Revision: 468
Modified:
trunk/pommed/pommed.c
Log:
Move UID check in main().
Modified: trunk/pommed/pommed.c
===================================================================
--- trunk/pommed/pommed.c 2008-05-18 11:11:59 UTC (rev 467)
+++ trunk/pommed/pommed.c 2008-05-25 10:51:25 UTC (rev 468)
@@ -551,13 +551,6 @@
const char *prop;
- if (geteuid() != 0)
- {
- logmsg(LOG_ERR, "root privileges needed for SMBIOS machine detection");
-
- return MACHINE_ERROR;
- }
-
/* Check vendor name */
prop = SMBIOSGetVendorName();
@@ -691,6 +684,13 @@
}
}
+ if (geteuid() != 0)
+ {
+ logmsg(LOG_ERR, "pommed needs root privileges to operate\n");
+
+ exit(1);
+ }
+
if (!console)
{
openlog("pommed", LOG_PID, LOG_DAEMON);
More information about the Pommed-commits
mailing list