]> arthur.barton.de Git - netatalk.git/commitdiff
new option "case sensitive = yes|no", FR #62.
authorHAT <hat@fa2.so-net.ne.jp>
Wed, 6 Aug 2014 13:23:08 +0000 (22:23 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Wed, 6 Aug 2014 13:23:08 +0000 (22:23 +0900)
In spite of being case sensitive as a matter of fact, netatalk
3.1.3 and earlier did not notify kCaseSensitive flag to the client.
Now, it is notified correctly by default.

NEWS
doc/manpages/man5/afp.conf.5.xml
etc/afpd/volume.c
include/atalk/volume.h
libatalk/util/netatalk_conf.c

diff --git a/NEWS b/NEWS
index f332611f7ba365c54f9dc7fbf7427254387d5372..ea6fd9525275e8032971e0bf0f266a4df7ce33d5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ Changes in 3.1.4
 * UPD: afpd: check for modified included config file, FR #95.
 * UPD: libatalk: logger: remove flood protection and allocate messages
 * UPD: Spotlight: use async Tracker SPARQL API
+* NEW: afpd: new option "case sensitive = yes|no" (default: yes)
+       In spite of being case sensitive as a matter of fact, netatalk
+       3.1.3 and earlier did not notify kCaseSensitive flag to the client.
+       Now, it is notified correctly by default, FR #62.
 
 Changes in 3.1.3
 ================
index 2f5ef1a8e4abfc5d6360753aea81d5484601bd3e..b94caafe0002674840286e6f426a70274c57a10e 100644 (file)
@@ -5,7 +5,7 @@
 
     <manvolnum>5</manvolnum>
 
-    <refmiscinfo class="date">05 Jun 2014</refmiscinfo>
+    <refmiscinfo class="date">06 Aug 2014</refmiscinfo>
 
     <refmiscinfo class="source">@NETATALK_VERSION@</refmiscinfo>
   </refmeta>
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term>case sensitive = <replaceable>BOOLEAN</replaceable> (default:
+          <emphasis>yes</emphasis>) <type>(V)</type></term>
+
+          <listitem>
+            <para>Whether to flag volumes as supporting case-sensitive
+            filenames. If the filesystem is case-insensitive, set to no.
+            However, it is not fully verified.</para>
+            <note>
+              <para>In spite of being case sensitive as a matter of fact,
+              netatalk 3.1.3 and earlier did not notify kCaseSensitive flag
+              to the client. Starting with 3.1.4, it is notified correctly by
+              default.</para>
+            </note>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term>cnid dev = <replaceable>BOOLEAN</replaceable> (default:
           <emphasis>yes</emphasis>) <type>(V)</type></term>
index 7bdff75dff53ecf87007a9b001a45c87bae944de..3a057dbcb006e8458699de9e3a23098dcd06768e 100644 (file)
@@ -386,6 +386,8 @@ static int getvolparams(const AFPObj *obj, uint16_t bitmap, struct vol *vol, str
                             ashort |= VOLPBIT_ATTR_EXT_ATTRS;
                         if (vol->v_flags & AFPVOL_ACLS)
                             ashort |= VOLPBIT_ATTR_ACLS;
+                        if (vol->v_casefold & AFPVOL_CASESENS)
+                            ashort |= VOLPBIT_ATTR_CASESENS;
                     }
                 }
             }
index ad8be2b8421ff98a384a907b45145e3a6c0cc298..26e171c2416238ef6b03a3cf88344ecac2e18d48 100644 (file)
@@ -155,6 +155,7 @@ typedef enum {lv_none = 0, lv_all = 1} lv_flags_t;
 #define AFPVOL_UMUPPER         (AFPVOL_MTOUUPPER | AFPVOL_UTOMUPPER)
 #define AFPVOL_UUPPERMLOWER    (AFPVOL_MTOUUPPER | AFPVOL_UTOMLOWER)
 #define AFPVOL_ULOWERMUPPER    (AFPVOL_MTOULOWER | AFPVOL_UTOMUPPER)
+#define AFPVOL_CASESENS        (1 << 4)
 
 #define AFPVOLSIG_FLAT          0x0001 /* flat fs */
 #define AFPVOLSIG_FIX           0x0002 /* fixed ids */
@@ -172,6 +173,7 @@ typedef enum {lv_none = 0, lv_all = 1} lv_flags_t;
 #define VOLPBIT_ATTR_NONETIDS     (1 << 7)
 #define VOLPBIT_ATTR_EXT_ATTRS    (1 << 10)
 #define VOLPBIT_ATTR_ACLS         (1 << 11)
+#define VOLPBIT_ATTR_CASESENS     (1 << 12)
 #define VOLPBIT_ATTR_TM           (1 << 13)
 
 #define VOLPBIT_ATTR    0
index 16ade10c0b8953ddd26b4f5fe5c2af30119176d7..a3f2620d8710510caed19b87d008d7fba2d56974 100644 (file)
@@ -803,6 +803,8 @@ static struct vol *creatvol(AFPObj *obj,
         else if (strcasecmp(val, "xlateupper") == 0)
             volume->v_casefold = AFPVOL_ULOWERMUPPER;
     }
+    if (getoption_bool(obj->iniconfig, section, "case sensitive", preset, 1))
+        volume->v_casefold |= AFPVOL_CASESENS;
 
     if (getoption_bool(obj->iniconfig, section, "read only", preset, 0))
         volume->v_flags |= AFPVOL_RO;