diff options
author | Damien Miller <djm@mindrot.org> | 2000-03-02 23:31:50 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-03-02 23:31:50 +1100 |
commit | c4cea3e5c71c8f2d48ee22ea05d26a47fb47ad29 (patch) | |
tree | c16a3f258f67064d05b6c46677792353d6258b68 | |
parent | c7d8dbbb0dfdeb3f854d58c9bf084db2b72ded77 (diff) |
- Avoid warning message with Unix98 ptys
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | pty.c | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -6,6 +6,7 @@ | |||
6 | to detect library and header location _and_ ensure library has proper | 6 | to detect library and header location _and_ ensure library has proper |
7 | RSA support built in (this is a problem with OpenSSL 0.9.5). | 7 | RSA support built in (this is a problem with OpenSSL 0.9.5). |
8 | - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de | 8 | - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de |
9 | - Avoid warning message with Unix98 ptys | ||
9 | 10 | ||
10 | 20000207 | 11 | 20000207 |
11 | - Removed SOCKS code. Will support through a ProxyCommand. | 12 | - Removed SOCKS code. Will support through a ProxyCommand. |
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$Id: pty.c,v 1.12 2000/03/02 12:30:53 damien Exp $"); | 17 | RCSID("$Id: pty.c,v 1.13 2000/03/02 12:31:50 damien Exp $"); |
18 | 18 | ||
19 | #ifdef HAVE_UTIL_H | 19 | #ifdef HAVE_UTIL_H |
20 | # include <util.h> | 20 | # include <util.h> |
@@ -187,9 +187,9 @@ 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 | if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) | 190 | if ((chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) && (errno != ENOENT)) |
191 | error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); | 191 | error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); |
192 | if (chmod(ttyname, (mode_t) 0666) < 0) | 192 | if ((chmod(ttyname, (mode_t) 0666) < 0) && (errno != ENOENT)) |
193 | error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); | 193 | error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); |
194 | } | 194 | } |
195 | 195 | ||