#include "config.h"
#endif /* HAVE_CONFIG_H */
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#ifdef HAVE_FCNTL_H
#include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
#include <sys/param.h>
-#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
-#endif /* HAVE_SYS_STAT_H */
#include <time.h>
#include <sys/file.h>
+#include <arpa/inet.h>
-#include <netatalk/endian.h>
#include <atalk/cnid_dbd_private.h>
#include <atalk/logger.h>
#include <atalk/volinfo.h>
*/
#define DBOPTIONS (DB_CREATE | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_RECOVER)
-/* Global */
+/* Global, needed by pack.c:idxname() */
struct volinfo volinfo;
static DBD *dbd;
LOG(log_error, logtype_cnid, "Error loading charsets!");
exit(EXIT_FAILURE);
}
- LOG(log_note, logtype_cnid, "db dir: \"%s\"", dbpath);
+ LOG(log_debug, logtype_cnid, "db dir: \"%s\"", dbpath);
switch_to_user(dbpath);
exit(1);
LOG(log_maxdebug, logtype_cnid, "Finished parsing db_param config file");
- if (NULL == (dbd = dbif_init(".", "cnid2.db")))
+ if (NULL == (dbd = dbif_init(dbpath, "cnid2.db")))
exit(2);
if (dbif_env_open(dbd, dbp, DBOPTIONS) < 0)