]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: use 'ceph_new' for config-param prefix
authorShachar Sharon <ssharon@redhat.com>
Mon, 5 Aug 2024 13:21:10 +0000 (16:21 +0300)
committerGünther Deschner <gd@samba.org>
Thu, 8 Aug 2024 12:34:37 +0000 (12:34 +0000)
Use explicit 'ceph_new' prefix to each of the ceph specific config
parameters to avoid confusion with legacy 'vfs_ceph' module. Hence,
users will have in their smb.conf a format similar to:

...
[smbshare]
        vfs objects = ceph_new
        ceph_new: config_file = /etc/ceph/ceph.conf
        ceph_new: user_id = user1
        ceph_new: filesystem = fs1
        ...

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

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/modules/vfs_ceph_new.c

index cf7e6b121db9e62d5d7fa9e4910b7cee177f36f3..25e78444fb53f60a73c28b0d0051740153bfc09c 100644 (file)
@@ -159,10 +159,11 @@ static int cephmount_cache_remove(struct cephmount_cached *entry)
 static char *cephmount_get_cookie(TALLOC_CTX * mem_ctx, const int snum)
 {
        const char *conf_file =
-           lp_parm_const_string(snum, "ceph", "config_file", ".");
-       const char *user_id = lp_parm_const_string(snum, "ceph", "user_id", "");
+           lp_parm_const_string(snum, "ceph_new", "config_file", ".");
+       const char *user_id =
+           lp_parm_const_string(snum, "ceph_new", "user_id", "");
        const char *fsname =
-           lp_parm_const_string(snum, "ceph", "filesystem", "");
+           lp_parm_const_string(snum, "ceph_new", "filesystem", "");
        return talloc_asprintf(mem_ctx, "(%s/%s/%s)", conf_file, user_id,
                               fsname);
 }
@@ -174,11 +175,11 @@ static struct ceph_mount_info *cephmount_mount_fs(const int snum)
        struct ceph_mount_info *mnt = NULL;
        /* if config_file and/or user_id are NULL, ceph will use defaults */
        const char *conf_file =
-           lp_parm_const_string(snum, "ceph", "config_file", NULL);
+           lp_parm_const_string(snum, "ceph_new", "config_file", NULL);
        const char *user_id =
-           lp_parm_const_string(snum, "ceph", "user_id", NULL);
+           lp_parm_const_string(snum, "ceph_new", "user_id", NULL);
        const char *fsname =
-           lp_parm_const_string(snum, "ceph", "filesystem", NULL);
+           lp_parm_const_string(snum, "ceph_new", "filesystem", NULL);
 
        DBG_DEBUG("[CEPH] calling: ceph_create\n");
        ret = ceph_create(&mnt, user_id);