Skip to content

Commit

Permalink
Fixed bug where non-pty TTYs would cause segfault.
Browse files Browse the repository at this point in the history
  • Loading branch information
emptymonkey committed May 13, 2019
1 parent eef824c commit bce139f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions libctty.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ struct sid_node *ctty_get_session(char *tty_name){
return(NULL);
}

if(ctty_uid == stat_buf.st_uid){

if((pid = (int) strtol((pglob.gl_pathv[i]) + 6, NULL, 10)) == 0){
#ifdef DEBUG
fprintf(stderr, "%s: ctty_get_session(): strtol(%lx, %p, %d): %s\n", program_invocation_short_name, \
Expand Down Expand Up @@ -280,7 +278,6 @@ struct sid_node *ctty_get_session(char *tty_name){
}
}
}
}
}
globfree(&pglob);

Expand Down

0 comments on commit bce139f

Please sign in to comment.