[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sun Jun 25 16:07:01 UTC 2023


The branch, master has been updated
       via  9f5216912e0 vfs_gpfs: Move call to load GPFS library
       via  25e1e487a5f vfs_gpfs: Check error from gpfswrap_lib_init
       via  3b72136f678 vfs_gpfs: Register smbd process with GPFS
       via  34b9c54ff2f gpfswrap: Add wrapper for gpfs_register_cifs_export
      from  a75378e3542 s4:kdc: translate sdb_entry->old[er]_keys into hdb_add_history_key()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9f5216912e0b2f2d0e74d4dbd10f3fb5017de331
Author: Christof Schmitt <cs at samba.org>
Date:   Wed May 31 11:29:49 2023 -0700

    vfs_gpfs: Move call to load GPFS library
    
    Load the GPFS library from the connect function and leave the module
    init for only the module registration.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Sun Jun 25 16:06:37 UTC 2023 on atb-devel-224

commit 25e1e487a5f32ec5ae3cd8e9f49535eae0358e88
Author: Christof Schmitt <cs at samba.org>
Date:   Wed May 31 11:16:19 2023 -0700

    vfs_gpfs: Check error from gpfswrap_lib_init
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 3b72136f6782d9704a197ab7b17201df6ff4d60d
Author: Christof Schmitt <cs at samba.org>
Date:   Wed May 31 11:13:51 2023 -0700

    vfs_gpfs: Register smbd process with GPFS
    
    Issue API call to tell the file system that this is a Samba process.
    This fixed the GPFS handling of Samba since the rename of smbd processes
    in commit 5955dc1e4fd.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15381
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 34b9c54ff2f089dbffe65bdc69f3024b5d3efd5c
Author: Christof Schmitt <cs at samba.org>
Date:   Wed May 24 14:06:36 2023 -0700

    gpfswrap: Add wrapper for gpfs_register_cifs_export
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15381
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/util/gpfswrap.c        | 12 ++++++++++++
 lib/util/gpfswrap.h        |  1 +
 source3/modules/vfs_gpfs.c | 26 ++++++++++++++++++--------
 3 files changed, 31 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/gpfswrap.c b/lib/util/gpfswrap.c
index d05358e141e..2f15bf452cf 100644
--- a/lib/util/gpfswrap.c
+++ b/lib/util/gpfswrap.c
@@ -28,6 +28,7 @@ static int (*gpfs_putacl_fn)(const char *pathname, int flags, void *acl);
 static int (*gpfs_get_realfilename_path_fn)(const char *pathname,
 					    char *filenamep,
 					    int *len);
+static int (*gpfs_register_cifs_export_fn)(void);
 static int (*gpfs_set_winattrs_path_fn)(const char *pathname,
 					int flags,
 					struct gpfs_winattr *attrs);
@@ -71,6 +72,7 @@ int gpfswrap_init(void)
 	gpfs_fgetacl_fn		      = dlsym(l, "gpfs_getacl_fd");
 	gpfs_putacl_fn		      = dlsym(l, "gpfs_putacl");
 	gpfs_get_realfilename_path_fn = dlsym(l, "gpfs_get_realfilename_path");
+	gpfs_register_cifs_export_fn  = dlsym(l, "gpfs_register_cifs_export");
 	gpfs_set_winattrs_path_fn     = dlsym(l, "gpfs_set_winattrs_path");
 	gpfs_set_winattrs_fn	      = dlsym(l, "gpfs_set_winattrs");
 	gpfs_get_winattrs_fn	      = dlsym(l, "gpfs_get_winattrs");
@@ -141,6 +143,16 @@ int gpfswrap_get_realfilename_path(const char *pathname,
 	return gpfs_get_realfilename_path_fn(pathname, filenamep, len);
 }
 
+int gpfswrap_register_cifs_export(void)
+{
+	if (gpfs_register_cifs_export_fn == NULL) {
+		errno = ENOSYS;
+		return -1;
+	}
+
+	return gpfs_register_cifs_export_fn();
+}
+
 int gpfswrap_set_winattrs_path(const char *pathname,
 			       int flags,
 			       struct gpfs_winattr *attrs)
diff --git a/lib/util/gpfswrap.h b/lib/util/gpfswrap.h
index 1e74496c060..e387a56446b 100644
--- a/lib/util/gpfswrap.h
+++ b/lib/util/gpfswrap.h
@@ -34,6 +34,7 @@ int gpfswrap_putacl(const char *pathname, int flags, void *acl);
 int gpfswrap_get_realfilename_path(const char *pathname,
 				   char *filenamep,
 				   int *len);
+int gpfswrap_register_cifs_export(void);
 int gpfswrap_set_winattrs_path(const char *pathname,
 			       int flags,
 			       struct gpfs_winattr *attrs);
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 969e7744fce..3398879c900 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -2041,7 +2041,24 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
 		return 0;
 	}
 
-	gpfswrap_lib_init(0);
+	ret = gpfswrap_init();
+	if (ret < 0) {
+		DBG_ERR("Could not load GPFS library.\n");
+		return ret;
+	}
+
+	ret = gpfswrap_lib_init(0);
+	if (ret < 0) {
+		DBG_ERR("Could not open GPFS device file: %s\n",
+			strerror(errno));
+		return ret;
+	}
+
+	ret = gpfswrap_register_cifs_export();
+	if (ret < 0) {
+		DBG_ERR("Failed to register with GPFS: %s\n", strerror(errno));
+		return ret;
+	}
 
 	config = talloc_zero(handle->conn, struct gpfs_config_data);
 	if (!config) {
@@ -2605,13 +2622,6 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
 static_decl_vfs;
 NTSTATUS vfs_gpfs_init(TALLOC_CTX *ctx)
 {
-	int ret;
-
-	ret = gpfswrap_init();
-	if (ret != 0) {
-		DEBUG(1, ("Could not initialize GPFS library wrapper\n"));
-	}
-
 	return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "gpfs",
 				&vfs_gpfs_fns);
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list