]> andersk Git - nss_nonlocal.git/blobdiff - nonlocal-passwd.c
Check that a nonlocal lookup by id returns the right id.
[nss_nonlocal.git] / nonlocal-passwd.c
index 0d71fe35d118dcd6bb2c8f978e024be1b08b6b30..00763ed19d88c6730533fec4f7258abeb683e59e 100644 (file)
@@ -399,6 +399,11 @@ _nss_nonlocal_getpwuid_r(uid_t uid, struct passwd *pwd,
     if (status != NSS_STATUS_SUCCESS)
        return status;
 
+    if (uid != pwd->pw_uid) {
+       syslog(LOG_ERR, "nss_nonlocal: discarding uid %d from lookup for uid %d\n", pwd->pw_uid, uid);
+       return NSS_STATUS_NOTFOUND;
+    }
+
     status = check_nonlocal_passwd(pwd->pw_name, pwd, errnop);
     if (status != NSS_STATUS_SUCCESS)
        return status;
This page took 0.040212 seconds and 4 git commands to generate.