]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_rgw: Add new module parameter 'id' master
authorVinit Agnihotri <vagnihot@redhat.com>
Fri, 19 Jun 2026 08:48:45 +0000 (14:18 +0530)
committerAnoop C S <anoopcs@samba.org>
Mon, 22 Jun 2026 15:36:07 +0000 (15:36 +0000)
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 <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Jun 22 15:36:07 UTC 2026 on atb-devel-224

docs-xml/manpages/vfs_ceph_rgw.8.xml
source3/modules/vfs_ceph_rgw.c

index c6d5d28053af99b5039accb39bdbaa882d39e8ac..887a1d6691f7a0b5fb73e30a37127c843f36cfe1 100644 (file)
                <para>
                        Allows one to define a ceph keyring file to use.
                        (Required)
-                       Default:
-                       /etc/ceph/ceph.client.admin.keyring
                </para>
                <para>
                        Example: ceph_rgw:keyring_file =
                </listitem>
                </varlistentry>
 
+               <varlistentry>
+               <term>ceph_rgw:id = name</term>
+               <listitem>
+               <para>
+                       Client id portion of the Ceph client name used by librgw
+                       (Required)
+               </para>
+               <para>
+                       Example: ceph_rgw:id = admin
+               </para>
+               </listitem>
+               </varlistentry>
+
        </variablelist>
 
 </refsect1>
                        <smbconfoption name="inherit permissions">yes</smbconfoption>
                        <smbconfoption name="vfs objects">ceph_rgw</smbconfoption>
                        <smbconfoption name="ceph_rgw:bucket">my-bucket</smbconfoption>
+                       <smbconfoption name="ceph_rgw:id">admin</smbconfoption>
                        <smbconfoption name="ceph_rgw:user_id">user1</smbconfoption>
                        <smbconfoption name="ceph_rgw:access_key">user1passwd</smbconfoption>
                        <smbconfoption name="ceph_rgw:secret_access_key">user1passwd</smbconfoption>
index 635ac27409431cd6370e469bfb5025b6e7745cbc..0307de25fb78893533b5709685fe6b8d8db6286f 100644 (file)
@@ -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;
        }