You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/29 11:02:23 UTC
svn commit: r769723 - in
/commons/sandbox/runtime/trunk/src/main/native/os/unix: group.c user.c
Author: mturk
Date: Wed Apr 29 09:02:20 2009
New Revision: 769723
URL: http://svn.apache.org/viewvc?rev=769723&view=rev
Log:
Check for ENOENT
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c
commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c?rev=769723&r1=769722&r2=769723&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c Wed Apr 29 09:02:20 2009
@@ -104,7 +104,9 @@
rc = getgrnam_r(name, &grb, buffer, sizeof(buffer), &gr);
if (rc) {
- if (ACR_STATUS_IS_EACCES(ACR_FROM_OS_ERROR(rc)))
+ if (ACR_STATUS_IS_ENOENT(ACR_FROM_OS_ERROR(rc)))
+ return NULL;
+ else if (ACR_STATUS_IS_EACCES(ACR_FROM_OS_ERROR(rc)))
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ESECURITY, 0);
else
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO,
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c?rev=769723&r1=769722&r2=769723&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c Wed Apr 29 09:02:20 2009
@@ -117,7 +117,9 @@
rc = getpwnam_r(name, &pwb, buffer, sizeof(buffer), &pw);
if (rc) {
- if (ACR_STATUS_IS_EACCES(ACR_FROM_OS_ERROR(rc)))
+ if (ACR_STATUS_IS_ENOENT(ACR_FROM_OS_ERROR(rc)))
+ return NULL;
+ else if (ACR_STATUS_IS_EACCES(ACR_FROM_OS_ERROR(rc)))
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ESECURITY, 0);
else
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO,