From: HAT Date: Tue, 5 Jun 2012 15:21:18 +0000 (+0900) Subject: read only mode if cnid scheme is last X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=caaaa67dd9ce1e564918a719393837377149a797;ds=sidebyside read only mode if cnid scheme is last --- diff --git a/NEWS b/NEWS index 6b276e07..0dba0e70 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Changes in 3.0 beta3 +==================== +* UPD: read only mode if cnid scheme is last + Changes in 3.0 beta2 ==================== * UPD: Solaris and friends: Replace initscript with SMF manifest diff --git a/libatalk/util/netatalk_conf.c b/libatalk/util/netatalk_conf.c index 0b6e4b7b..bd35dc76 100644 --- a/libatalk/util/netatalk_conf.c +++ b/libatalk/util/netatalk_conf.c @@ -756,12 +756,15 @@ static struct vol *creatvol(AFPObj *obj, * 1) neither the rolist nor the rwlist exist -> rw * 2) rolist exists -> ro if user is in it. * 3) rwlist exists -> ro unless user is in it. + * 4) cnid scheme = last -> ro forcibly. */ if (pwd) { if (accessvol(obj, getoption(obj->iniconfig, section, "rolist", preset, NULL), pwd->pw_name) == 1 || accessvol(obj, getoption(obj->iniconfig, section, "rwlist", preset, NULL), pwd->pw_name) == 0) volume->v_flags |= AFPVOL_RO; } + if (0 == strcmp(volume->v_cnidscheme, "last")) + volume->v_flags |= AFPVOL_RO; if ((volume->v_flags & AFPVOL_NODEV)) volume->v_ad_options |= ADVOL_NODEV;