From 2706ee382341eb1c2e5f96c7d90f346696dbd0d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 17 Jul 2001 08:32:35 +0000 Subject: Update. 2001-07-17 Ulrich Drepper * inet/rcmd.c (iruserfopen): Disable implicit locking for the stream. * inet/ruserpass.c (ruserpass): Likewise. * nss/nsswitch.c (nss_parse_file): Likewise. * resolv/res_hconf.c (_res_hconf_init): Likewise. * resolv/res_init.c (__res_vinit): Likewise. * gmon/bb_exit_func.c (__bb_exit_func): Likewise. * misc/getpass.c (getpass): Likewise. * misc/getusershell.c (initshells): Likewise. * misc/getttyent.c (setttyent): Likewise. * misc/mntent_r.c (__setmntent): Likewise. * time/getdate.c (__getdate_r): Likewise. * time/tzfile.c (__tzfile_read): Likewise. * iconv/gconv_conf.c (read_conf_file): Likewise. * intl/localealias.c (read_alias_file): Disable implicit locking for the stream. Use _unlocked functions for glibc. * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Disable implicit locking for the stream. (__get_nprocs_conf): Likewise. (phys_pages_info): Likewise. --- misc/getpass.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'misc/getpass.c') diff --git a/misc/getpass.c b/misc/getpass.c index 2af6b98..e9bd889 100644 --- a/misc/getpass.c +++ b/misc/getpass.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,94,95,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1992,93,94,95,96,97,98,99,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include #include #include @@ -55,7 +56,12 @@ getpass (prompt) out = stderr; } else - out = in; + { + /* We do the locking ourselves. */ + __fsetlocking (tf, FSETLOCKING_BYCALLER); + + out = in; + } flockfile (out); -- cgit v1.1