Enable user access to pinephone hardware kernel interface through openrc script, remove setuid 0 requirement

This commit is contained in:
Maarten van Gompel 2021-01-30 13:31:12 +01:00
parent 00cf2ba3ec
commit ca88d3029e
5 changed files with 17 additions and 16 deletions

View file

@ -48,9 +48,5 @@ int main(int argc, char *argv[]) {
"sh -c 'echo %d > /sys/class/leds/%s:%s/brightness'",
brightness, color, type
);
if (setuid(0)) {
fprintf(stderr, "setuid(0) failed\n");
} else {
return system(command);
}
return system(command);
}