2004-10-15 Dan Williams <dcbw@redhat.com>
---- We have a website ---- http://people.redhat.com/dcbw/NetworkManager Patch from Robert Paskowitz: * src/NetworkManager.c - (main): Make sure we are run as root * src/NetworkManagerDevice.c - Fix type in ad-hoc setting function Patch from Thom May: * src/backends/NetworkManagerDebian.c - Make Debian backend compile again git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@243 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "NetworkManager.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
@@ -552,6 +553,12 @@ int main( int argc, char *argv[] )
|
||||
gboolean become_daemon = TRUE;
|
||||
gboolean enable_test_devices = FALSE;
|
||||
GMainLoop *loop = NULL;
|
||||
|
||||
if ((int)getuid() != 0)
|
||||
{
|
||||
printf( "You must be root to run NetworkManager!\n");
|
||||
return (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Parse options */
|
||||
while (1)
|
||||
|
Reference in New Issue
Block a user