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

@ -28,11 +28,6 @@ int main(int argc, char *argv[]) {
argc--;
brightness = atoi(argv[argc--]);
if (setuid(0)) {
fprintf(stderr, "setuid(0) failed\n");
return 1;
}
if (access(pbpScreen, F_OK) != -1) {
writeFile(pbpScreen, brightness);
fprintf(stderr, "Set PBP brightness to %d\n", brightness);