diff options
Diffstat (limited to 'mdk-stage1/dietlibc/libshell/glob.c')
-rw-r--r-- | mdk-stage1/dietlibc/libshell/glob.c | 10 |
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) */ |