@ -176,14 +185,8 @@ int main (int argc, char *argv[])
boolalt_down=false;
boolalt_down=false;
boolhide_event=false;
boolhide_event=false;
// Initialize signal handlers
// Create the output pipe
sigfillset(&block_mask);
PipeHandlercontrolpipe;
usr_action.sa_handler=handle_sigterm;
usr_action.sa_mask=block_mask;
usr_action.sa_flags=0;
sigaction(SIGTERM,&usr_action,NULL);
atexit(tearDownPipe);
if((getuid())!=0){
if((getuid())!=0){
printf("You are not root! This WILL NOT WORK!\nDO NOT attempt to bypass security restrictions, e.g. by changing keyboard permissions or owner, if you want the SAK system to remain secure...\n");
printf("You are not root! This WILL NOT WORK!\nDO NOT attempt to bypass security restrictions, e.g. by changing keyboard permissions or owner, if you want the SAK system to remain secure...\n");
@ -231,9 +234,6 @@ int main (int argc, char *argv[])
return1;
return1;
}
}
// Create the output pipe
setupPipe();
while(1){
while(1){
if((rd=read(fd,ev,size*2))<size){
if((rd=read(fd,ev,size*2))<size){
@ -276,7 +276,5 @@ int main (int argc, char *argv[])