diff options
-rw-r--r-- | libpwdgrp/pwd_grp.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index 7ec704ee4..3886facf0 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c | |||
@@ -450,15 +450,7 @@ static void* FAST_FUNC getXXnam(const char *name, unsigned db_and_field_pos) | |||
450 | char *buf; | 450 | char *buf; |
451 | struct passdb *db = &get_S()->db[db_and_field_pos >> 2]; | 451 | struct passdb *db = &get_S()->db[db_and_field_pos >> 2]; |
452 | 452 | ||
453 | if (!db->fp) { | 453 | buf = parse_file(db, name, db_and_field_pos & 3); |
454 | db->fp = fopen_for_read(db->filename); | ||
455 | if (!db->fp) { | ||
456 | return NULL; | ||
457 | } | ||
458 | close_on_exec_on(fileno(db->fp)); | ||
459 | } | ||
460 | |||
461 | buf = parse_common(db->fp, db, name, db_and_field_pos & 3); | ||
462 | return massage_data_for_non_r_func(db, buf); | 454 | return massage_data_for_non_r_func(db, buf); |
463 | } | 455 | } |
464 | 456 | ||