- remove unreachable code in cname.
- revert previous patch for permission.
- check pathname len in movecwd.
/*
- * $Id: afs.c,v 1.13 2002-10-11 14:18:24 didg Exp $
+ * $Id: afs.c,v 1.14 2003-01-08 15:01:32 didg Exp $
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
ibuf += sizeof( int );
if (( dir = dirlookup( vol, did )) == NULL ) {
*rbuflen = 0;
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
*rbuflen = 0;
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *path->m_name != '\0' ) {
*rbuflen = 0;
ibuf += sizeof( int );
if (( dir = dirlookup( vol, did )) == NULL ) {
*rbuflen = 0;
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
*rbuflen = 0;
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *path->m_name != '\0' ) {
*rbuflen = 0;
- return( AFPERR_BITMAP );
+ return afp_errno;
}
if ((int)ibuf & 1 ) {
/*
- * $Id: appl.c,v 1.8 2002-10-11 14:18:25 didg Exp $
+ * $Id: appl.c,v 1.9 2003-01-08 15:01:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
memcpy( creator, ibuf, sizeof( creator ));
ibuf += sizeof( appltag );
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *path->m_name == '\0' ) {
return( AFPERR_BADTYPE );
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
memcpy( creator, ibuf, sizeof( creator ));
ibuf += sizeof( creator );
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *path->m_name == '\0' ) {
return( AFPERR_BADTYPE );
/*
- * $Id: desktop.c,v 1.19 2002-10-11 14:18:26 didg Exp $
+ * $Id: desktop.c,v 1.20 2003-01-08 15:01:33 didg Exp $
*
* See COPYRIGHT.
*
char *m, *u;
int i = 0;
int changed = 0;
-
+
if ( *mpath == '\0' ) {
return( "." );
}
mpath = m;
}
#endif /* FILE_MANGLING */
-
m = mpath;
u = upath;
while ( *m != '\0' ) {
/* we have a code page. we only use the ascii range
* if we have map ascii specified. */
-#if 1
if (vol->v_mtoupage && ((*m & 0x80) ||
vol->v_flags & AFPVOL_MAPASCII)) {
*u = vol->v_mtoupage->map[(unsigned char) *m].value;
*u++ = hexdig[ ( *m & 0xf0 ) >> 4 ];
*u = hexdig[ *m & 0x0f ];
}
- } else
-#endif /* 1 */
+ } else {
#if AD_VERSION == AD_VERSION1
if ((((vol->v_flags & AFPVOL_NOHEX) == 0) &&
(!isascii(*m) || *m == '/')) ||
changed = 1;
} else
*u = *m;
+ }
u++;
i++;
m++;
static char mpath[ MAXPATHLEN + 1];
char *m, *u;
int h;
+ int changed = 0;
/* do the hex conversion */
u = upath;
if (vol->v_utompage && ((*u & 0x80) ||
(vol->v_flags & AFPVOL_MAPASCII))) {
*m = vol->v_utompage->map[(unsigned char) *u].value;
+ changed = 1;
} else
#endif /* 1 */
if ( *u == ':' && *(u+1) != '\0' && islxdigit( *(u+1)) &&
++u;
h |= hextoint( *u );
*m = h;
+ changed = 1;
} else
*m = *u;
m++;
}
*m = '\0';
+ m = mpath;
#ifdef FILE_MANGLING
- strcpy(mpath,mangle(vol, mpath));
+ m = mangle(vol, mpath);
+ if (m != mpath) {
+ changed = 1;
+ }
#endif /* FILE_MANGLING */
#ifdef DEBUG
LOG(log_debug, logtype_afpd, "utompath: '%s':'%s'", upath, mpath);
#endif /* DEBUG */
- return( mpath );
+ return((changed)? m:upath );
}
int afp_addcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ((u_long)ibuf & 1 ) {
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
upath = s_path->u_name;
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
upath = s_path->u_name;
/*
- * $Id: directory.c,v 1.54 2003-01-07 15:55:21 rlewczuk Exp $
+ * $Id: directory.c,v 1.55 2003-01-08 15:01:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "unix.h"
struct dir *curdir;
+int afp_errno;
#define SENTINEL (&sentinel)
static struct dir sentinel = { SENTINEL, SENTINEL, NULL, DIRTREE_COLOR_BLACK,
/* check for 0 did */
- if (!did)
+ if (!did) {
+ afp_errno = AFPERR_PARAM;
return NULL;
-
+ }
if ( did == DIRDID_ROOT_PARENT ) {
if (!rootpar.d_did)
rootpar.d_did = DIRDID_ROOT_PARENT;
}
dir = vol->v_root;
+ afp_errno = AFPERR_NOOBJ;
while ( dir != SENTINEL ) {
if (dir->d_did == did)
return dir->d_m_name ? dir : NULL;
id = did;
if ((upath = cnid_resolve(vol->v_db, &id, buffer, buflen)) == NULL) {
+ afp_errno = AFPERR_NOOBJ;
return NULL;
}
ptr = path + MAXPATHLEN;
if (ret != NULL) {
break;
}
- if ((upath = cnid_resolve(vol->v_db, &id, buffer, buflen)) == NULL)
+ if ((upath = cnid_resolve(vol->v_db, &id, buffer, buflen)) == NULL) {
+ afp_errno = AFPERR_NOOBJ;
return NULL;
+ }
mpath = utompath(vol, upath);
len = strlen(mpath) + 1;
pathlen += len;
- if (pathlen > 255)
+ if (pathlen > 255) {
+ afp_errno = AFPERR_PARAM;
return NULL;
+ }
strcpy(ptr - len, mpath);
ptr -= len;
}
* process. It's fixable within afpd if fnctl_lock, doable with smb and
* next to impossible for nfs and local filesystem access.
*/
-
static void dir_invalidate( vol, dir )
const struct vol *vol;
struct dir *dir;
static struct path ret;
char *data, *p;
- char *u;
int extend = 0;
int len;
- int olen = 0;
u_int32_t hint;
u_int16_t len16;
int size = 0;
char sep;
data = *cpath;
- switch (*data) { /* path type */
+ afp_errno = AFPERR_NOOBJ;
+ switch (ret.m_type = *data) { /* path type */
case 2:
data++;
len = (unsigned char) *data++;
}
/* else it's an error */
default:
+ afp_errno = AFPERR_PARAM;
return( NULL );
}
*cpath += len + size;
*path = '\0';
- u = NULL;
ret.m_name = path;
ret.st_errno = 0;
ret.st_valid = 0;
if ( len == 0 ) {
if ( !extend && movecwd( vol, dir ) < 0 ) {
/* it's tricky:
- movecwd failed some of dir path is not there anymore.
+ movecwd failed some of dir path are not there anymore.
FIXME Is it true with other errors?
- if path == '\0' ==> the cpath parameter is that dir,
- and maybe we are trying to recreate it! So we can't
- fail here.
-
+ so we remove dir from the cache
*/
if (dir->d_did == DIRDID_ROOT_PARENT)
- return NULL;
- if (errno != ENOENT && errno != ENOTDIR)
+ return NULL;
+ if (afp_errno == AFPERR_ACCESS)
return NULL;
- cdir = dir->d_parent;
dir_invalidate(vol, dir);
- if (*path != '\0' || u == NULL) {
- /* FIXME: if path != '\0' then extend != 0 ?
- * u == NUL ==> cpath is something like:
- * toto\0\0\0
- */
- return NULL;
- }
- if (movecwd(vol, cdir) < 0) {
- printf("can't change to parent\n");
- return NULL; /* give up the whole tree is out of synch*/
- }
- /* restore the previous token */
- strncpy(path, u, olen);
- path[olen] = '\0';
+ return NULL;
}
- if (!ret.st_valid || *path == '\0') {
+ if (*path == '\0') {
ret.u_name = ".";
}
return &ret;
data++;
len--;
}
- u = NULL;
-
while (*data == sep && len > 0 ) {
if ( dir->d_parent == NULL ) {
return NULL;
/* would this be faster with strlen + strncpy? */
p = path;
- if (len > 0) {
- u = data;
- olen = len;
- }
while ( *data != sep && len > 0 ) {
*p++ = *data++;
len--;
we delete dir from the cache and abort.
*/
if ( dir->d_did != DIRDID_ROOT_PARENT &&
- (errno == ENOENT || errno == ENOTDIR)) {
+ (afp_errno != AFPERR_ACCESS)) {
dir_invalidate(vol, dir);
}
return NULL;
return( 0 );
}
if ( dir->d_did == DIRDID_ROOT_PARENT) {
- errno = 0; /* errno is checked in file.c */
+ afp_errno = AFPERR_PARAM;
return( -1 );
}
*p-- = '\0';
*p = '.';
for ( d = dir; d->d_parent != NULL && d != curdir; d = d->d_parent ) {
- *--p = '/';
u = d->d_u_name;
n = strlen( u );
+ if (p -n -1 < path) {
+ afp_errno = AFPERR_PARAM;
+ return -1;
+ }
+ *--p = '/';
p -= n;
strncpy( p, u, n );
}
if ( d != curdir ) {
- *--p = '/';
n = strlen( vol->v_path );
+ if (p -n -1 < path) {
+ afp_errno = AFPERR_PARAM;
+ return -1;
+ }
+ *--p = '/';
p -= n;
strncpy( p, vol->v_path, n );
}
if ( chdir( p ) < 0 ) {
+ switch (errno) {
+ case EACCES:
+ case EPERM:
+ afp_errno = AFPERR_ACCESS;
+ break;
+ default:
+ afp_errno = AFPERR_NOOBJ;
+
+ }
return( -1 );
}
curdir = dir;
ibuf += sizeof( int );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
memcpy( &bitmap, ibuf, sizeof( bitmap ));
ibuf += sizeof( bitmap );
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *path->m_name != '\0' ) {
*/
struct path Cur_Path = {
+ 0,
"", /* mac name */
".", /* unix name */
0, /* stat is not set */
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- switch( errno ) {
- case EACCES:
- return( AFPERR_ACCESS );
- case EEXIST: /* FIXME this one is impossible? */
- return( AFPERR_EXIST );
- default:
- return( AFPERR_NOOBJ );
- }
+ return afp_errno;
}
/* FIXME check done elswhere? cname was able to move curdir to it! */
if (*s_path->m_name == '\0')
}
if ( movecwd( vol, curdir->d_parent ) < 0 ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( rmdir(fdir->d_u_name) < 0 ) {
ibuf += sizeof(did);
if (( parentdir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( path = cname( vol, parentdir, &ibuf )) == NULL ) {
- switch( errno ) {
- case EACCES:
- return( AFPERR_ACCESS );
- default:
- return( AFPERR_NOOBJ );
- }
+ return afp_errno;
}
if ( *path->m_name != '\0' ) {
/*
- * $Id: directory.h,v 1.7 2002-10-15 19:34:34 didg Exp $
+ * $Id: directory.h,v 1.8 2003-01-08 15:01:34 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
};
struct path {
+ int m_type;
char *m_name; /* mac name */
char *u_name; /* unix name */
/*
- * $Id: file.c,v 1.69 2003-01-07 15:55:21 rlewczuk Exp $
+ * $Id: file.c,v 1.70 2003-01-08 15:01:34 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return data;
}
-/*
- * FIXME: PDINFO is UTF8 and doesn't need adp
+/* ---------------------
*/
-#define PARAM_NEED_ADP(b) ((b) & ((1 << FILPBIT_ATTR) |\
- (1 << FILPBIT_CDATE) |\
- (1 << FILPBIT_MDATE) |\
- (1 << FILPBIT_BDATE) |\
- (1 << FILPBIT_FINFO) |\
- (1 << FILPBIT_RFLEN) |\
- (1 << FILPBIT_EXTRFLEN) |\
- (1 << FILPBIT_PDINFO)))
-
-
char *set_name(char *data, const char *name, u_int32_t utf8)
{
u_int32_t aint;
aint = strlen( name );
if (!utf8) {
+ if (afp_version >= 30) {
+ /* the name is in utf8 */
+ }
if (aint > MACFILELEN)
aint = MACFILELEN;
*data++ = aint;
return data;
}
+/*
+ * FIXME: PDINFO is UTF8 and doesn't need adp
+*/
+#define PARAM_NEED_ADP(b) ((b) & ((1 << FILPBIT_ATTR) |\
+ (1 << FILPBIT_CDATE) |\
+ (1 << FILPBIT_MDATE) |\
+ (1 << FILPBIT_BDATE) |\
+ (1 << FILPBIT_FINFO) |\
+ (1 << FILPBIT_RFLEN) |\
+ (1 << FILPBIT_EXTRFLEN) |\
+ (1 << FILPBIT_PDINFO)))
+
+
/* -------------------------- */
int getmetadata(struct vol *vol,
u_int16_t bitmap,
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *s_path->m_name == '\0' ) {
ibuf += sizeof( bitmap );
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *s_path->m_name == '\0' ) {
memcpy(&sdid, ibuf, sizeof( sdid ));
ibuf += sizeof( sdid );
if (( dir = dirlookup( vol, sdid )) == NULL ) {
- return( AFPERR_PARAM );
+ return afp_errno;
}
memcpy(&dvid, ibuf, sizeof( dvid ));
ibuf += sizeof( ddid );
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *s_path->m_name == '\0' ) {
return( AFPERR_BADTYPE );
return AFPERR_VLOCK;
if (( dir = dirlookup( vol, ddid )) == NULL ) {
- return( AFPERR_PARAM );
+ return afp_errno;
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if ( *s_path->m_name != '\0' ) {
return( AFPERR_BADTYPE ); /* not a directory. AFPERR_PARAM? */
/*
- * $Id: filedir.c,v 1.36 2002-10-25 11:26:49 didg Exp $
+ * $Id: filedir.c,v 1.37 2003-01-08 15:01:34 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "filedir.h"
#include "unix.h"
+#ifdef DROPKLUDGE
int matchfile2dirperms(upath, vol, did)
/* Since it's kinda' big; I decided against an
inline function */
#endif /* DEBUG */
return ret;
}
-
+#endif
int afp_getfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
AFPObj *obj;
ibuf += sizeof( did );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
memcpy( &fbitmap, ibuf, sizeof( fbitmap ));
ibuf += sizeof( dbitmap );
if (( s_path = cname( vol, dir, &ibuf )) == NULL) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
st = &s_path->st;
if (!s_path->st_valid) {
/* it's a dir and it should be there
- * because we chdir in it in cname
+ * because we chdir in it in cname or
+ * it's curdir (maybe deleted, but then we can't know)
+ *
*/
of_stat(s_path);
}
buflen = 0;
if (S_ISDIR(st->st_mode)) {
if (dbitmap) {
+ if (*s_path->m_name != '\0') {
+ /* the dir wasn't in the cache and we weren't able to chdir in it.
+ */
+ return AFPERR_ACCESS;
+ }
ret = getdirparams(vol, dbitmap, s_path, curdir,
rbuf + 3 * sizeof( u_int16_t ), &buflen );
if (ret != AFP_OK )
ibuf += sizeof( did);
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
memcpy( &bitmap, ibuf, sizeof( bitmap ));
ibuf += sizeof( bitmap );
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
st = &path->st;
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( did );
if (( sdir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
/* source pathname */
if (( path = cname( vol, sdir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
sdir = curdir;
}
/* move to destination dir */
if ( movecwd( vol, sdir->d_parent ) < 0 ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
isdir = 1;
strcpy(oldname, sdir->d_m_name);
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( int );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
upath = s_path->u_name;
/*
- * $Id: fork.c,v 1.40 2002-11-14 17:13:45 srittau Exp $
+ * $Id: fork.c,v 1.41 2003-01-08 15:01:35 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
ibuf += sizeof( int );
if (( dir = dirlookup( vol, did )) == NULL ) {
- return( AFPERR_NOOBJ );
+ return afp_errno;
}
memcpy(&bitmap, ibuf, sizeof( bitmap ));
}
if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
- return AFPERR_NOOBJ;
+ return afp_errno;
}
if (*s_path->m_name == '\0') {
/*
- * $Id: globals.h,v 1.15 2002-12-07 02:39:57 rlewczuk Exp $
+ * $Id: globals.h,v 1.16 2003-01-08 15:01:36 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
} AFPObj;
extern int afp_version;
+extern int afp_errno;
extern unsigned char nologin;
extern struct dir *curdir;
extern char getwdbuf[];
/*
- * $Id: unix.c,v 1.40 2003-01-07 15:55:22 rlewczuk Exp $
+ * $Id: unix.c,v 1.41 2003-01-08 15:01:36 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct maccess *ma;
{
mode_t mode;
-int ok = 0;
mode = stat->st_mode;
ma->ma_world = utombits( mode );
ma->ma_owner = utombits( mode );
- /* ma_user is a union of all permissions */
- ma->ma_user = 0;
+ /* ma_user is a union of all permissions but we must follow
+ * unix perm
+ */
if ( (uuid == stat->st_uid) || (uuid == 0)) {
- ok = 1;
ma->ma_user = ma->ma_owner | AR_UOWN;
}
- if ( gmem( stat->st_gid )) {
- ok = 1;
- ma->ma_user |= ma->ma_group;
- }
- if (ok) {
- /* We are the directory owner or we are in the group owner.
- * If we don't have a perm we need to remove it from ma_world.
- *
- * eg if perms are rwx--Sr-x and I'm not the user owner but I'm in the group
- * I DON'T have read and search access on the directory.
- */
- if (!(ma->ma_user & AR_UWRITE))
- ma->ma_world &= ~AR_UWRITE;
- if (!(ma->ma_user & AR_UREAD))
- ma->ma_world &= ~AR_UREAD;
- if (!(ma->ma_user & AR_USEARCH))
- ma->ma_world &= ~AR_USEARCH;
- }
-
- ma->ma_user |= ma->ma_world;
+ else if ( gmem( stat->st_gid )) {
+ ma->ma_user = ma->ma_group;
+ }
+ else {
+ ma->ma_user = ma->ma_world;
+ }
/*
* There are certain things the mac won't try if you don't have
continue;
}
- if (S_ISREG(st.st_mode)) {
+ if (!S_ISDIR(st.st_mode)) {
if (setfilmode(dirp->d_name, mode, &st) < 0) {
LOG(log_error, logtype_afpd, "setdirmode: chmod %s: %s",
dirp->d_name, strerror(errno) );
LOG(log_error, logtype_afpd, "setdirmode: stat %s: %s", buf, strerror(errno) );
continue;
}
- if (S_ISREG(st.st_mode)) {
+ if (!S_ISDIR(st.st_mode)) {
if (setfilmode(buf, ad_hf_mode(mode), &st) < 0) {
/* FIXME what do we do then? */
}
/*
- * $Id: volume.c,v 1.44 2002-12-04 10:59:36 didg Exp $
+ * $Id: volume.c,v 1.45 2003-01-08 15:01:37 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
options[VOLOPT_FLAGS].i_value |= AFPVOL_DROPBOX;
else if (strcasecmp(p, "nofileid") == 0)
options[VOLOPT_FLAGS].i_value |= AFPVOL_NOFILEID;
+ else if (strcasecmp(p, "utf8") == 0)
+ options[VOLOPT_FLAGS].i_value |= AFPVOL_UTF8;
p = strtok(NULL, ",");
}
/*
- * $Id: volume.h,v 1.16 2002-10-17 18:01:54 didg Exp $
+ * $Id: volume.h,v 1.17 2003-01-08 15:01:37 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include <sys/cdefs.h>
#include <sys/types.h>
#include <netatalk/endian.h>
+
#include "globals.h"
#define AFPVOL_NAMELEN 27
int v_casefold;
struct codepage *v_mtoupage, *v_utompage, *v_badumap;
int max_filename;
-
+
char *v_password;
char *v_veto;
#ifdef CNID_DB
#define AFPVOL_MAPASCII (1 << 13) /* map the ascii range as well */
#define AFPVOL_DROPBOX (1 << 14) /* dropkludge dropbox support */
#define AFPVOL_NOFILEID (1 << 15) /* don't advertise createid resolveid and deleteid calls */
+#define AFPVOL_UTF8 (1 << 16) /* unix name are in UTF8 */
/* FPGetSrvrParms options */
#define AFPSRVR_CONFIGINFO (1 << 0)