X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=etc%2Fafpd%2Ffile.c;h=342349a00347d5966cc9028377278ee2ac1120ce;hp=b34f810bd8240637b01e3cc32cf6bb169439e0b3;hb=7da5be70fe636491c5cb45a7d1cd9d2ada48ef1e;hpb=7aab96bc3ff7de9c4ce3c0ff8172f0343c0e8638 diff --git a/etc/afpd/file.c b/etc/afpd/file.c index b34f810b..342349a0 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -682,7 +682,7 @@ int afp_createfile(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, return( AFPERR_BADTYPE ); upath = s_path->u_name; - ad_init(&ad, vol->v_adouble, vol->v_ad_options); + ad_init(&ad, vol); /* if upath is deleted we already in trouble anyway */ if ((of = of_findname(s_path))) { @@ -1465,7 +1465,7 @@ int copyfile(const struct vol *s_vol, sfd, src, dst, newname); if (adp == NULL) { - ad_init(&ads, s_vol->v_adouble, s_vol->v_ad_options); + ad_init(&ads, s_vol); adp = &ads; } @@ -1491,7 +1491,7 @@ int copyfile(const struct vol *s_vol, st.st_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; } - ad_init(&add, d_vol->v_adouble, d_vol->v_ad_options); + ad_init(&add, d_vol); if (ad_open(&add, dst, adflags | ADFLAGS_RDWR | ADFLAGS_CREATE | ADFLAGS_EXCL, st.st_mode) < 0) { ret_err = errno; ad_close( adp, adflags ); @@ -1601,7 +1601,7 @@ int deletefile(const struct vol *vol, int dirfd, char *file, int checkAttrib) LOG(log_debug, logtype_afpd, "deletefile('%s')", file); - ad_init(&ad, vol->v_adouble, vol->v_ad_options); + ad_init(&ad, vol); if (checkAttrib) { /* was EACCESS error try to get only metadata */ /* we never want to create a resource fork here, we are going to delete it @@ -2114,7 +2114,7 @@ int afp_exchangefiles(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U return AFPERR_PARAM ; } - ad_init(&ads, vol->v_adouble, vol->v_ad_options); + ad_init(&ads, vol); if (!(adsp = find_adouble( path, &s_of, &ads))) { return afp_errno; } @@ -2147,7 +2147,7 @@ int afp_exchangefiles(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U goto err_exchangefile; } - ad_init(&add, vol->v_adouble, vol->v_ad_options); + ad_init(&add, vol); if (!(addp = find_adouble( path, &d_of, &add))) { err = afp_errno; goto err_exchangefile;