diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-02-27 15:48:28 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-02-27 15:48:28 +0000 |
commit | 311d982b6fbcad0cbbc7ca4358a0cd580b16fbc0 (patch) | |
tree | 9fac6a814447866636599c5b52c828f6348ae772 /src/pty.c | |
parent | 602eb74de6245dcad1ec77e919a7597789ef1c0e (diff) | |
download | vim-git-311d982b6fbcad0cbbc7ca4358a0cd580b16fbc0.tar.gz |
updated for version 7.0-202v7.0.202
Diffstat (limited to 'src/pty.c')
-rw-r--r-- | src/pty.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -330,7 +330,7 @@ OpenPTY(ttyn) if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) return -1; strncpy(TtyName, ttyname(f), sizeof(TtyName)); - if (geteuid() && mch_access(TtyName, R_OK | W_OK)) + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) { close(f); return -1; @@ -394,7 +394,7 @@ OpenPTY(ttyn) q[0] = *l; q[1] = *d; #ifndef MACOS - if (geteuid() && mch_access(TtyName, R_OK | W_OK)) + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) { close(f); continue; |