]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote-tracking branch 'origin/branch-netatalk-3-0' into develop
authorRalph Boehme <sloowfranklin@gmail.com>
Tue, 9 Jul 2013 13:45:29 +0000 (15:45 +0200)
committerRalph Boehme <sloowfranklin@gmail.com>
Tue, 9 Jul 2013 13:45:29 +0000 (15:45 +0200)
Conflicts:
libatalk/util/netatalk_conf.c

13 files changed:
NEWS
bin/misc/uuidtest.c
doc/DEVELOPER
doc/manual/upgrade.xml
etc/afpd/afp_config.c
etc/afpd/volume.c
etc/cnid_dbd/cnid_metad.c
include/atalk/dictionary.h
include/atalk/iniparser.h
libatalk/acl/ldap_config.c
libatalk/iniparser/dictionary.c
libatalk/iniparser/iniparser.c
libatalk/util/netatalk_conf.c

diff --git a/NEWS b/NEWS
index c3bd7e90fd311f4e6adb92671555a51fc9e6e50f..c92c8c6c0ceb1a1ea3b3d7fe21a2dd763e0259a5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Changes in 3.1.0
 
 Changes in 3.0.5
 ================
+* FIX: Fix a crash when using pam_winbind. Fixes bug #516.
 
 Changes in 3.0.4
 ================
index 030a4f522d7d3fabafddbcc601caf130123aff17..d2548921283eabf15cada777a749f61377de6f2b 100644 (file)
@@ -48,7 +48,7 @@ static void parse_ldapconf()
 #ifdef HAVE_LDAP
         /* Parse afp.conf */
         printf("Start parsing afp.conf\n");
-        iniconfig = iniparser_load(_PATH_CONFDIR "afp.conf");
+        iniconfig = atalk_iniparser_load(_PATH_CONFDIR "afp.conf");
         acl_ldap_readconfig(iniconfig);
         printf("Finished parsing afp.conf\n");
         if (ldap_config_valid) {
index 2ddb69f6fc410e91078436ff7b3ca81406592300..d0f8b5b58eb4dd51902d3d7d6d48ab1b7e6e933e 100644 (file)
@@ -200,9 +200,9 @@ The ini parser is taken from <http://ndevilla.free.fr/iniparser/>.
 It has been slightly modified:
 - case-sensitive
 - "include" directive added
-- iniparser_getstrdup() to complemnt iniparser_getstring(), it return allocated
+- atalk_iniparser_getstrdup() to complemnt atalk_iniparser_getstring(), it return allocated
   strings which the caller must free as necessary
-- the API has been modifed such that all iniparser_get* funcs take a section and
+- the API has been modifed such that all atalk_iniparser_get* funcs take a section and
   a parameter as sepereta args instead of one string of the form "section:parameter"
   in the original library
 
index ebd196339d16db93807070d76afd005c42aa0a7b..ebffad60b057491ed2dc8af6f14b311924be951a 100644 (file)
@@ -95,7 +95,7 @@
                 <listitem>
                   <para>an Extended Attribute named
                   “<filename>org.netatalk.ResourceFork</filename>”
-                  on Solaris (FreeBSD?) w. ZFS, or in</para>
+                  on Solaris w. ZFS, or in</para>
                 </listitem>
 
                 <listitem>
       </orderedlist></para>
   </sect1>
 
-  <sect1>
-    <title>Notes</title>
-
-    <itemizedlist>
-      <listitem>
-        <para>Solaris ZFS permissions</para>
-
-        <para>On Solaris with ZFS you have to make sure users have
-        filesystem permissions to read, create, modify (default: yes) and
-        delete (default: no) extended attributes.</para>
-
-        <para>To grant this right to a group “staff” you’d use this
-        command:</para>
-
-        <para><command>pfexec chmod A+group:staff:RW:fd:allow
-        /Volumes/test/</command></para>
-
-        <para>Remember to run this once before you share a volume so that
-        this permission inherits appropiately (fd flags in above
-        command).</para>
-      </listitem>
-    </itemizedlist>
-  </sect1>
   <sect1>
     <title>Table with old and new configuration file names</title>
     <para><table frame="all">
index 5a5aaa35df9e6bd1cf51fe13d66368e41a44ab3a..94adb9938e0a668e6988355117cadd4a27323d09 100644 (file)
@@ -213,15 +213,15 @@ int configinit(AFPObj *obj)
         zeroconf_register(obj);
     }
 
