From 50652e94678c3a450cf5dd104cea738756c4da07 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Wed, 18 May 2011 16:45:51 +0200 Subject: [PATCH] New volume option nonetids --- NEWS | 2 ++ etc/afpd/volume.c | 10 ++++------ include/atalk/volume.h | 7 ++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index b7bf9d05..3f4cf570 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ Changes in 2.2 ============== +* NEW: afpd: new volume option "nonetids" +* NEW: afpd: ACL access check caching * UPD: Support for Berkeley DB 5.1 * UPD: case-conversion is based on Unicode 6.0.0 * UPD: cnid_metad: allow up to 4096 volumes diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 00c2c032..519c0c97 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -512,11 +512,8 @@ static void volset(struct vol_option *options, struct vol_option *save, options[VOLOPT_FLAGS].i_value |= AFPVOL_TM; else if (strcasecmp(p, "searchdb") == 0) options[VOLOPT_FLAGS].i_value |= AFPVOL_SEARCHDB; -/* Found this in branch dir-rewrite, maybe we want to use it sometimes */ -#if 0 - else if (strcasecmp(p, "cdrom") == 0) - options[VOLOPT_FLAGS].i_value |= AFPVOL_CDROM | AFPVOL_RO; -#endif + else if (strcasecmp(p, "nonetids") == 0) + options[VOLOPT_FLAGS].i_value |= AFPVOL_NONETIDS; p = strtok(NULL, ","); } @@ -1657,7 +1654,8 @@ static int getvolparams( u_int16_t bitmap, struct vol *vol, struct stat *st, cha ashort |= VOLPBIT_ATTR_UNIXPRIV; if (vol->v_flags & AFPVOL_TM) ashort |= VOLPBIT_ATTR_TM; - + if (vol->v_flags & AFPVOL_NONETIDS) + ashort |= VOLPBIT_ATTR_NONETIDS; if (afp_version >= 32) { if (vol->v_vfs_ea) ashort |= VOLPBIT_ATTR_EXT_ATTRS; diff --git a/include/atalk/volume.h b/include/atalk/volume.h index c2db33db..44cb6f6b 100644 --- a/include/atalk/volume.h +++ b/include/atalk/volume.h @@ -136,10 +136,7 @@ struct vol { #define AFPVOL_TM (1 << 23) /* Supports TimeMachine */ #define AFPVOL_ACLS (1 << 24) /* Volume supports ACLS */ #define AFPVOL_SEARCHDB (1 << 25) /* Use fast CNID db search instead of filesystem */ -/* Found this in branch dir-rewrite, maybe we want to use it sometimes */ -#if 0 -#define AFPVOL_CDROM (1 << XX) /* Ejectable media eg CD -> in memory CNID db */ -#endif +#define AFPVOL_NONETIDS (1 << 26) /* signal the client it shall do privelege mapping */ /* Extended Attributes vfs indirection */ #define AFPVOL_EA_NONE 0 /* No EAs */ @@ -178,7 +175,7 @@ int wincheck(const struct vol *vol, const char *path); #define VOLPBIT_ATTR_BLANKACCESS (1 << 4) #define VOLPBIT_ATTR_UNIXPRIV (1 << 5) #define VOLPBIT_ATTR_UTF8 (1 << 6) -#define VOLPBIT_ATTR_NONETUID (1 << 7) +#define VOLPBIT_ATTR_NONETIDS (1 << 7) #define VOLPBIT_ATTR_EXT_ATTRS (1 << 10) #define VOLPBIT_ATTR_ACLS (1 << 11) #define VOLPBIT_ATTR_TM (1 << 13) -- 2.39.2