From 8303bc49a45d5bab0cdbd4f2d793088f600f715f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Nov 2009 15:53:04 -0800 Subject: 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. --- source3/modules/vfs_audit.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/modules/vfs_audit.c') diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c index 258246e42db..d256c2f7da3 100644 --- a/source3/modules/vfs_audit.c +++ b/source3/modules/vfs_audit.c @@ -78,15 +78,18 @@ static int audit_syslog_priority(vfs_handle_struct *handle) static int audit_connect(vfs_handle_struct *handle, const char *svc, const char *user) { int result; - + + result = SMB_VFS_NEXT_CONNECT(handle, svc, user); + if (result < 0) { + return result; + } + openlog("smbd_audit", LOG_PID, audit_syslog_facility(handle)); syslog(audit_syslog_priority(handle), "connect to service %s by user %s\n", svc, user); - result = SMB_VFS_NEXT_CONNECT(handle, svc, user); - - return result; + return 0; } static void audit_disconnect(vfs_handle_struct *handle) -- cgit v1.2.1