From: Frank Lahm Date: Tue, 2 Aug 2011 08:29:08 +0000 (+0200) Subject: .volinfo file not created on first volume access if user in rolist X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=81aedef566a1f007bc16b9a742fa2f1f7944bd56 .volinfo file not created on first volume access if user in rolist --- diff --git a/NEWS b/NEWS index 6215e8b5..9df6a08e 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ Changes in 2.2.1 established * FIX: afpd: fix a crash when searching for a UUID that is not a special local UUID and LDAP support is not compiled in +* FIX: afpd: .volinfo file not created on first volume access if user in rolist * FIX: cnid_dbd: increase BerkeleyDB locks and lockobjs * FIX: cnid_dbd: implement -d option, deletes CNID db * FIX: suse: initscript return better status diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 78be58e0..fafdb8bd 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -2317,14 +2317,13 @@ int afp_openvol(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t } ret = stat_vol(bitmap, volume, rbuf, rbuflen); + if (ret == AFP_OK) { + handle_special_folders(volume); + savevolinfo(volume, + volume->v_cnidserver ? volume->v_cnidserver : Cnid_srv, + volume->v_cnidport ? volume->v_cnidport : Cnid_port); - if (!(volume->v_flags & AFPVOL_RO)) { - handle_special_folders( volume ); - savevolinfo(volume, - volume->v_cnidserver ? volume->v_cnidserver : Cnid_srv, - volume->v_cnidport ? volume->v_cnidport : Cnid_port); - } /* * If you mount a volume twice, the second time the trash appears on @@ -2752,9 +2751,6 @@ static void handle_special_folders (const struct vol * vol) } } - if ((vol->v_flags & AFPVOL_RO)) - return; - for (; p->name != NULL; p++) { create_special_folder (vol, p); }