0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

updated for version 7.0-202

This commit is contained in:
Bram Moolenaar
2007-02-27 15:48:28 +00:00
parent 602eb74de6
commit 311d982b6f
10 changed files with 49 additions and 10 deletions

View File

@@ -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;