-    if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce listener", NULL))) {
+    if ((r = atalk_iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce listener", NULL))) {
                LOG(log_note, logtype_afpd, "Adding FCE listener: %s", r);
                fce_add_udp_socket(r);
     }
-    if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce coalesce", NULL))) {
+    if ((r = atalk_iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce coalesce", NULL))) {
                LOG(log_note, logtype_afpd, "Fce coalesce: %s", r);
                fce_set_coalesce(r);
     }
-    if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce events", NULL))) {
+    if ((r = atalk_iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce events", NULL))) {
                LOG(log_note, logtype_afpd, "Fce events: %s", r);
                fce_set_events(r);
     }
index ce9860010606721532b282adba5475b71b3a31be..5f0d8a3786b3c945b84b5d59372e8d34cace4495 100644 (file)
@@ -858,7 +858,7 @@ int afp_openvol(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
         }
 
         const char *msg;
-        if ((msg = iniparser_getstring(obj->iniconfig, volume->v_configname, "login message",  NULL)) != NULL)
+        if ((msg = atalk_iniparser_getstring(obj->iniconfig, volume->v_configname, "login message",  NULL)) != NULL)
             setmessage(msg);
 
         free(vol_mname);
index 7b7664d52d6febb546718b1eaa42b710c2da5c76..3d71094b328e4c2907eaf547c69bb4bf38a45f99 100644 (file)
@@ -468,7 +468,7 @@ int main(int argc, char *argv[])
 
     (void)setlimits();
 
-    host = iniparser_getstrdup(obj.iniconfig, INISEC_GLOBAL, "cnid listen", "localhost:4700");
+    host = atalk_iniparser_getstrdup(obj.iniconfig, INISEC_GLOBAL, "cnid listen", "localhost:4700");
     if ((port = strrchr(host, ':')))
         *port++ = 0;
     else
index b28d736e09855bed7cfee85c8d1d464bb8434c97..1aa22af85a154237c7899f884e20841d1d5e017a 100644 (file)
@@ -57,12 +57,12 @@ typedef struct _dictionary_ {
                                                        Function prototypes
  ---------------------------------------------------------------------------*/
 
-unsigned   dictionary_hash  (char * key);
-dictionary *dictionary_new  (int size);
-void       dictionary_del   (dictionary * vd);
-const char *dictionary_get  (const dictionary * d, const char *section, const char * key, const char * def);
-int        dictionary_set   (dictionary * vd, char *section, char * key, char * val);
-void       dictionary_unset (dictionary * d, char *section, char * key);
-void       dictionary_dump  (dictionary * d, FILE * out);
+unsigned   atalkdict_hash  (char * key);
+dictionary *atalkdict_new  (int size);
+void       atalkdict_del   (dictionary * vd);
+const char *atalkdict_get  (const dictionary * d, const char *section, const char * key, const char * def);
+int        atalkdict_set   (dictionary * vd, char *section, char * key, char * val);
+void       atalkdict_unset (dictionary * d, char *section, char * key);
+void       atalkdict_dump  (dictionary * d, FILE * out);
 
 #endif
index 8f94c5ca4a11f677c135a12794cbbff9be2114b4..186c90e458f474331f7e7b88e6a6ab1eca97bba6 100644 (file)
 
 #include "dictionary.h"
 
-int        iniparser_getnsec(const dictionary * d);
-const char *iniparser_getsecname(const dictionary * d, int n);
-void       iniparser_dump_ini(const dictionary * d, FILE * f);
-void       iniparser_dump(const dictionary * d, FILE * f);
-const char *iniparser_getstring(const dictionary * d, const char *section, const char * key, const char * def);
-char       *iniparser_getstrdup(const dictionary * d, const char *section, const char * key, const char * def);
-int        iniparser_getint(const dictionary * d, const char *section, const char * key, int notfound);
-double     iniparser_getdouble(const dictionary * d, const char *section, const char * key, double notfound);
-int        iniparser_getboolean(const dictionary * d, const char *section, const char * key, int notfound);
-int        iniparser_set(dictionary * ini, char *section, char * key, char * val);
-void       iniparser_unset(dictionary * ini, char *section, char * key);
-int        iniparser_find_entry(const dictionary * ini, const char * entry) ;
-dictionary *iniparser_load(const char * ininame);
-void       iniparser_freedict(dictionary * d);
+int        atalk_iniparser_getnsec(const dictionary * d);
+const char *atalk_iniparser_getsecname(const dictionary * d, int n);
+void       atalk_iniparser_dump_ini(const dictionary * d, FILE * f);
+void       atalk_iniparser_dump(const dictionary * d, FILE * f);
+const char *atalk_iniparser_getstring(const dictionary * d, const char *section, const char * key, const char * def);
+char       *atalk_iniparser_getstrdup(const dictionary * d, const char *section, const char * key, const char * def);
+int        atalk_iniparser_getint(const dictionary * d, const char *section, const char * key, int notfound);
+double     atalk_iniparser_getdouble(const dictionary * d, const char *section, const char * key, double notfound);
+int        atalk_iniparser_getboolean(const dictionary * d, const char *section, const char * key, int notfound);
+int        atalk_iniparser_set(dictionary * ini, char *section, char * key, char * val);
+void       atalk_iniparser_unset(dictionary * ini, char *section, char * key);
+int        atalk_iniparser_find_entry(const dictionary * ini, const char * entry) ;
+dictionary *atalk_iniparser_load(const char * ininame);
+void       atalk_iniparser_freedict(dictionary * d);
 
 #endif
index 26a63fa9c76dab72f94af1fb812943d50f2ba804..9bf01c1818f4c8f403865ffb6790dec8c248408f 100644 (file)
@@ -49,7 +49,7 @@ int acl_ldap_readconfig(dictionary *iniconfig)
     i = 0;
     /* now see if its a correct pref */
     for (i = 0; ldap_prefs[i].name != NULL; i++) {
-        if ((val = iniparser_getstring(iniconfig, INISEC_GLOBAL, ldap_prefs[i].name, NULL))) {
+        if ((val = atalk_iniparser_getstring(iniconfig, INISEC_GLOBAL, ldap_prefs[i].name, NULL))) {
             /* check if we have pre-defined values */
             if (ldap_prefs[i].intfromarray == 0) {
                 /* no, its just a string */
index f1ff81567aefcccb8da5c45730a8256a40f49920..191db576d52e95ece30eb1de5312dd71442073bc 100644 (file)
@@ -107,7 +107,7 @@ static char * xstrdup(char * s)
   by comparing the key itself in last resort.
  */
 /*--------------------------------------------------------------------------*/
-unsigned dictionary_hash(char * key)
+unsigned atalkdict_hash(char * key)
 {
        int                     len ;
        unsigned        hash ;
@@ -136,7 +136,7 @@ unsigned dictionary_hash(char * key)
   dictionary, give size=0.
  */
 /*--------------------------------------------------------------------------*/
-dictionary * dictionary_new(int size)
+dictionary * atalkdict_new(int size)
 {
        dictionary      *       d ;
 
@@ -162,7 +162,7 @@ dictionary * dictionary_new(int size)
   Deallocate a dictionary object and all memory associated to it.
  */
 /*--------------------------------------------------------------------------*/
-void dictionary_del(dictionary * d)
+void atalkdict_del(dictionary * d)
 {
        int             i ;
 
@@ -194,12 +194,12 @@ void dictionary_del(dictionary * d)
   dictionary object, you should not try to free it or modify it.
  */
 /*--------------------------------------------------------------------------*/
-const char * dictionary_get(const dictionary * d, const char *section, const char * key, const char * def)
+const char * atalkdict_get(const dictionary * d, const char *section, const char * key, const char * def)
 {
        unsigned        hash ;
        int                     i ;
 
-       hash = dictionary_hash(makekey(section, key));
+       hash = atalkdict_hash(makekey(section, key));
        for (i=0 ; i<d->size ; i++) {
         if (d->key[i]==NULL)
             continue ;
@@ -230,8 +230,8 @@ const char * dictionary_get(const dictionary * d, const char *section, const cha
   or the key are considered as errors: the function will return immediately
   in such a case.
 
-  Notice that if you dictionary_set a variable to NULL, a call to
-  dictionary_get will return a NULL value: the variable will be found, and
+  Notice that if you atalkdict_set a variable to NULL, a call to
+  atalkdict_get will return a NULL value: the variable will be found, and
   its value (NULL) is returned. In other words, setting the variable
   content to NULL is equivalent to deleting the variable from the
   dictionary. It is not possible (in this implementation) to have a key in
@@ -240,7 +240,7 @@ const char * dictionary_get(const dictionary * d, const char *section, const cha
   This function returns non-zero in case of failure.
  */
 /*--------------------------------------------------------------------------*/
-int dictionary_set(dictionary * d, char *section, char * key, char * val)
+int atalkdict_set(dictionary * d, char *section, char * key, char * val)
 {
        int                     i ;
        unsigned        hash ;
@@ -248,7 +248,7 @@ int dictionary_set(dictionary * d, char *section, char * key, char * val)
        if (d==NULL || section==NULL) return -1 ;
        
        /* Compute hash for this key */
-       hash = dictionary_hash(makekey(section, key));
+       hash = atalkdict_hash(makekey(section, key));
        /* Find if value is already in dictionary */
        if (d->n>0) {
                for (i=0 ; i<d->size ; i++) {
@@ -308,7 +308,7 @@ int dictionary_set(dictionary * d, char *section, char * key, char * val)
   key cannot be found.
  */
 /*--------------------------------------------------------------------------*/
-void dictionary_unset(dictionary * d, char *section, char * key)
+void atalkdict_unset(dictionary * d, char *section, char * key)
 {
        unsigned        hash ;
        int                     i ;
@@ -317,7 +317,7 @@ void dictionary_unset(dictionary * d, char *section, char * key)
                return;
        }
 
-       hash = dictionary_hash(makekey(section, key));
+       hash = atalkdict_hash(makekey(section, key));
        for (i=0 ; i<d->size ; i++) {
         if (d->key[i]==NULL)
             continue ;
@@ -357,7 +357,7 @@ void dictionary_unset(dictionary * d, char *section, char * key)
   output file pointers.
  */
 /*--------------------------------------------------------------------------*/
-void dictionary_dump(dictionary * d, FILE * out)
+void atalkdict_dump(dictionary * d, FILE * out)
 {
        int             i ;
 
index 93e14b6b46b55b6b29bbe7802b68ca70b416e881..53f6a108382513b51495251dec09fa8e2e14dcf4 100644 (file)
@@ -88,7 +88,7 @@ static char * strstrip(char * s)
   This function returns -1 in case of error.
  */
 /*--------------------------------------------------------------------------*/
-int iniparser_getnsec(const dictionary * d)
+int atalk_iniparser_getnsec(const dictionary * d)
 {
     int i ;
     int nsec ;
@@ -119,7 +119,7 @@ int iniparser_getnsec(const dictionary * d)
   This function returns NULL in case of error.
  */
 /*--------------------------------------------------------------------------*/
-const char * iniparser_getsecname(const dictionary * d, int n)
+const char * atalk_iniparser_getsecname(const dictionary * d, int n)
 {
     int i ;
     int foundsec ;
@@ -154,7 +154,7 @@ const char * iniparser_getsecname(const dictionary * d, int n)
   purposes mostly.
  */
 /*--------------------------------------------------------------------------*/
-void iniparser_dump(const dictionary * d, FILE * f)
+void atalk_iniparser_dump(const dictionary * d, FILE * f)
 {
     int     i ;
 
@@ -182,7 +182,7 @@ void iniparser_dump(const dictionary * d, FILE * f)
   It is Ok to specify @c stderr or @c stdout as output files.
  */
 /*--------------------------------------------------------------------------*/
-void iniparser_dump_ini(const dictionary * d, FILE * f)
+void atalk_iniparser_dump_ini(const dictionary * d, FILE * f)
 {
     int     i, j ;
     char    keym[ASCIILINESZ+1];
@@ -192,7 +192,7 @@ void iniparser_dump_ini(const dictionary * d, FILE * f)
 
     if (d==NULL || f==NULL) return ;
 
-    nsec = iniparser_getnsec(d);
+    nsec = atalk_iniparser_getnsec(d);
     if (nsec<1) {
         /* No section in file: dump all keys as they are */
         for (i=0 ; i<d->size ; i++) {
@@ -203,7 +203,7 @@ void iniparser_dump_ini(const dictionary * d, FILE * f)
         return ;
     }
     for (i=0 ; i<nsec ; i++) {
-        secname = iniparser_getsecname(d, i) ;
+        secname = atalk_iniparser_getsecname(d, i) ;
         seclen  = (int)strlen(secname);
         fprintf(f, "\n[%s]\n", secname);
         sprintf(keym, "%s:", secname);
@@ -238,14 +238,14 @@ void iniparser_dump_ini(const dictionary * d, FILE * f)
   the dictionary, do not free or modify it.
  */
 /*--------------------------------------------------------------------------*/
-const char * iniparser_getstring(const dictionary * d, const char *section, const char * key, const char * def)
+const char * atalk_iniparser_getstring(const dictionary * d, const char *section, const char * key, const char * def)
 {
     const char * sval ;
 
     if (d==NULL || key==NULL)
         return def ;
 
-    sval = dictionary_get(d, section, key, def);
+    sval = atalkdict_get(d, section, key, def);
     return sval ;
 }
 
@@ -264,14 +264,14 @@ const char * iniparser_getstring(const dictionary * d, const char *section, cons
   The returned char pointer a strdup'ed allocated string, so the caller must free it.
  */
 /*--------------------------------------------------------------------------*/
-char * iniparser_getstrdup(const dictionary * d, const char *section, const char * key, const char * def)
+char * atalk_iniparser_getstrdup(const dictionary * d, const char *section, const char * key, const char * def)
 {
     const char * sval ;
 
     if (d==NULL || key==NULL)
         return NULL;
 
-    if ((sval = dictionary_get(d, section, key, def)))
+    if ((sval = atalkdict_get(d, section, key, def)))
         return strdup(sval);
     return NULL;
 }
@@ -304,11 +304,11 @@ char * iniparser_getstrdup(const dictionary * d, const char *section, const char
   Credits: Thanks to A. Becker for suggesting strtol()
  */
 /*--------------------------------------------------------------------------*/
-int iniparser_getint(const dictionary * d, const char *section, const char * key, int notfound)
+int atalk_iniparser_getint(const dictionary * d, const char *section, const char * key, int notfound)
 {
     const char    *   str ;
 
-    str = iniparser_getstring(d, section, key, INI_INVALID_KEY);
+    str = atalk_iniparser_getstring(d, section, key, INI_INVALID_KEY);
     if (str==INI_INVALID_KEY) return notfound ;
     return (int)strtol(str, NULL, 0);
 }
@@ -327,11 +327,11 @@ int iniparser_getint(const dictionary * d, const char *section, const char * key
   the notfound value is returned.
  */
 /*--------------------------------------------------------------------------*/
-double iniparser_getdouble(const dictionary * d, const char *section, const char * key, double notfound)
+double atalk_iniparser_getdouble(const dictionary * d, const char *section, const char * key, double notfound)
 {
     const char    *   str ;
 
-    str = iniparser_getstring(d, section, key, INI_INVALID_KEY);
+    str = atalk_iniparser_getstring(d, section, key, INI_INVALID_KEY);
     if (str==INI_INVALID_KEY) return notfound ;
     return atof(str);
 }
@@ -369,12 +369,12 @@ double iniparser_getdouble(const dictionary * d, const char *section, const char
   necessarily have to be 0 or 1.
  */
 /*--------------------------------------------------------------------------*/
-int iniparser_getboolean(const dictionary * d, const char *section, const char * key, int notfound)
+int atalk_iniparser_getboolean(const dictionary * d, const char *section, const char * key, int notfound)
 {
     const char    *   c ;
     int         ret ;
 
-    c = iniparser_getstring(d, section, key, INI_INVALID_KEY);
+    c = atalk_iniparser_getstring(d, section, key, INI_INVALID_KEY);
     if (c==INI_INVALID_KEY) return notfound ;
     if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') {
         ret = 1 ;
@@ -398,10 +398,10 @@ int iniparser_getboolean(const dictionary * d, const char *section, const char *
   of querying for the presence of sections in a dictionary.
  */
 /*--------------------------------------------------------------------------*/
-int iniparser_find_entry(const dictionary *ini, const char *entry)
+int atalk_iniparser_find_entry(const dictionary *ini, const char *entry)
 {
     int found=0 ;
-    if (iniparser_getstring(ini, entry, NULL, INI_INVALID_KEY)!=INI_INVALID_KEY) {
+    if (atalk_iniparser_getstring(ini, entry, NULL, INI_INVALID_KEY)!=INI_INVALID_KEY) {
         found = 1 ;
     }
     return found ;
@@ -421,9 +421,9 @@ int iniparser_find_entry(const dictionary *ini, const char *entry)
   It is Ok to set val to NULL.
  */
 /*--------------------------------------------------------------------------*/
-int iniparser_set(dictionary * ini, char *section, char * key, char * val)
+int atalk_iniparser_set(dictionary * ini, char *section, char * key, char * val)
 {
-    return dictionary_set(ini, section, key, val) ;
+    return atalkdict_set(ini, section, key, val) ;
 }
 
 /*-------------------------------------------------------------------------*/
@@ -437,9 +437,9 @@ int iniparser_set(dictionary * ini, char *section, char * key, char * val)
   If the given entry can be found, it is deleted from the dictionary.
  */
 /*--------------------------------------------------------------------------*/
-void iniparser_unset(dictionary * ini, char *section, char * key)
+void atalk_iniparser_unset(dictionary * ini, char *section, char * key)
 {
-    dictionary_unset(ini, section, key);
+    atalkdict_unset(ini, section, key);
 }
 
 /*-------------------------------------------------------------------------*/
@@ -452,7 +452,7 @@ void iniparser_unset(dictionary * ini, char *section, char * key)
   @return   line_status value
  */
 /*--------------------------------------------------------------------------*/
-static line_status iniparser_line(
+static line_status atalk_iniparser_line(
     char * input_line,
     char * section,
     char * key,
@@ -522,10 +522,10 @@ static line_status iniparser_line(
   should not be accessed directly, but through accessor functions
   instead.
 
-  The returned dictionary must be freed using iniparser_freedict().
+  The returned dictionary must be freed using atalk_iniparser_freedict().
  */
 /*--------------------------------------------------------------------------*/
-dictionary * iniparser_load(const char * ininame)
+dictionary * atalk_iniparser_load(const char * ininame)
 {
     FILE *in, *include = NULL, *inifile;
 
@@ -546,7 +546,7 @@ dictionary * iniparser_load(const char * ininame)
         return NULL ;
     }
 
-    dict = dictionary_new(0) ;
+    dict = atalkdict_new(0) ;
     if (!dict) {
         fclose(inifile);
         return NULL ;
@@ -587,14 +587,14 @@ dictionary * iniparser_load(const char * ininame)
         } else {
             last=0 ;
         }
-        switch (iniparser_line(line, section, key, val)) {
+        switch (atalk_iniparser_line(line, section, key, val)) {
         case LINE_EMPTY:
         case LINE_COMMENT:
             break ;
         case LINE_SECTION:
             if (strchr(section, ':') != NULL)
                 LOG(log_error, logtype_default, "iniparser: syntax error \"%s\" section name must not contain \":\".", section);
-            errs = dictionary_set(dict, section, NULL, NULL);
+            errs = atalkdict_set(dict, section, NULL, NULL);
             break ;
         case LINE_VALUE:
             if (strcmp(key, "include") == 0) {
@@ -605,7 +605,7 @@ dictionary * iniparser_load(const char * ininame)
                 in = include;
                 continue;
             }
-            errs = dictionary_set(dict, section, key, val) ;
+            errs = atalkdict_set(dict, section, key, val) ;
             break ;
         case LINE_ERROR:
             LOG(log_error, logtype_default, "iniparser: syntax error in %s (lineno: %d): %s",
@@ -623,7 +623,7 @@ dictionary * iniparser_load(const char * ininame)
         }
     }
     if (errs) {
-        dictionary_del(dict);
+        atalkdict_del(dict);
         dict = NULL ;
     }
     fclose(in);
@@ -641,8 +641,8 @@ dictionary * iniparser_load(const char * ininame)
   gets out of the current context.
  */
 /*--------------------------------------------------------------------------*/
-void iniparser_freedict(dictionary * d)
+void atalk_iniparser_freedict(dictionary * d)
 {
-    dictionary_del(d);
+    atalkdict_del(d);
 }
 
index 88bf6aa364921030306eb51a21774b8f93634eb5..f86eab67cde240ba9ef2ce7c9611ef316471a408 100644 (file)
@@ -516,8 +516,8 @@ static const char *getoption(const dictionary *conf, const char *vol, const char
 {
     const char *result;
 
-    if ((!(result = iniparser_getstring(conf, vol, opt, NULL))) && (defsec != NULL))
-        result = iniparser_getstring(conf, defsec, opt, NULL);
+    if ((!(result = atalk_iniparser_getstring(conf, vol, opt, NULL))) && (defsec != NULL))
+        result = atalk_iniparser_getstring(conf, defsec, opt, NULL);
     
     if (result == NULL)
         result = defval;
@@ -539,8 +539,8 @@ static int getoption_bool(const dictionary *conf, const char *vol, const char *o
 {
     int result;
 
-    if (((result = iniparser_getboolean(conf, vol, opt, -1)) == -1) && (defsec != NULL))
-        result = iniparser_getboolean(conf, defsec, opt, -1);
+    if (((result = atalk_iniparser_getboolean(conf, vol, opt, -1)) == -1) && (defsec != NULL))
+        result = atalk_iniparser_getboolean(conf, defsec, opt, -1);
     
     if (result == -1)
         result = defval;
@@ -668,7 +668,7 @@ static struct vol *creatvol(AFPObj *obj,
         if(tmpname[i] == '/') tmpname[i] = ':';
 
     bstring dbpath;
-    EC_NULL( val = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "vol dbpath", _PATH_STATEDIR "CNID/") );
+    EC_NULL( val = atalk_iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "vol dbpath", _PATH_STATEDIR "CNID/") );
     EC_NULL( dbpath = bformat("%s/%s/", val, tmpname) );
     EC_NULL( volume->v_dbpath = strdup(cfrombstr(dbpath)) );
     bdestroy(dbpath);
@@ -989,16 +989,16 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent)
 
     LOG(log_debug, logtype_afpd, "readvolfile: BEGIN");
 
-    int secnum = iniparser_getnsec(obj->iniconfig);    
+    int secnum = atalk_iniparser_getnsec(obj->iniconfig);    
     LOG(log_debug, logtype_afpd, "readvolfile: sections: %d", secnum);
     const char *secname;
 
-    if ((default_preset = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "vol preset", NULL))) {
+    if ((default_preset = atalk_iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "vol preset", NULL))) {
         LOG(log_debug, logtype_afpd, "readvolfile: default_preset: %s", default_preset);
     }
 
     for (i = 0; i < secnum; i++) { 
-        secname = iniparser_getsecname(obj->iniconfig, i);
+        secname = atalk_iniparser_getsecname(obj->iniconfig, i);
 
         if (!vol_section(secname))
             continue;
@@ -1016,7 +1016,7 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent)
                 continue;
 
             /* check if user home matches our "basedir regex" */
-            if ((basedir = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "basedir regex", NULL)) == NULL) {
+            if ((basedir = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "basedir regex", NULL)) == NULL) {
                 LOG(log_error, logtype_afpd, "\"basedir regex =\" must be defined in [Homes] section");
                 continue;
             }
@@ -1035,13 +1035,13 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent)
                 continue;
             }
 
-            if ((p = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "path", NULL))) {
+            if ((p = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "path", NULL))) {
                 strlcat(tmp, "/", MAXPATHLEN);
                 strlcat(tmp, p, MAXPATHLEN);
             }
         } else {
             /* Get path */
-            if ((p = iniparser_getstring(obj->iniconfig, secname, "path", NULL)) == NULL)
+            if ((p = atalk_iniparser_getstring(obj->iniconfig, secname, "path", NULL)) == NULL)
                 continue;
             strlcpy(tmp, p, MAXPATHLEN);
         }
@@ -1051,7 +1051,7 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent)
 
         /* do variable substitution for volume name */
         if (STRCMP(secname, ==, INISEC_HOMES)) {
-            p = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "home name", "$u's home");
+            p = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "home name", "$u's home");
             if (strstr(p, "$u") == NULL) {
                 LOG(log_warning, logtype_afpd, "home name must contain $u.");
                 p = "$u's home";
@@ -1067,7 +1067,7 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent)
         if (volxlate(obj, volname, sizeof(volname) - 1, tmp, pwent, path, NULL) == NULL)
             continue;
 
-        preset = iniparser_getstring(obj->iniconfig, secname, "vol preset", NULL);
+        preset = atalk_iniparser_getstring(obj->iniconfig, secname, "vol preset", NULL);
 
         if ((realvolpath = realpath_safe(path)) == NULL)
             continue;
@@ -1373,9 +1373,9 @@ int load_volumes(AFPObj *obj)
     }
 
     if (obj->iniconfig)
-        iniparser_freedict(obj->iniconfig);
+        atalk_iniparser_freedict(obj->iniconfig);
     LOG(log_debug, logtype_afpd, "load_volumes: loading: %s", obj->options.configfile);
-    obj->iniconfig = iniparser_load(obj->options.configfile);
+    obj->iniconfig = atalk_iniparser_load(obj->options.configfile);
 
     EC_ZERO_LOG( readvolfile(obj, pwent) );
 
@@ -1558,10 +1558,10 @@ struct vol *getvolbypath(AFPObj *obj, const char *path)
     if (!have_uservol) /* (2) */
         EC_FAIL_LOG("getvolbypath(\"%s\"): no volume for path", path);
 
-    int secnum = iniparser_getnsec(obj->iniconfig);
+    int secnum = atalk_iniparser_getnsec(obj->iniconfig);
 
     for (int i = 0; i < secnum; i++) { 
-        secname = iniparser_getsecname(obj->iniconfig, i);
+        secname = atalk_iniparser_getsecname(obj->iniconfig, i);
         if (STRCMP(secname, ==, INISEC_HOMES))
             break;
     }
@@ -1570,7 +1570,7 @@ struct vol *getvolbypath(AFPObj *obj, const char *path)
         EC_FAIL_LOG("getvolbypath(\"%s\"): no volume for path", path);
 
     /* (3) */
-    EC_NULL_LOG( basedir = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "basedir regex", NULL) );
+    EC_NULL_LOG( basedir = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "basedir regex", NULL) );
     LOG(log_debug, logtype_afpd, "getvolbypath: user home section: '%s', basedir: '%s'", secname, basedir);
 
     if (regexerr != 0 && (regexerr = regcomp(&reg, basedir, REG_EXTENDED)) != 0) {
@@ -1619,7 +1619,7 @@ struct vol *getvolbypath(AFPObj *obj, const char *path)
     strlcat(tmpbuf, "/", MAXPATHLEN);
 
     /* (6) */
-    if ((subpathconfig = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "path", NULL))) {
+    if ((subpathconfig = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "path", NULL))) {
         /*
         if (!subpath || strncmp(subpathconfig, subpath, strlen(subpathconfig)) != 0) {
             EC_FAIL;
@@ -1641,15 +1641,15 @@ struct vol *getvolbypath(AFPObj *obj, const char *path)
         path, user, pw->pw_dir, realvolpath);
 
     /* do variable substitution for volume name */
-    p = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "home name", "$u's home");
+    p = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "home name", "$u's home");
     if (strstr(p, "$u") == NULL)
         p = "$u's home";
     strlcpy(tmpbuf, p, AFPVOL_U8MNAMELEN);
     EC_NULL_LOG( volxlate(obj, volname, sizeof(volname) - 1, tmpbuf, pw, realvolpath, NULL) );
 
     const char  *preset, *default_preset;
-    default_preset = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "vol preset", NULL);
-    preset = iniparser_getstring(obj->iniconfig, INISEC_HOMES, "vol preset", NULL);
+    default_preset = atalk_iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "vol preset", NULL);
+    preset = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "vol preset", NULL);
 
     vol = creatvol(obj, pw, INISEC_HOMES, volname, realvolpath, preset ? preset : default_preset ? default_preset : NULL);
 
@@ -1706,73 +1706,73 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
 #endif
     options->flags       = OPTION_UUID | AFPObj->cmdlineflags;
     
-    if ((config = iniparser_load(AFPObj->options.configfile)) == NULL)
+    if ((config = atalk_iniparser_load(AFPObj->options.configfile)) == NULL)
         return -1;
     AFPObj->iniconfig = config;
 
     /* [Global] */
-    options->logconfig = iniparser_getstrdup(config, INISEC_GLOBAL, "log level", "default:note");
-    options->logfile   = iniparser_getstrdup(config, INISEC_GLOBAL, "log file",  NULL);
+    options->logconfig = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "log level", "default:note");
+    options->logfile   = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "log file",  NULL);
 
     setuplog(options->logconfig, options->logfile);
 
     /* "server options" boolean options */
-    if (!iniparser_getboolean(config, INISEC_GLOBAL, "zeroconf", 1))
+    if (!atalk_iniparser_getboolean(config, INISEC_GLOBAL, "zeroconf", 1))
         options->flags |= OPTION_NOZEROCONF;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "advertise ssh", 0))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "advertise ssh", 0))
         options->flags |= OPTION_ANNOUNCESSH;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "close vol", 0))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "close vol", 0))
         options->flags |= OPTION_CLOSEVOL;
-    if (!iniparser_getboolean(config, INISEC_GLOBAL, "client polling", 0))
+    if (!atalk_iniparser_getboolean(config, INISEC_GLOBAL, "client polling", 0))
         options->flags |= OPTION_SERVERNOTIF;
-    if (!iniparser_getboolean(config, INISEC_GLOBAL, "use sendfile", 1))
+    if (!atalk_iniparser_getboolean(config, INISEC_GLOBAL, "use sendfile", 1))
         options->flags |= OPTION_NOSENDFILE;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "solaris share reservations", 1))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "solaris share reservations", 1))
         options->flags |= OPTION_SHARE_RESERV;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "afpstats", 0))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "afpstats", 0))
         options->flags |= OPTION_DBUS_AFPSTATS;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "afp read locks", 0))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "afp read locks", 0))
         options->flags |= OPTION_AFP_READ_LOCK;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "spotlight", 0))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "spotlight", 0))
         options->flags |= OPTION_SPOTLIGHT_VOL;
