summaryrefslogtreecommitdiff
path: root/pty.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-02-05 12:42:17 +0000
committerKevin Steves <stevesk@pobox.com>2001-02-05 12:42:17 +0000
commitef4eea9badfb65f05ac24f786b710cc3f27f0e43 (patch)
treef54abef181ccd6ad5285a5c16b4c159d8b74e932 /pty.c
parentd2ddda4efab29fd8663757634773fa10e557e0f3 (diff)
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
[many files; did this manually to our top-level source dir] unexpand and remove end-of-line whitespace; ok markus@
Diffstat (limited to 'pty.c')
-rw-r--r--pty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pty.c b/pty.c
index 384e921b5..83b219b90 100644
--- a/pty.c
+++ b/pty.c
@@ -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 }