vfs_gpfs: call SMB_VFS_NEXT_CONNECT() before running some module initialization code
authorRalph Boehme <slow@samba.org>
Fri, 6 Aug 2021 10:03:38 +0000 (12:03 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 26 Aug 2021 19:18:31 +0000 (19:18 +0000)
No change in behaviour. Prepares for a subsequent commit that checks for IPC shares.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
source3/modules/vfs_gpfs.c

index d74bc43db0e098de1678f35d1100a12f120ffafa..01c635e3f81bb0cfde83dcfd59f763666e28a80e 100644 (file)
@@ -1873,6 +1873,11 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
        int ret;
        bool check_fstype;
 
+       ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
+       if (ret < 0) {
+               return ret;
+       }
+
        gpfswrap_lib_init(0);
 
        config = talloc_zero(handle->conn, struct gpfs_config_data);
@@ -1882,12 +1887,6 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
                return -1;
        }
 
-       ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
-       if (ret < 0) {
-               TALLOC_FREE(config);
-               return ret;
-       }
-
        check_fstype = lp_parm_bool(SNUM(handle->conn), "gpfs",
                                    "check_fstype", true);