changeset 5292:a18d0a3ac45b

7115070: (fs) lookupPrincipalByName/lookupPrincipalByGroupName should treat ESRCH as not found Reviewed-by: alanb
author luchsh
date Thu, 24 Nov 2011 11:34:31 +0000
parents 1930908348cb
children 5209ecd67995
files src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c	Tue Sep 04 19:12:04 2012 +0400
+++ b/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c	Thu Nov 24 11:34:31 2011 +0000
@@ -1018,7 +1018,7 @@
 
         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;
@@ -1064,7 +1064,7 @@
         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;