X-Git-Url: http://andersk.mit.edu/gitweb/nss_nonlocal.git/blobdiff_plain/01ce539c8311c02dde9590c150b9b8b4346c83fd..22562df07d1d1e7bb6a8adba067d8945f293c841:/nonlocal-passwd.c diff --git a/nonlocal-passwd.c b/nonlocal-passwd.c index e915ea0..29e922b 100644 --- a/nonlocal-passwd.c +++ b/nonlocal-passwd.c @@ -329,6 +329,11 @@ _nss_nonlocal_getpwnam_r(const char *name, struct passwd *pwd, if (status != NSS_STATUS_SUCCESS) return status; + if (strcmp(name, pwd->pw_name) != 0) { + syslog(LOG_ERR, "nss_nonlocal: discarding user %s from lookup for user %s\n", pwd->pw_name, name); + return NSS_STATUS_NOTFOUND; + } + status = check_nonlocal_uid(name, pwd->pw_uid, errnop); if (status != NSS_STATUS_SUCCESS) return status;