summaryrefslogtreecommitdiff
path: root/libacl/acl_get_entry.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2003-02-27 02:41:22 +0000
committerNathan Scott <nathans@sgi.com>2003-02-27 02:41:22 +0000
commit1b200578a5ef4241a4c91a82bd5898a9230d06c5 (patch)
tree49a5b32c25407cde4477f724b2c7b071fc95076a /libacl/acl_get_entry.c
parent94e247b50e006004dbc1e3345bc4ec7dfbf03b1d (diff)
downloadacl-1b200578a5ef4241a4c91a82bd5898a9230d06c5.tar.gz
Make libacl routines more robust in the presence of callers who don't
check for failed function return codes and then call back into libacl.
Diffstat (limited to 'libacl/acl_get_entry.c')
-rw-r--r--libacl/acl_get_entry.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libacl/acl_get_entry.c b/libacl/acl_get_entry.c
index 05a84d0..cc49764 100644
--- a/libacl/acl_get_entry.c
+++ b/libacl/acl_get_entry.c
@@ -27,8 +27,11 @@ int
acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p)
{
acl_obj *acl_obj_p = ext2int(acl, acl);
- if (!acl_obj_p)
+ if (!acl_obj_p) {
+ if (entry_p)
+ *entry_p = NULL;
return -1;
+ }
if (!entry_p) {
errno = EINVAL;
return -1;