From: Vinit Agnihotri Date: Fri, 19 Jun 2026 08:48:45 +0000 (+0530) Subject: vfs_ceph_rgw: Add new module parameter 'id' X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;p=thirdparty%2Fsamba.git vfs_ceph_rgw: Add new module parameter 'id' Module parameter 'id' represents 'Client id portion of the Ceph client name used by librgw'. Additionally updated new parameter in man page. Signed-off-by: Vinit Agnihotri Reviewed-by: Anoop C S Reviewed-by: John Mulligan Reviewed-by: Guenther Deschner Autobuild-Date(master): Mon Jun 22 15:36:07 UTC 2026 on atb-devel-224 --- diff --git a/docs-xml/manpages/vfs_ceph_rgw.8.xml b/docs-xml/manpages/vfs_ceph_rgw.8.xml index c6d5d28053a..887a1d6691f 100644 --- a/docs-xml/manpages/vfs_ceph_rgw.8.xml +++ b/docs-xml/manpages/vfs_ceph_rgw.8.xml @@ -115,8 +115,6 @@ Allows one to define a ceph keyring file to use. (Required) - Default: - /etc/ceph/ceph.client.admin.keyring Example: ceph_rgw:keyring_file = @@ -191,6 +189,19 @@ + + ceph_rgw:id = name + + + Client id portion of the Ceph client name used by librgw + (Required) + + + Example: ceph_rgw:id = admin + + + + @@ -229,6 +240,7 @@ yes ceph_rgw my-bucket + admin user1 user1passwd user1passwd diff --git a/source3/modules/vfs_ceph_rgw.c b/source3/modules/vfs_ceph_rgw.c index 635ac274094..0307de25fb7 100644 --- a/source3/modules/vfs_ceph_rgw.c +++ b/source3/modules/vfs_ceph_rgw.c @@ -45,6 +45,7 @@ static uint64_t rgw_fd_index = 0; struct vfs_ceph_rgw_config { /* Module parameters */ + const char *id; const char *bkt_name; const char *user_id; const char *access_key; @@ -2120,8 +2121,9 @@ static bool vfs_ceph_rgw_mount_bucket(struct vfs_ceph_rgw_config *config) librgw_params[1] = talloc_asprintf( librgw_params, - " --name=client.admin --cluster=ceph" - " --conf=%s --keyring=%s", + "--id=%s --conf=%s " + "--keyring=%s", + config->id, config->config_file, config->keyring_file); if (librgw_params[1] == NULL) { @@ -2204,6 +2206,11 @@ static bool vfs_ceph_rgw_load_config(struct vfs_handle_struct *handle, goto out; } + config_tmp->id = vfs_ceph_rgw_parm(handle, "id", NULL); + if (config_tmp->id == NULL) { + goto out; + } + config_tmp->config_file = vfs_ceph_rgw_parm(handle, "config_file", "/etc/ceph/ceph.conf"); @@ -2211,8 +2218,9 @@ static bool vfs_ceph_rgw_load_config(struct vfs_handle_struct *handle, goto out; } - config_tmp->keyring_file = vfs_ceph_rgw_parm( - handle, "keyring_file", "/etc/ceph/ceph.client.admin.keyring"); + config_tmp->keyring_file = vfs_ceph_rgw_parm(handle, + "keyring_file", + NULL); if (config_tmp->keyring_file == NULL) { goto out; }