summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_readonly.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-11-30 15:53:04 -0800
committerJeremy Allison <jra@samba.org>2009-11-30 15:53:04 -0800
commit8303bc49a45d5bab0cdbd4f2d793088f600f715f (patch)
treede386a449efb20c1cbb4fc3a62a6e6bb588d4810 /source3/modules/vfs_readonly.c
parentb852a3494aa3af3d69175f68669609b23fefc1bb (diff)
downloadsamba-8303bc49a45d5bab0cdbd4f2d793088f600f715f.tar.gz
samba-8303bc49a45d5bab0cdbd4f2d793088f600f715f.tar.bz2
samba-8303bc49a45d5bab0cdbd4f2d793088f600f715f.zip
Restructure the connect function code to always call
down to NEXT-> before initializing. This allows us to do cleanup (by calling DISCONNECT) if initialization fails. Also fix vfs_acl_xattr which was failing to call the NEXT connect function. Jeremy.
Diffstat (limited to 'source3/modules/vfs_readonly.c')
-rw-r--r--source3/modules/vfs_readonly.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/modules/vfs_readonly.c b/source3/modules/vfs_readonly.c
index f736028168..afb167f045 100644
--- a/source3/modules/vfs_readonly.c
+++ b/source3/modules/vfs_readonly.c
@@ -62,6 +62,11 @@ static int readonly_connect(vfs_handle_struct *handle,
const char **period = lp_parm_string_list(SNUM(handle->conn),
(handle->param ? handle->param : MODULE_NAME),
"period", period_def);
+ int ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
+
+ if (ret < 0) {
+ return ret;
+ }
if (period && period[0] && period[1]) {
int i;
@@ -85,11 +90,11 @@ static int readonly_connect(vfs_handle_struct *handle,
conn->vuid_cache.next_entry = 0;
}
- return SMB_VFS_NEXT_CONNECT(handle, service, user);
+ return 0;
} else {
- return 1;
+ return 0;
}
}