summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libshell/glob.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-06-01 14:22:41 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-06-01 14:22:41 +0000
commit82d101b415a99d06fb724267d18c3be842ed2b1b (patch)
tree10852becb6bb26b9d269580c311d992bac03f854 /mdk-stage1/dietlibc/libshell/glob.c
parentc9b71511379834d398dda23fe8e278ab48a7d3c3 (diff)
downloaddrakx-backup-do-not-use-82d101b415a99d06fb724267d18c3be842ed2b1b.tar
drakx-backup-do-not-use-82d101b415a99d06fb724267d18c3be842ed2b1b.tar.gz
drakx-backup-do-not-use-82d101b415a99d06fb724267d18c3be842ed2b1b.tar.bz2
drakx-backup-do-not-use-82d101b415a99d06fb724267d18c3be842ed2b1b.tar.xz
drakx-backup-do-not-use-82d101b415a99d06fb724267d18c3be842ed2b1b.zip
slight modifs to get ppp and pppoe stuff compile better
Diffstat (limited to 'mdk-stage1/dietlibc/libshell/glob.c')
-rw-r--r--mdk-stage1/dietlibc/libshell/glob.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mdk-stage1/dietlibc/libshell/glob.c b/mdk-stage1/dietlibc/libshell/glob.c
index e8c9e8a79..34d09d87a 100644
--- a/mdk-stage1/dietlibc/libshell/glob.c
+++ b/mdk-stage1/dietlibc/libshell/glob.c
@@ -174,14 +174,8 @@ int glob(const char *pattern, int flags, int errfunc(const char * epath, int eer
ptr = strchr(ptr2, '/');
if (ptr != NULL)
*ptr = '\0';
- setpwent();
- while (((p = getpwent()) != NULL)) {
- if (!strcmp(p->pw_name, ptr2)) {
- home_dir = p->pw_dir;
- break;
- }
- }
- endpwent();
+ if (((p = getpwnam(ptr2)) != NULL))
+ home_dir = p->pw_dir;
}
if (home_dir != NULL) {
i = strlen(home_dir) + strlen(pattern_); /* pessimistic (the ~ case) */