]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: add out arg "converted_xattr" to ad_convert_xattr
authorRalph Boehme <slow@samba.org>
Mon, 8 Oct 2018 16:43:51 +0000 (18:43 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 18 Oct 2018 11:00:10 +0000 (13:00 +0200)
Used to let the caller know if a conversion has been done. Currently not
used in the caller, that comes next.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit acb72c1ea7fecc9a7e8eb0219096b1bbdfd8850e)

source3/modules/vfs_fruit.c

index 9126e1237db5149ddf4f214a43fdf02ca293fa99..dd312da895be0f1a4850e0bcf9d18aa5b438da39 100644 (file)
@@ -995,7 +995,8 @@ static bool ad_convert_move_reso(struct adouble *ad,
 }
 
 static bool ad_convert_xattr(struct adouble *ad,
-                            const struct smb_filename *smb_fname)
+                            const struct smb_filename *smb_fname,
+                            bool *converted_xattr)
 {
        static struct char_mappings **string_replace_cmaps = NULL;
        char *map = MAP_FAILED;
@@ -1007,6 +1008,8 @@ static bool ad_convert_xattr(struct adouble *ad,
        int rc;
        bool ok;
 
+       *converted_xattr = false;
+
        if (ad->adx_header.adx_num_attrs == 0) {
                return true;
        }
@@ -1145,6 +1148,7 @@ static bool ad_convert_xattr(struct adouble *ad,
                goto fail;
        }
 
+       *converted_xattr = true;
        ok = true;
 
 fail:
@@ -1290,12 +1294,13 @@ static int ad_convert(struct adouble *ad,
                      const struct smb_filename *smb_fname)
 {
        bool ok;
+       bool converted_xattr = false;
 
        if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) {
                return 0;
        }
 
-       ok = ad_convert_xattr(ad, smb_fname);
+       ok = ad_convert_xattr(ad, smb_fname, &converted_xattr);
        if (!ok) {
                return -1;
        }