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;
return dfree / 2;
}
+static uint64_t fruit_fs_file_id(struct vfs_handle_struct *handle,
+ const SMB_STRUCT_STAT *psbuf)
+{
+ struct fruit_config_data *config = NULL;
+
+ SMB_VFS_HANDLE_GET_DATA(handle, config,
+ struct fruit_config_data,
+ return 0);
+
+ if (config->aapl_zero_file_id) {
+ return 0;
+ }
+
+ return SMB_VFS_NEXT_FS_FILE_ID(handle, psbuf);
+}
+
static struct vfs_fn_pointers vfs_fruit_fns = {
.connect_fn = fruit_connect,
.disk_free_fn = fruit_disk_free,
.offload_read_recv_fn = fruit_offload_read_recv,
.offload_write_send_fn = fruit_offload_write_send,
.offload_write_recv_fn = fruit_offload_write_recv,
+ .fs_file_id_fn = fruit_fs_file_id,
/* NT ACL operations */
.fget_nt_acl_fn = fruit_fget_nt_acl,
NTSTATUS check_access_fsp(const struct files_struct *fsp,
uint32_t access_mask);
uint64_t smb_roundup(connection_struct *conn, uint64_t val);
-void aapl_force_zero_file_id(struct smbd_server_connection *sconn);
bool samba_private_attr_name(const char *unix_ea_name);
NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
files_struct *fsp,
return val;
}
-/********************************************************************
- Globally (for this connection / multi-channel) disable file-ID
- calculation. This is required to be global because it serves
- Macs in AAPL mode, which is globally set.
-********************************************************************/
-void aapl_force_zero_file_id(struct smbd_server_connection *sconn)
-{
- sconn->aapl_zero_file_id = true;
-}
-
/****************************************************************************
Utility functions for dealing with extended attributes.
****************************************************************************/