diff options
Diffstat (limited to 'pty.c')
-rw-r--r-- | pty.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$Id: pty.c,v 1.15 2000/03/09 10:27:51 damien Exp $"); | 17 | RCSID("$Id: pty.c,v 1.16 2000/03/09 11:31:13 damien Exp $"); |
18 | 18 | ||
19 | #ifdef HAVE_UTIL_H | 19 | #ifdef HAVE_UTIL_H |
20 | # include <util.h> | 20 | # include <util.h> |
@@ -187,12 +187,10 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | |||
187 | void | 187 | void |
188 | pty_release(const char *ttyname) | 188 | pty_release(const char *ttyname) |
189 | { | 189 | { |
190 | #ifndef PTY_REMOVED_ON_CLOSE | ||
191 | if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) | 190 | if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) |
192 | error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); | 191 | error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); |
193 | if (chmod(ttyname, (mode_t) 0666) < 0) | 192 | if (chmod(ttyname, (mode_t) 0666) < 0) |
194 | error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); | 193 | error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); |
195 | #endif /* PTY_REMOVED_ON_CLOSE */ | ||
196 | } | 194 | } |
197 | 195 | ||
198 | /* Makes the tty the processes controlling tty and sets it to sane modes. */ | 196 | /* Makes the tty the processes controlling tty and sets it to sane modes. */ |