require vanilla-pipe to run as root

This commit is contained in:
MattKC 2024-11-14 03:38:28 -08:00
parent e9bd0fa30f
commit 20f48c01a6

View file

@ -1,12 +1,18 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include "vanilla.h" #include "vanilla.h"
#include "wpa.h" #include "wpa.h"
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
if (geteuid() != 0) {
pprint("vanilla-pipe must be run as root\n");
return 1;
}
if (argc < 2) { if (argc < 2) {
pprint("vanilla-pipe - brokers a connection between Vanilla and the Wii U\n"); pprint("vanilla-pipe - brokers a connection between Vanilla and the Wii U\n");
pprint("--------------------------------------------------------------------------------\n"); pprint("--------------------------------------------------------------------------------\n");