aboutsummaryrefslogtreecommitdiff
path: root/inet/ruserpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/ruserpass.c')
-rw-r--r--inet/ruserpass.c3
1 files changed, 3 insertions, 0 deletions
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, '.');