diff options
author | Ralph Boehme <slow@samba.org> | 2019-07-04 11:37:10 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-07-12 21:31:29 +0000 |
commit | 1c464232f8848e6d3a28f49f7721f4ac076c5645 (patch) | |
tree | 01dd8d89acd71e762a345874335fe7c3a2a05105 /source3/lib/adouble.c | |
parent | 5e52d9ebf0638ce40130dc72c8225c5b7e25ee22 (diff) | |
download | samba-1c464232f8848e6d3a28f49f7721f4ac076c5645.tar.gz |
adouble: use runtime size when writing out AppleDouble header
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>
Diffstat (limited to 'source3/lib/adouble.c')
-rw-r--r-- | source3/lib/adouble.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 21d5162c8ff..a88847c27a5 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -1727,9 +1727,9 @@ int ad_fset(struct vfs_handle_struct *handle, 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; } |