-    if (!iniparser_getboolean(config, INISEC_GLOBAL, "save password", 1))
+    if (!atalk_iniparser_getboolean(config, INISEC_GLOBAL, "save password", 1))
         options->passwdbits |= PASSWD_NOSAVE;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "set password", 0))
+    if (atalk_iniparser_getboolean(config, INISEC_GLOBAL, "set password", 0))
         options->passwdbits |= PASSWD_SET;
 
     /* figure out options w values */
-    options->loginmesg      = iniparser_getstrdup(config, INISEC_GLOBAL, "login message",  NULL);
-    options->guest          = iniparser_getstrdup(config, INISEC_GLOBAL, "guest account",  "nobody");
-    options->extmapfile     = iniparser_getstrdup(config, INISEC_GLOBAL, "extmap file",    _PATH_CONFDIR "extmap.conf");
-    options->passwdfile     = iniparser_getstrdup(config, INISEC_GLOBAL, "passwd file",    _PATH_AFPDPWFILE);
-    options->uampath        = iniparser_getstrdup(config, INISEC_GLOBAL, "uam path",       _PATH_AFPDUAMPATH);
-    options->uamlist        = iniparser_getstrdup(config, INISEC_GLOBAL, "uam list",       "uams_dhx.so uams_dhx2.so");
-    options->port           = iniparser_getstrdup(config, INISEC_GLOBAL, "afp port",       "548");
-    options->signatureopt   = iniparser_getstrdup(config, INISEC_GLOBAL, "signature",      "");
-    options->k5service      = iniparser_getstrdup(config, INISEC_GLOBAL, "k5 service",     NULL);
-    options->k5realm        = iniparser_getstrdup(config, INISEC_GLOBAL, "k5 realm",       NULL);
-    options->listen         = iniparser_getstrdup(config, INISEC_GLOBAL, "afp listen",     NULL);
-    options->interfaces     = iniparser_getstrdup(config, INISEC_GLOBAL, "afp interfaces", NULL);
-    options->ntdomain       = iniparser_getstrdup(config, INISEC_GLOBAL, "nt domain",      NULL);
-    options->addomain       = iniparser_getstrdup(config, INISEC_GLOBAL, "ad domain",      NULL);
-    options->ntseparator    = iniparser_getstrdup(config, INISEC_GLOBAL, "nt separator",   NULL);
-    options->mimicmodel     = iniparser_getstrdup(config, INISEC_GLOBAL, "mimic model",    NULL);
-    options->adminauthuser  = iniparser_getstrdup(config, INISEC_GLOBAL, "admin auth user",NULL);
-    options->connections    = iniparser_getint   (config, INISEC_GLOBAL, "max connections",200);
-    options->passwdminlen   = iniparser_getint   (config, INISEC_GLOBAL, "passwd minlen",  0);
-    options->tickleval      = iniparser_getint   (config, INISEC_GLOBAL, "tickleval",      30);
-    options->timeout        = iniparser_getint   (config, INISEC_GLOBAL, "timeout",        4);
-    options->dsireadbuf     = iniparser_getint   (config, INISEC_GLOBAL, "dsireadbuf",     12);
-    options->server_quantum = iniparser_getint   (config, INISEC_GLOBAL, "server quantum", DSI_SERVQUANT_DEF);
-    options->volnamelen     = iniparser_getint   (config, INISEC_GLOBAL, "volnamelen",     80);
-    options->dircachesize   = iniparser_getint   (config, INISEC_GLOBAL, "dircachesize",   DEFAULT_MAX_DIRCACHE_SIZE);
-    options->tcp_sndbuf     = iniparser_getint   (config, INISEC_GLOBAL, "tcpsndbuf",      0);
-    options->tcp_rcvbuf     = iniparser_getint   (config, INISEC_GLOBAL, "tcprcvbuf",      0);
-    options->fce_fmodwait   = iniparser_getint   (config, INISEC_GLOBAL, "fce holdfmod",   60);
-    options->sleep          = iniparser_getint   (config, INISEC_GLOBAL, "sleep time",     10);
-    options->disconnected   = iniparser_getint   (config, INISEC_GLOBAL, "disconnect time",24);
-
-    p = iniparser_getstring(config, INISEC_GLOBAL, "map acls", "rights");
+    options->loginmesg      = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "login message",  NULL);
+    options->guest          = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "guest account",  "nobody");
+    options->extmapfile     = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "extmap file",    _PATH_CONFDIR "extmap.conf");
+    options->passwdfile     = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "passwd file",    _PATH_AFPDPWFILE);
+    options->uampath        = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "uam path",       _PATH_AFPDUAMPATH);
+    options->uamlist        = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "uam list",       "uams_dhx.so uams_dhx2.so");
+    options->port           = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "afp port",       "548");
+    options->signatureopt   = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "signature",      "");
+    options->k5service      = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "k5 service",     NULL);
+    options->k5realm        = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "k5 realm",       NULL);
+    options->listen         = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "afp listen",     NULL);
+    options->interfaces     = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "afp interfaces", NULL);
+    options->ntdomain       = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "nt domain",      NULL);
+    options->addomain       = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "ad domain",      NULL);
+    options->ntseparator    = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "nt separator",   NULL);
+    options->mimicmodel     = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "mimic model",    NULL);
+    options->adminauthuser  = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "admin auth user",NULL);
+    options->connections    = atalk_iniparser_getint   (config, INISEC_GLOBAL, "max connections",200);
+    options->passwdminlen   = atalk_iniparser_getint   (config, INISEC_GLOBAL, "passwd minlen",  0);
+    options->tickleval      = atalk_iniparser_getint   (config, INISEC_GLOBAL, "tickleval",      30);
+    options->timeout        = atalk_iniparser_getint   (config, INISEC_GLOBAL, "timeout",        4);
+    options->dsireadbuf     = atalk_iniparser_getint   (config, INISEC_GLOBAL, "dsireadbuf",     12);
+    options->server_quantum = atalk_iniparser_getint   (config, INISEC_GLOBAL, "server quantum", DSI_SERVQUANT_DEF);
+    options->volnamelen     = atalk_iniparser_getint   (config, INISEC_GLOBAL, "volnamelen",     80);
+    options->dircachesize   = atalk_iniparser_getint   (config, INISEC_GLOBAL, "dircachesize",   DEFAULT_MAX_DIRCACHE_SIZE);
+    options->tcp_sndbuf     = atalk_iniparser_getint   (config, INISEC_GLOBAL, "tcpsndbuf",      0);
+    options->tcp_rcvbuf     = atalk_iniparser_getint   (config, INISEC_GLOBAL, "tcprcvbuf",      0);
+    options->fce_fmodwait   = atalk_iniparser_getint   (config, INISEC_GLOBAL, "fce holdfmod",   60);
+    options->sleep          = atalk_iniparser_getint   (config, INISEC_GLOBAL, "sleep time",     10);
+    options->disconnected   = atalk_iniparser_getint   (config, INISEC_GLOBAL, "disconnect time",24);
+
+    p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "map acls", "rights");
     if (STRCMP(p, ==, "rights"))
         options->flags |= OPTION_ACL2MACCESS;
     else if (STRCMP(p, ==, "mode"))
