mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
powerd(8) requires root permissions to run so notify the user if they
try to start it without this. Submitted by: Philip S. Schulz MFC after: 2 days
This commit is contained in:
parent
1f320556fd
commit
c996f586de
1 changed files with 4 additions and 0 deletions
|
|
@ -269,6 +269,10 @@ main(int argc, char * argv[])
|
|||
vflag = 0;
|
||||
apm_fd = -1;
|
||||
|
||||
/* User must be root to control frequencies. */
|
||||
if (geteuid() != 0)
|
||||
errx(1, "must be root to run");
|
||||
|
||||
while ((ch = getopt(argc, argv, "a:b:i:n:p:r:v")) != EOF)
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
|
|
|
|||
Loading…
Reference in a new issue