Remove getusr function

This function was only used to check if the special case for ssh ended
up properly, since it's not a special case anymore, the function isn't
called anywhere, and has been removed.
This commit is contained in:
Petar Kapris 2021-01-02 20:54:17 +01:00
parent 42731b5ced
commit 5469d5ec00

View file

@ -96,7 +96,6 @@ void logoff_msg();
void killit();
int chk_xsession(); /* seppy: is it a X-Session? */
void killit_xsession(); /* seppy: kill the X-Session */
char *getusr(pid_t pid); /*seppy: get the owner of a running process */
void segfault(); /* seppy: catch segfault and log them */
int chk_xterm(); /* seppy: is it a xterm? */
@ -1129,24 +1128,6 @@ char *host, *user;
#endif
}
char *getusr(pid) /*seppy; returns the name of the user owning process with the Process ID pid */
pid_t pid;
{
char uid[99];
sprintf(path, "/proc/%d/status", pid);
proc_file = fopen(path, "r");
if (!proc_file) {
syslog(LOG_NOTICE, "getusr(): PID %d does not exist. Ignoring.", pid);
return "unknown";
}
while (!fscanf(proc_file, "Uid: %s", uid))
fgets(uid, 98, proc_file);
fclose(proc_file);
return getpwuid(atoi(uid))->pw_name;
}
#ifdef TIMEOUTDX11
Time get_xidle(user, display) /*seppy; returns millicecs since last input event */
char *user;