From dfda4bf46acb119a858827121a0111adcd23151a Mon Sep 17 00:00:00 2001 From: Jonathan Lu Date: Thu, 24 Nov 2011 11:34:31 +0000 Subject: [PATCH] 7115070: (fs) lookupPrincipalByName/lookupPrincipalByGroupName should treat ESRCH as not found Reviewed-by: alanb --- jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c index f41409b051e..57882b6a473 100644 --- a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c +++ b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c @@ -996,7 +996,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0(JNIEnv* env, jclass this, if (res != 0 || p == NULL || p->pw_name == NULL || *(p->pw_name) == '\0') { /* not found or error */ - if (errno != 0 && errno != ENOENT) + if (errno != 0 && errno != ENOENT && errno != ESRCH) throwUnixException(env, errno); } else { uid = p->pw_uid; @@ -1042,7 +1042,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0(JNIEnv* env, jclass this, retry = 0; if (res != 0 || g == NULL || g->gr_name == NULL || *(g->gr_name) == '\0') { /* not found or error */ - if (errno != 0 && errno != ENOENT) { + if (errno != 0 && errno != ENOENT && errno != ESRCH) { if (errno == ERANGE) { /* insufficient buffer size so need larger buffer */ buflen += ENT_BUF_SIZE;