]> arthur.barton.de Git - netatalk.git/commitdiff
Remove obsolete options
authorFrank Lahm <franklahm@googlemail.com>
Fri, 3 Feb 2012 17:33:27 +0000 (18:33 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Fri, 3 Feb 2012 17:33:27 +0000 (18:33 +0100)
etc/afpd/filedir.c
etc/afpd/fork.c
etc/afpd/volume.c
include/atalk/volume.h
libatalk/util/volinfo.c

index a00a497faf63908deb10a9746375ad9ce2be1395..d41a439ecb23df0caed1e4bb2fcdaccb64e197c3 100644 (file)
@@ -202,10 +202,6 @@ int afp_setfildirparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf
 */
 int check_name(const struct vol *vol, char *name)
 {
-    /* check for illegal characters in the unix filename */
-    if (!wincheck(vol, name))
-        return AFPERR_PARAM;
-
     if ((vol->v_flags & AFPVOL_NOHEX) && strchr(name, '/'))
         return AFPERR_PARAM;
 
index 7bd2128b350fe8624189cb04e191ea3024f7672a..8f9e55901b2ce013046f26becb209f6d6f47cd49 100644 (file)
@@ -850,7 +850,7 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si
 
     if ( ofork->of_flags & AFPFORK_DATA) {
         eid = ADEID_DFORK;
-        xlate = (ofork->of_vol->v_flags & AFPVOL_CRLF) ? crlf(ofork) : 0;
+        xlate = 0;
     } else if (ofork->of_flags & AFPFORK_RSRC) {
         eid = ADEID_RFORK;
     } else { /* fork wasn't opened. this should never really happen. */
@@ -1202,7 +1202,7 @@ static int write_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, s
 
     if ( ofork->of_flags & AFPFORK_DATA) {
         eid = ADEID_DFORK;
-        xlate = (ofork->of_vol->v_flags & AFPVOL_CRLF) ? crlf(ofork) : 0;
+        xlate = 1;
     } else if (ofork->of_flags & AFPFORK_RSRC) {
         eid = ADEID_RFORK;
     } else {
index 680b038bb42d618ca7639d14b91ce4a7663d1d0a..b2586400d5fb544150ccdc8bc71014346520a95d 100644 (file)
@@ -405,13 +405,7 @@ static void volset(struct vol_option *options, struct vol_option *save,
             return;
 
         while (p) {
-            if (strcasecmp(p, "prodos") == 0)
-                options[VOLOPT_FLAGS].i_value |= AFPVOL_A2VOL;
-            else if (strcasecmp(p, "mswindows") == 0) {
-                options[VOLOPT_FLAGS].i_value |= AFPVOL_MSWINDOWS | AFPVOL_USEDOTS;
-            } else if (strcasecmp(p, "crlf") == 0)
-                options[VOLOPT_FLAGS].i_value |= AFPVOL_CRLF;
-            else if (strcasecmp(p, "ro") == 0)
+            if (strcasecmp(p, "ro") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_RO;
             else if (strcasecmp(p, "nohex") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_NOHEX;
@@ -419,10 +413,6 @@ static void volset(struct vol_option *options, struct vol_option *save,
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_USEDOTS;
             else if (strcasecmp(p, "invisibledots") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_USEDOTS | AFPVOL_INV_DOTS;
-            else if (strcasecmp(p, "limitsize") == 0)
-                options[VOLOPT_FLAGS].i_value |= AFPVOL_LIMITSIZE;
-            else if (strcasecmp(p, "nofileid") == 0)
-                options[VOLOPT_FLAGS].i_value |= AFPVOL_NOFILEID;
             else if (strcasecmp(p, "nostat") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_NOSTAT;
             else if (strcasecmp(p, "preexec_close") == 0)
@@ -1507,9 +1497,7 @@ static int getvolspace(struct vol *vol,
 
     spaceflag = AFPVOL_GVSMASK & vol->v_flags;
     /* report up to 2GB if afp version is < 2.2 (4GB if not) */
-    maxsize = (vol->v_flags & AFPVOL_A2VOL) ? 0x01fffe00 :
-        (((afp_version < 22) || (vol->v_flags & AFPVOL_LIMITSIZE))
-         ? 0x7fffffffL : 0xffffffffL);
+    maxsize = (afp_version < 22) ? 0x7fffffffL : 0xffffffffL;
 
 #ifdef AFS
     if ( spaceflag == AFPVOL_NONE || spaceflag == AFPVOL_AFSGVS ) {
@@ -1668,10 +1656,8 @@ static int getvolparams( uint16_t bitmap, struct vol *vol, struct stat *st, char
             }
             /* prior 2.1 only VOLPBIT_ATTR_RO is defined */
             if (afp_version > 20) {
-                if (0 == (vol->v_flags & AFPVOL_NOFILEID) && vol->v_cdb != NULL &&
-                    (vol->v_cdb->flags & CNID_FLAG_PERSISTENT)) {
+                if (vol->v_cdb != NULL && (vol->v_cdb->flags & CNID_FLAG_PERSISTENT))
                     ashort |= VOLPBIT_ATTR_FILEID;
-                }
                 ashort |= VOLPBIT_ATTR_CATSEARCH;
 
                 if (afp_version >= 30) {
@@ -1942,13 +1928,6 @@ int afp_getsrvrparms(AFPObj *obj, char *ibuf _U_, size_t ibuflen _U_, char *rbuf
         /* set password bit if there's a volume password */
         *data = (volume->v_password) ? AFPSRVR_PASSWD : 0;
 
-        /* Apple 2 clients running ProDOS-8 expect one volume to have
-           bit 0 of this byte set.  They will not recognize anything
-           on the server unless this is the case.  I have not
-           completely worked this out, but it's related to booting
-           from the server.  Support for that function is a ways
-           off.. <shirsch@ibm.net> */
-        *data |= (volume->v_flags & AFPVOL_A2VOL) ? AFPSRVR_CONFIGINFO : 0;
         *data++ |= 0; /* UNIX PRIVS BIT ..., OSX doesn't seem to use it, so we don't either */
         *data++ = len;
         memcpy(data, namebuf, len );
@@ -2609,33 +2588,6 @@ int afp_setvolparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf
     return( AFP_OK );
 }
 
-/* ------------------------- */
-int wincheck(const struct vol *vol, const char *path)
-{
-    int len;
-
-    if (!(vol->v_flags & AFPVOL_MSWINDOWS))
-        return 1;
-
-    /* empty paths are not allowed */
-    if ((len = strlen(path)) == 0)
-        return 0;
-
-    /* leading or trailing whitespaces are not allowed, carriage returns
-     * and probably other whitespace is okay, tabs are not allowed
-     */
-    if ((path[0] == ' ') || (path[len-1] == ' '))
-        return 0;
-
-    /* certain characters are not allowed */
-    if (strpbrk(path, MSWINDOWS_BADCHARS))
-        return 0;
-
-    /* everything else is okay */
-    return 1;
-}
-
-
 /*
  * precreate a folder
  * this is only intended for folders in the volume root
index 194aa1e6074e537931acd935b135599500e94fa8..53676ce8c43f3ad15c20075ebaab6fbcac05d8b5 100644 (file)
@@ -104,16 +104,9 @@ struct vol {
   Flags that alter volume behaviour.
   Keep in sync with libatalk/util/volinfo.c
 */
-#define AFPVOL_A2VOL     (1 << 5)   /* prodos volume */
-#define AFPVOL_CRLF      (1 << 6)   /* cr/lf translation */
 #define AFPVOL_RO        (1 << 8)   /* read-only volume */
-#define AFPVOL_MSWINDOWS (1 << 9)   /* deal with ms-windows yuckiness.
-                                       this is going away. */
 #define AFPVOL_NOHEX     (1 << 10)  /* don't do :hex translation */
 #define AFPVOL_USEDOTS   (1 << 11)  /* use real dots */
-#define AFPVOL_LIMITSIZE (1 << 12)  /* limit size for older macs */
-#define AFPVOL_MAPASCII  (1 << 13)  /* map the ascii range as well */
-#define AFPVOL_NOFILEID  (1 << 15)  /* don't advertise createid resolveid and deleteid calls */
 #define AFPVOL_NOSTAT    (1 << 16)  /* advertise the volume even if we can't stat() it
                                      * maybe because it will be mounted later in preexec */
 #define AFPVOL_UNIX_PRIV (1 << 17)  /* support unix privileges */
@@ -150,10 +143,6 @@ struct vol {
 #define AFPVOL_UUPPERMLOWER    (AFPVOL_MTOUUPPER | AFPVOL_UTOMLOWER)
 #define AFPVOL_ULOWERMUPPER    (AFPVOL_MTOULOWER | AFPVOL_UTOMUPPER)
 
-#define MSWINDOWS_BADCHARS ":\t\\/<>*?|\""
-
-int wincheck(const struct vol *vol, const char *path);
-
 #define AFPVOLSIG_FLAT          0x0001 /* flat fs */
 #define AFPVOLSIG_FIX           0x0002 /* fixed ids */
 #define AFPVOLSIG_VAR           0x0003 /* variable ids */
index 8d3b8c56bb42d74092c9f64e37f9425931a6f674..1e7bad4697db4fcf1daa5dd88e5b9cb350932cd9 100644 (file)
 #endif /* CNID_DB*/
 
 static const vol_opt_name_t vol_opt_names[] = {
-    {AFPVOL_A2VOL,      "PRODOS"},      /* prodos volume */
-    {AFPVOL_CRLF,       "CRLF"},        /* cr/lf translation */
     {AFPVOL_RO,         "READONLY"},    /* read-only volume */
-    {AFPVOL_MSWINDOWS,  "MSWINDOWS"},   /* deal with ms-windows yuckiness. this is going away. */
     {AFPVOL_NOHEX,      "NOHEX"},       /* don't do :hex translation */
     {AFPVOL_USEDOTS,    "USEDOTS"},     /* use real dots */
-    {AFPVOL_LIMITSIZE,  "LIMITSIZE"},   /* limit size for older macs */
-    {AFPVOL_MAPASCII,   "MAPASCII"},    /* map the ascii range as well */
-    {AFPVOL_NOFILEID,   "NOFILEID"},    /* don't advertise createid resolveid and deleteid calls */
     {AFPVOL_NOSTAT,     "NOSTAT"},      /* advertise the volume even if we can't stat() it
                                          * maybe because it will be mounted later in preexec */
     {AFPVOL_UNIX_PRIV,  "UNIXPRIV"},    /* support unix privileges */