diff options
author | Mathieu Sauve-Frankel <msf@cvs.openbsd.org> | 2005-05-21 19:18:52 +0000 |
---|---|---|
committer | Mathieu Sauve-Frankel <msf@cvs.openbsd.org> | 2005-05-21 19:18:52 +0000 |
commit | 4beef505658c349066f186e35d61192dc7b13e44 (patch) | |
tree | 53dc60e8e011d0f60327bd210413df802341848d | |
parent | 0196610a51a1adbf3128c47f06d926fa8e0b217a (diff) |
hostapd doesn't really do much without root privileges, so check for that early
ok reyk@
-rw-r--r-- | usr.sbin/hostapd/hostapd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/hostapd/hostapd.c b/usr.sbin/hostapd/hostapd.c index 4040dd070bd..ca4f4661b37 100644 --- a/usr.sbin/hostapd/hostapd.c +++ b/usr.sbin/hostapd/hostapd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostapd.c,v 1.9 2005/04/14 10:59:56 reyk Exp $ */ +/* $OpenBSD: hostapd.c,v 1.10 2005/05/21 19:18:51 msf Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -367,6 +367,9 @@ main(int argc, char *argv[]) daemon(0, 0); } + if (geteuid()) + hostapd_fatal("need root privileges\n"); + /* Parse the configuration file */ hostapd_parse_file(cfg); |