From 82d101b415a99d06fb724267d18c3be842ed2b1b Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 1 Jun 2001 14:22:41 +0000 Subject: slight modifs to get ppp and pppoe stuff compile better --- mdk-stage1/dietlibc/libshell/glob.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'mdk-stage1/dietlibc/libshell/glob.c') 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) */ -- cgit v1.2.1