summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-06-22 15:46:13 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-22 19:27:39 +0200
commite7b58146d8576ae8bf4eaf2ec1063fe7697e05b8 (patch)
tree7fd10434de78ce64560f2f83152c7607c8c6f07a /source3/modules
parentb9a15f1bfad30a824f9ec87bc9f7c65adf50dae0 (diff)
downloadsamba-e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8.tar.gz
samba-e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8.tar.bz2
samba-e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8.zip
s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
gpfs2smb_acl can leave errno!=0 around even if it returned a correct result!=NULL. We can only rely on errno being set if another error condition (in this case result==NULL) indicates an error. If result!=NULL, errno is undefined and can be anything. This leads to SAFE_FREE(result) further down even in the success case. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_gpfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index d4009c44d8..a165cfadd8 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -641,8 +641,8 @@ static SMB_ACL_T gpfsacl_get_posix_acl(const char *path, gpfs_aclType_t type)
pacl->acl_nace));
result = gpfs2smb_acl(pacl);
- if (result == NULL) {
- goto done;
+ if (result != NULL) {
+ errno = 0;
}
done: