s3:vfs_fileid: readd "fileid:algorithm" as option.
authorStefan Metzmacher <metze@samba.org>
Wed, 14 Jan 2009 12:59:09 +0000 (13:59 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 20 Jan 2009 13:16:49 +0000 (14:16 +0100)
"fileid:mapping" is still supported as fallback.

metze
(cherry picked from commit 554a89df0cf6d9832778e2913f9fe50b78baeedc)
(cherry picked from commit fe9ad21b8cb5286845350fe2280da2cbe2647bb7)

source/modules/vfs_fileid.c

index 8ab4ac37932b8c29ba1b97766eff93a808d13e0d..787a49f36b6e6d76c996d289b5bff59cc456d314 100644 (file)
@@ -188,10 +188,16 @@ static int fileid_connect(struct vfs_handle_struct *handle,
                return -1;
        }
 
-       data->device_mapping_fn = fileid_device_mapping_fsid;
+       /*
+        * "fileid:mapping" is only here as fallback for old setups
+        * "fileid:algorithm" is the option new setups should use
+        */
        algorithm = lp_parm_const_string(SNUM(handle->conn),
                                         "fileid", "mapping",
                                         "fsname");
+       algorithm = lp_parm_const_string(SNUM(handle->conn),
+                                        "fileid", "algorithm",
+                                        algorithm);
        if (strcmp("fsname", algorithm) == 0) {
                data->device_mapping_fn = fileid_device_mapping_fsname;
        } else if (strcmp("fsid", algorithm) == 0) {