mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148395
@ -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 New Issue
Block a user