mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Drop launch-ether-wake
The helper binary is being dropped and etherwake is enabled for CAP_NET_RAW. This allows execution by unprivileged users as needed by the web user interface (nobody). Reported-by: Albert Schwarzkopf <ipfire@quitesimple.org> Fixes: #12562 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -27,7 +27,7 @@ SUID_PROGS = squidctrl sshctrl ipfirereboot \
|
||||
ipsecctrl timectrl dhcpctrl suricatactrl \
|
||||
rebuildhosts backupctrl collectdctrl \
|
||||
logwatch wioscan wiohelper openvpnctrl firewallctrl \
|
||||
wirelessctrl getipstat qosctrl launch-ether-wake \
|
||||
wirelessctrl getipstat qosctrl \
|
||||
redctrl syslogdctrl extrahdctrl sambactrl \
|
||||
smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
|
||||
setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes \
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* This file is part of the Wake-on-LAN GUI AddOn
|
||||
*
|
||||
* This program is distributed under the terms of the GNU General Public
|
||||
* Licence. See the file COPYING for details.
|
||||
*
|
||||
* Copyright (C) 2006-03-03 weizen_42
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include "setuid.h"
|
||||
|
||||
|
||||
#define BUFFER_SIZE 512
|
||||
|
||||
char command[BUFFER_SIZE];
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (!(initsetuid()))
|
||||
exit(1);
|
||||
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s %s", argv[2], argv[1]);
|
||||
safe_system(command);
|
||||
|
||||
/* Send magic packet with broadcast flag set. */
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s -b %s", argv[2], argv[1]);
|
||||
safe_system(command);
|
||||
|
||||
return(0);
|
||||
}
|
||||
Reference in New Issue
Block a user