/*
- * $Id: volume.c,v 1.10 2001-08-15 01:37:34 srittau Exp $
+ * $Id: volume.c,v 1.13 2001-09-06 20:00:59 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+
+/* STDC check */
+#if STDC_HEADERS
#include <string.h>
+#else /* STDC_HEADERS */
+#ifndef HAVE_STRCHR
+#define strchr index
+#define strrchr index
+#endif /* HAVE_STRCHR */
+char *strchr (), *strrchr ();
+#ifndef HAVE_MEMCPY
+#define memcpy(d,s,n) bcopy ((s), (d), (n))
+#define memmove(d,s,n) bcopy ((s), (d), (n))
+#endif /* ! HAVE_MEMCPY */
+#endif /* STDC_HEADERS */
+
#include <pwd.h>
#include <grp.h>
#include <utime.h>
~u -> make u illegal only as the first
part of a double-byte character.
*/
+#define VOLOPT_VETO 10 /* list of veto filespec */
#ifdef FORCE_UIDGID
-#define VOLOPT_FORCEUID 10 /* force uid for username x */
-#define VOLOPT_FORCEGID 11 /* force gid for group x */
-#define VOLOPT_MAX 11
+#define VOLOPT_FORCEUID 11 /* force uid for username x */
+#define VOLOPT_FORCEGID 12 /* force gid for group x */
+#define VOLOPT_MAX 12
#else /* normally, there are only 9 possible options */
-#define VOLOPT_MAX 9
+#define VOLOPT_MAX 10
#endif /* FORCE_UIDGID */
#define VOLOPT_NUM (VOLOPT_MAX + 1)
free(options[VOLOPT_CODEPAGE].c_value);
options[VOLOPT_CODEPAGE].c_value = get_codepage_path(nlspath, val + 1);
+ } else if (optionok(tmp, "veto:", val)) {
+ if (options[VOLOPT_VETO].c_value)
+ free(options[VOLOPT_VETO].c_value);
+ options[VOLOPT_VETO].c_value = strdup(val + 1);
+
} else if (optionok(tmp, "casefold:", val)) {
if (strcasecmp(val + 1, "tolower") == 0)
options[VOLOPT_CASEFOLD].i_value = AFPVOL_UMLOWER;
if (options[VOLOPT_PASSWORD].c_value)
volume->v_password = strdup(options[VOLOPT_PASSWORD].c_value);
+ if (options[VOLOPT_VETO].c_value)
+ volume->v_veto = strdup(options[VOLOPT_VETO].c_value);
+
#ifdef CNID_DB
if (options[VOLOPT_DBPATH].c_value)
volume->v_dbpath = strdup(options[VOLOPT_DBPATH].c_value);
#ifdef CNID_DB
cnid_close(vol->v_db);
vol->v_db = NULL;
-#endif /* AD_VERSION > AD_VERSION1 */
+#endif /* CNID_DB */
return( AFP_OK );
}