1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-23 06:50:21 +03:00

vfs_fruit: enable zero file id

Enable zero_file_id if both conditions are met:
- AAPL negotiated
- fruit:zero_file_id is set

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 245a325532c9a46ec3e459ceca38e903b203f691)
This commit is contained in:
Uri Simchoni 2017-03-23 14:08:45 +02:00 committed by Karolin Seeger
parent 2732b0cb29
commit 9e7cfc4384

View File

@ -135,6 +135,7 @@ struct fruit_config_data {
bool copyfile_enabled;
bool veto_appledouble;
bool posix_rename;
bool aapl_zero_file_id;
/*
* Additional options, all enabled by default,
@ -1591,6 +1592,9 @@ static int init_fruit_config(vfs_handle_struct *handle)
config->posix_rename = lp_parm_bool(
SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME, "posix_rename", true);
config->aapl_zero_file_id =
lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME, "zero_file_id", true);
config->readdir_attr_rsize = lp_parm_bool(
SNUM(handle->conn), "readdir_attr", "aapl_rsize", true);
@ -2236,6 +2240,9 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle,
blob);
if (NT_STATUS_IS_OK(status)) {
global_fruit_config.nego_aapl = true;
if (config->aapl_zero_file_id) {
aapl_force_zero_file_id(handle->conn->sconn);
}
}
return status;