From caaaa67dd9ce1e564918a719393837377149a797 Mon Sep 17 00:00:00 2001 From: HAT Date: Wed, 6 Jun 2012 00:21:18 +0900 Subject: [PATCH] read only mode if cnid scheme is last --- NEWS | 4 ++++ libatalk/util/netatalk_conf.c | 3 +++ 2 files changed, 7 insertions(+) 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; -- 2.39.2