vfs_fruit: stat AFP_AfpInfo must fail when it doesn't exist
authorRalph Boehme <slow@samba.org>
Thu, 17 Dec 2015 19:05:04 +0000 (20:05 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 21 Dec 2015 22:21:17 +0000 (23:21 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11347

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_fruit.c

index 3d3d6d460fda7da9ec6737cba8c3dfa8c5df0ff3..4a42eaf784deec6083c3ddf909630bb8811e2c47 100644 (file)
@@ -2878,6 +2878,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) {
+               DBG_INFO("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;