fprintf(stderr,"[tsak] Failed to release exclusive input device lock");
fprintf(stderr,"[tsak] Failed to release exclusive input device lock\n");
}
close(keyboard_fds[current_keyboard]);
}
// Unset the exclusive file lock
if(mPipe_fd_out!=-1){
structflockfl;
if(fcntl(mPipe_fd_out,F_UNLCK,&fl)==-1){
fprintf(stderr,"[tsak] Failed to release exclusive pipe lock\n");
}
close(mPipe_fd_out);
}
#if 1
// Restart now
// Note that the execl function never returns
@ -498,14 +507,14 @@ int main (int argc, char *argv[])
}
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("[tsak] 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;
}
// Find keyboards
find_keyboards();
if(keyboard_fd_num==0){
printf("Could not find any usable keyboard(s)!\n");
printf("[tsak] Could not find any usable keyboard(s)!\n");
if(depcheck==true){
return50;
}
@ -658,10 +667,10 @@ int main (int argc, char *argv[])