aboutsummaryrefslogtreecommitdiff
path: root/libpwdgrp/pwd_grp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpwdgrp/pwd_grp.c')
-rw-r--r--libpwdgrp/pwd_grp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
index 867caf096..206519084 100644
--- a/libpwdgrp/pwd_grp.c
+++ b/libpwdgrp/pwd_grp.c
@@ -464,7 +464,7 @@ int getpwent_r(struct passwd *__restrict resultbuf,
464 *result = NULL; /* In case of error... */ 464 *result = NULL; /* In case of error... */
465 465
466 if (!pwf) { 466 if (!pwf) {
467 pwf = fopen(_PATH_PASSWD, "r"); 467 pwf = fopen_for_read(_PATH_PASSWD);
468 if (!pwf) { 468 if (!pwf) {
469 rv = errno; 469 rv = errno;
470 goto ERR; 470 goto ERR;
@@ -511,7 +511,7 @@ int getgrent_r(struct group *__restrict resultbuf,
511 *result = NULL; /* In case of error... */ 511 *result = NULL; /* In case of error... */
512 512
513 if (!grf) { 513 if (!grf) {
514 grf = fopen(_PATH_GROUP, "r"); 514 grf = fopen_for_read(_PATH_GROUP);
515 if (!grf) { 515 if (!grf) {
516 rv = errno; 516 rv = errno;
517 goto ERR; 517 goto ERR;
@@ -558,7 +558,7 @@ int getspent_r(struct spwd *resultbuf, char *buffer,
558 *result = NULL; /* In case of error... */ 558 *result = NULL; /* In case of error... */
559 559
560 if (!spf) { 560 if (!spf) {
561 spf = fopen(_PATH_SHADOW, "r"); 561 spf = fopen_for_read(_PATH_SHADOW);
562 if (!spf) { 562 if (!spf) {
563 rv = errno; 563 rv = errno;
564 goto ERR; 564 goto ERR;
@@ -630,7 +630,7 @@ int initgroups(const char *user, gid_t gid)
630 char buff[PWD_BUFFER_SIZE]; 630 char buff[PWD_BUFFER_SIZE];
631 631
632 rv = -1; 632 rv = -1;
633 grfile = fopen(_PATH_GROUP, "r"); 633 grfile = fopen_for_read(_PATH_GROUP);
634 if (grfile != NULL) { 634 if (grfile != NULL) {
635 635
636 /* We alloc space for 8 gids at a time. */ 636 /* We alloc space for 8 gids at a time. */