]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:vfs_glusterfs: make use of lp_parm_substituted_string()
authorStefan Metzmacher <metze@samba.org>
Tue, 15 Oct 2019 12:04:27 +0000 (14:04 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:32 +0000 (10:25 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_glusterfs.c

index a28b48dae4548a3e41ea783745d28ad8a8463025..d67ba89391c650f218b90589ffc5c74aba376771 100644 (file)
@@ -268,6 +268,8 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
                               const char *service,
                               const char *user)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        const char *volfile_servers;
        const char *volume;
        char *logfile;
@@ -281,14 +283,21 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
                ret = -1;
                goto done;
        }
-       logfile = lp_parm_talloc_string(tmp_ctx, SNUM(handle->conn), "glusterfs",
-                                      "logfile", NULL);
+       logfile = lp_parm_substituted_string(tmp_ctx,
+                                            lp_sub,
+                                            SNUM(handle->conn),
+                                            "glusterfs",
+                                            "logfile",
+                                            NULL);
 
        loglevel = lp_parm_int(SNUM(handle->conn), "glusterfs", "loglevel", -1);
 
-       volfile_servers = lp_parm_talloc_string(tmp_ctx, SNUM(handle->conn),
-                                              "glusterfs", "volfile_server",
-                                              NULL);
+       volfile_servers = lp_parm_substituted_string(tmp_ctx,
+                                                    lp_sub,
+                                                    SNUM(handle->conn),
+                                                    "glusterfs",
+                                                    "volfile_server",
+                                                    NULL);
        if (volfile_servers == NULL) {
                volfile_servers = DEFAULT_VOLFILE_SERVER;
        }