We're calling SMB_VFS_NEXT_PWRITE() to write out the AppleDouble header
data. Until now this header always had a fixed sizeof AD_DATASZ_DOT_UND bytes,
but a subsequent commit will change that. Use the correct size which is the
offset of the begining of the resource fork data.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
len = SMB_VFS_NEXT_PWRITE(handle,
fsp,
ad->ad_data,
- AD_DATASZ_DOT_UND,
+ ad_getentryoff(ad, ADEID_RFORK),
0);
- if (len != AD_DATASZ_DOT_UND) {
+ if (len != ad_getentryoff(ad, ADEID_RFORK)) {
DBG_ERR("short write on %s: %zd", fsp_str_dbg(fsp), len);
return -1;
}