diff options
Diffstat (limited to 'pty.c')
-rw-r--r-- | pty.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -176,8 +176,8 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | |||
176 | *ptyfd = open(buf, O_RDWR | O_NOCTTY); | 176 | *ptyfd = open(buf, O_RDWR | O_NOCTTY); |
177 | if (*ptyfd < 0) | 177 | if (*ptyfd < 0) |
178 | continue; | 178 | continue; |
179 | } | 179 | } |
180 | 180 | ||
181 | /* Open the slave side. */ | 181 | /* Open the slave side. */ |
182 | *ttyfd = open(namebuf, O_RDWR | O_NOCTTY); | 182 | *ttyfd = open(namebuf, O_RDWR | O_NOCTTY); |
183 | if (*ttyfd < 0) { | 183 | if (*ttyfd < 0) { |
@@ -315,11 +315,11 @@ pty_setowner(struct passwd *pw, const char *ttyname) | |||
315 | if (chown(ttyname, pw->pw_uid, gid) < 0) { | 315 | if (chown(ttyname, pw->pw_uid, gid) < 0) { |
316 | if (errno == EROFS && st.st_uid == pw->pw_uid) | 316 | if (errno == EROFS && st.st_uid == pw->pw_uid) |
317 | error("chown(%.100s, %d, %d) failed: %.100s", | 317 | error("chown(%.100s, %d, %d) failed: %.100s", |
318 | ttyname, pw->pw_uid, gid, | 318 | ttyname, pw->pw_uid, gid, |
319 | strerror(errno)); | 319 | strerror(errno)); |
320 | else | 320 | else |
321 | fatal("chown(%.100s, %d, %d) failed: %.100s", | 321 | fatal("chown(%.100s, %d, %d) failed: %.100s", |
322 | ttyname, pw->pw_uid, gid, | 322 | ttyname, pw->pw_uid, gid, |
323 | strerror(errno)); | 323 | strerror(errno)); |
324 | } | 324 | } |
325 | } | 325 | } |