1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

vfs_ceph_new: use 'ceph_new' for config-param prefix

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>
This commit is contained in:
Shachar Sharon 2024-08-05 16:21:10 +03:00 committed by Günther Deschner
parent aa043a5808
commit aca4cf8327

View 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);