@@ -1784,7 +1784,7 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
         }
     }
 
-    if ((p = iniparser_getstring(config, INISEC_GLOBAL, "hostname", NULL))) {
+    if ((p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "hostname", NULL))) {
         EC_NULL_LOG( options->hostname = strdup(p) );
     } else {
         if (gethostname(val, sizeof(val)) < 0 ) {
@@ -1796,21 +1796,21 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
         options->hostname = strdup(val);
     }
 
-    if ((p = iniparser_getstring(config, INISEC_GLOBAL, "k5 keytab", NULL))) {
+    if ((p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "k5 keytab", NULL))) {
         EC_NULL_LOG( options->k5keytab = malloc(strlen(p) + 14) );
         snprintf(options->k5keytab, strlen(p) + 14, "KRB5_KTNAME=%s", p);
         putenv(options->k5keytab);
     }
 
 #ifdef ADMIN_GRP
-    if ((p = iniparser_getstring(config, INISEC_GLOBAL, "admin group",  NULL))) {
+    if ((p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "admin group",  NULL))) {
          struct group *gr = getgrnam(p);
          if (gr != NULL)
              options->admingid = gr->gr_gid;
     }
 #endif /* ADMIN_GRP */
 
-    q = iniparser_getstrdup(config, INISEC_GLOBAL, "cnid server", "localhost:4700");
+    q = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "cnid server", "localhost:4700");
     r = strrchr(q, ':');
     if (r)
         *r = 0;
