Index: filed.c ================================================================== --- filed.c +++ filed.c @@ -743,18 +743,33 @@ return; } /* Resolve a username to a UID */ static int filed_user_lookup(const char *user, uid_t *user_id) { + char *next; + uid_t user_id_check; +#ifndef NO_GETPWNAM struct passwd *ent; ent = getpwnam(user); - if (ent == NULL) { + if (ent != NULL) { + *user_id = ent->pw_uid; + + return(0); + } +#endif + + user_id_check = strtoull(user, &next, 10); + if (next == NULL) { + return(1); + } + + if (next[0] != '\0') { return(1); } - *user_id = ent->pw_uid; + *user_id = user_id_check; return(0); } /* Run process */