From d26b979bf4f3314017c303fe62c778933b9e0746 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 17 Dec 2015 20:05:04 +0100 Subject: vfs_fruit: stat AFP_AfpInfo must fail when it doesn't exist Bug: https://bugzilla.samba.org/show_bug.cgi?id=11347 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 0af7bf4249419ff7c88c5beece915db0a3697b72) --- source3/modules/vfs_fruit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/modules/vfs_fruit.c') diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 5c1415647e7..18ee2dac16d 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2853,6 +2853,17 @@ static int fruit_stat_meta(vfs_handle_struct *handle, struct smb_filename *smb_fname, bool follow_links) { + struct adouble *ad = NULL; + + ad = ad_get(talloc_tos(), handle, smb_fname->base_name, ADOUBLE_META); + if (ad == NULL) { + DEBUG(3,("fruit_stat_meta %s: %s\n", + smb_fname_str_dbg(smb_fname), strerror(errno))); + errno = ENOENT; + return -1; + } + TALLOC_FREE(ad); + /* Populate the stat struct with info from the base file. */ if (fruit_stat_base(handle, smb_fname, follow_links) == -1) { return -1; -- cgit v1.2.1