@@ -1823,7 +1823,7 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
     if (q)
         free(q);
 
-    if ((q = iniparser_getstrdup(config, INISEC_GLOBAL, "fqdn", NULL))) {
+    if ((q = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "fqdn", NULL))) {
         /* do a little checking for the domain name. */
         r = strchr(q, ':');
         if (r)
@@ -1841,7 +1841,7 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
     /* Charset Options */
 
     /* unix charset is in [G] only */
-    if (!(p = iniparser_getstring(config, INISEC_GLOBAL, "unix charset", NULL))) {
+    if (!(p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "unix charset", NULL))) {
         options->unixcodepage = strdup("UTF8");
         set_charset_name(CH_UNIX, "UTF8");
     } else {
@@ -1865,7 +1865,7 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
     LOG(log_debug, logtype_afpd, "Global unix charset is %s", options->unixcodepage);
 
     /* vol charset is in [G] and [V] */
-    if (!(p = iniparser_getstring(config, INISEC_GLOBAL, "vol charset", NULL))) {
+    if (!(p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "vol charset", NULL))) {
         options->volcodepage = strdup(options->unixcodepage);
     } else {
         if (strcasecmp(p, "UTF-8") == 0) {
@@ -1876,7 +1876,7 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
     LOG(log_debug, logtype_afpd, "Global vol charset is %s", options->volcodepage);
     
     /* mac charset is in [G] and [V] */
-    if (!(p = iniparser_getstring(config, INISEC_GLOBAL, "mac charset", NULL))) {
+    if (!(p = atalk_iniparser_getstring(config, INISEC_GLOBAL, "mac charset", NULL))) {
         options->maccodepage = strdup("MAC_ROMAN");
         set_charset_name(CH_MAC, "MAC_ROMAN");
     } else {
@@ -1991,6 +1991,6 @@ void afp_config_free(AFPObj *obj)
 
     /* Free everything called from afp_config_parse() */
     free_extmap();
-    iniparser_freedict(obj->iniconfig);
+    atalk_iniparser_freedict(obj->iniconfig);
     free_charset_names();
 }