@ -184,10 +184,19 @@ int main (int argc, char *argv[])
boolctrl_down=false;
boolalt_down=false;
boolhide_event=false;
boolestablished=false;
booltestrun=false;
if(argc==2){
if(strcmp(argv[1],"checkactive")==0){
testrun=true;
}
}
// Create the output pipe
PipeHandlercontrolpipe;
while(1){
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");
return5;
@ -197,8 +206,12 @@ int main (int argc, char *argv[])
fd=find_keyboard();
if(fd==-1){
printf("Could not find your keyboard!\n");
if(established)
sleep(1);
else
return4;
}
else{
// Print Device Name
ioctl(fd,EVIOCGNAME(sizeof(name)),name);
printf("Reading From : (%s)\n",name);
@ -207,12 +220,16 @@ int main (int argc, char *argv[])
fprintf(stderr,"Unable to open /dev/uinput or /dev/misc/uinput (char device 10:223).\nPossible causes: Device node inexistent or kernel not compiled with evdev user level driver support or permission denied.\n");