I have 2 processes called A and B. I currently kill the processes like the following
This is good if process A and process B only have a shell. The functions sends SIGHUP and the person gets logged off. However, if process B executes some kind of suid program, then the above function will kill the suid program. When this happens, process B will still have the shell.Code:void kill_sessions(int count) { int i; int j; int max; max = 20; /*This does properly kill processes that forked suid programs*/ for(i = (count-1); i > 0; i--){ (void)kill(uinfo[i].pid, SIGHUP); /*if((kill(uinfo[i].pid, 0)) == -1 && errno == ESRCH) break;*/ } }
How would I find out all suid programs that process B executes when I don't have root privs? I figure if I know many many suid programs proces B executes, I could just kill each one of them, one by one.



LinkBack URL
About LinkBacks



CornedBee