X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Fadouble%2Fad_open.c;h=a2f6f00e1ca73b027d0b9d8d074058f91b1deb5c;hb=c00bb5bf3000d12310dd6d7c63ea20944de033bf;hp=4e1253d1febf6e70b8cef6576b54b98015385eb9;hpb=5ec122952ff5835479f7441291dc8fdbb7796de1;p=netatalk.git diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index 4e1253d1..a2f6f00e 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -624,7 +624,7 @@ static int ad_header_read_ea(const char *path, struct adouble *ad, const struct if (ad_meta_fileno(ad) != -1) header_len = sys_fgetxattr(ad_meta_fileno(ad), AD_EA_META, ad->ad_data, AD_DATASZ_EA); else - header_len = sys_lgetxattr(path, AD_EA_META, ad->ad_data, AD_DATASZ_EA); + header_len = sys_getxattr(path, AD_EA_META, ad->ad_data, AD_DATASZ_EA); if (header_len < 1) { LOG(log_debug, logtype_ad, "ad_header_read_ea: %s", strerror(errno)); return -1; @@ -1242,6 +1242,7 @@ static int ad_open_rf_ea(const char *path, int adflags, int mode, struct adouble EC_FAIL; } ad->ad_rfp->adf_flags &= ~( O_TRUNC | O_CREAT ); + ad->ad_reso_refcount++; ad->ad_rfp->adf_refcount++; EC_NEG1_LOG( ad->ad_rlen = ad_reso_size(path, adflags, ad)); goto EC_CLEANUP;