From 3c84ded68a9106ac87886e173e75dd3dde33c231 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Tue, 13 Dec 2005 11:35:31 +0000 Subject: Convert internal users of chmod/*stat*, minimize change for __strsep --- libc/inet/rpc/rcmd.c | 4 ++-- libc/inet/rpc/ruserpass.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libc/inet/rpc') diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index c2eed87d4..36e942f9e 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -385,7 +385,7 @@ iruserfopen (char *file, uid_t okuser) root, if writeable by anyone but the owner, or if hardlinked anywhere, quit. */ cp = NULL; - if (lstat (file, &st)) + if (__lstat (file, &st)) cp = "lstat failed"; else if (!S_ISREG (st.st_mode)) cp = "not regular file"; @@ -394,7 +394,7 @@ iruserfopen (char *file, uid_t okuser) res = fopen (file, "r"); if (!res) cp = "cannot open"; - else if (fstat (fileno (res), &st) < 0) + else if (__fstat (fileno (res), &st) < 0) cp = "fstat failed"; else if (st.st_uid && st.st_uid != okuser) cp = "bad owner"; diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index b7bc36864..43291808d 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -182,7 +182,7 @@ next: break; case PASSWD: if (__strcmp(*aname, "anonymous") && - fstat(fileno(cfile), &stb) >= 0 && + __fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { __printf(_("Error: .netrc file is readable by others.")); __printf(_("Remove password or make file unreadable by others.")); @@ -201,7 +201,7 @@ next: break; case ACCOUNT: #if 0 - if (fstat(fileno(cfile), &stb) >= 0 + if (__fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { __printf("Error: .netrc file is readable by others."); __printf("Remove account or make file unreadable by others."); -- cgit v1.2.3