summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ruserok.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/ruserok.c')
-rw-r--r--src/lib/libc/net/ruserok.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/net/ruserok.c b/src/lib/libc/net/ruserok.c
index 21646c156b..4d0adfbe4e 100644
--- a/src/lib/libc/net/ruserok.c
+++ b/src/lib/libc/net/ruserok.c
@@ -118,7 +118,7 @@ iruserok_sa(const void *raddr, int rlen, int superuser, const char *ruser,
118 118
119 sa = (struct sockaddr *)raddr; 119 sa = (struct sockaddr *)raddr;
120 first = 1; 120 first = 1;
121 hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r"); 121 hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "re");
122again: 122again:
123 if (hostf) { 123 if (hostf) {
124 if (__ivaliduser_sa(hostf, sa, rlen, luser, ruser) == 0) { 124 if (__ivaliduser_sa(hostf, sa, rlen, luser, ruser) == 0) {
@@ -144,7 +144,7 @@ again:
144 */ 144 */
145 uid = geteuid(); 145 uid = geteuid();
146 (void)seteuid(pwd->pw_uid); 146 (void)seteuid(pwd->pw_uid);
147 hostf = fopen(pbuf, "r"); 147 hostf = fopen(pbuf, "re");
148 (void)seteuid(uid); 148 (void)seteuid(uid);
149 149
150 if (hostf == NULL) 150 if (hostf == NULL)