about summary refs log tree commit diff
path: root/inet
diff options
context:
space:
mode:
Diffstat (limited to 'inet')
-rw-r--r--inet/rcmd.c2
-rw-r--r--inet/ruserpass.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 42871f7950..ad72108b6a 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -551,7 +551,7 @@ iruserfopen (const char *file, uid_t okuser)
     cp = _("not regular file");
   else
     {
-      res = fopen (file, "r");
+      res = fopen (file, "rc");
       if (!res)
 	cp = _("cannot open");
       else if (__fxstat64 (_STAT_VER, fileno (res), &st) < 0)
diff --git a/inet/ruserpass.c b/inet/ruserpass.c
index e0f1a52b0e..e5b2caf4dc 100644
--- a/inet/ruserpass.c
+++ b/inet/ruserpass.c
@@ -114,7 +114,7 @@ ruserpass(host, aname, apass)
 	buf = alloca (strlen (hdir) + 8);
 
 	__stpcpy (__stpcpy (buf, hdir), "/.netrc");
-	cfile = fopen(buf, "r");
+	cfile = fopen(buf, "rc");
 	if (cfile == NULL) {
 		if (errno != ENOENT)
 			warn("%s", buf);