aboutsummaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
Diffstat (limited to 'inet')
-rw-r--r--inet/rcmd.c4
-rw-r--r--inet/ruserpass.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index b240c8d263..de00bfaf13 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -75,6 +75,7 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#include <pwd.h>
#include <errno.h>
#include <stdio.h>
+#include <stdio_ext.h>
#include <ctype.h>
#include <string.h>
#include <libintl.h>
@@ -437,6 +438,9 @@ iruserfopen (const char *file, uid_t okuser)
return NULL;
}
+ /* No threads use this stream. */
+ __fsetlocking (res, FSETLOCKING_BYCALLER);
+
return res;
}
diff --git a/inet/ruserpass.c b/inet/ruserpass.c
index d610f4240d..020733fc53 100644
--- a/inet/ruserpass.c
+++ b/inet/ruserpass.c
@@ -39,6 +39,7 @@ static char sccsid[] = "@(#)ruserpass.c 8.3 (Berkeley) 4/2/94";
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
+#include <stdio_ext.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -119,6 +120,8 @@ ruserpass(host, aname, apass)
warn("%s", buf);
return (0);
}
+ /* No threads use this stream. */
+ __fsetlocking (cfile, FSETLOCKING_BYCALLER);
if (__gethostname(myname, sizeof(myname)) < 0)
myname[0] = '\0';
mydomain = __strchrnul(myname, '.');