diff options
author | Miles Bader <miles@gnu.org> | 1996-07-26 21:01:48 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-26 21:01:48 +0000 |
commit | d4eaba51e77c56a64525896723991aaa033c74f3 (patch) | |
tree | 00fd0112857bc2489aa3a44ea2c4b35caeef132a /login | |
parent | fa8463e5ed7fa292e919bbddbeaa1b7012242220 (diff) | |
download | glibc-d4eaba51e77c56a64525896723991aaa033c74f3.zip glibc-d4eaba51e77c56a64525896723991aaa033c74f3.tar.gz glibc-d4eaba51e77c56a64525896723991aaa033c74f3.tar.bz2 |
(getutid_r): Mark UTMP_DATA->loc_utmp invalid if a search fails.
Diffstat (limited to 'login')
-rw-r--r-- | login/getutid_r.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/login/getutid_r.c b/login/getutid_r.c index 347bbf3..73bcb3d 100644 --- a/login/getutid_r.c +++ b/login/getutid_r.c @@ -65,6 +65,7 @@ getutid_r (const struct utmp *id, struct utmp **utmp, if (read (utmp_data->ut_fd, &utmp_data->ubuf, sizeof (struct utmp)) != sizeof (struct utmp)) { + utmp_data->loc_utmp = 0; /* Mark loc_utmp invalid. */ errno = ESRCH; return -1; } @@ -87,6 +88,7 @@ getutid_r (const struct utmp *id, struct utmp **utmp, if (read (utmp_data->ut_fd, &utmp_data->ubuf, sizeof (struct utmp)) != sizeof (struct utmp)) { + utmp_data->loc_utmp = 0; /* Mark loc_utmp invalid. */ errno = ESRCH; return -1; } |