]> arthur.barton.de Git - netatalk.git/commitdiff
implemented config.h
authorrufustfirefly <rufustfirefly>
Wed, 2 Aug 2000 19:28:05 +0000 (19:28 +0000)
committerrufustfirefly <rufustfirefly>
Wed, 2 Aug 2000 19:28:05 +0000 (19:28 +0000)
132 files changed:
etc/afpd/Makefile
etc/afpd/Makefile.am
etc/afpd/afp_asp.c
etc/afpd/afp_config.c [new file with mode: 0644]
etc/afpd/afp_config.h [new file with mode: 0644]
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/afs.c
etc/afpd/appl.c
etc/afpd/auth.c
etc/afpd/codepage.c
etc/afpd/config.c [deleted file]
etc/afpd/config.h [deleted file]
etc/afpd/desktop.c
etc/afpd/directory.c
etc/afpd/enumerate.c
etc/afpd/file.c
etc/afpd/filedir.c
etc/afpd/fork.c
etc/afpd/gettok.c
etc/afpd/main.c
etc/afpd/messages.c
etc/afpd/nfsquota.c
etc/afpd/ofork.c
etc/afpd/passwd.c
etc/afpd/quota.c
etc/afpd/status.c
etc/afpd/status.h
etc/afpd/switch.c
etc/afpd/uam.c
etc/afpd/unix.c
etc/afpd/volume.c
etc/atalkd/aep.c
etc/atalkd/config.c
etc/atalkd/main.c
etc/atalkd/multicast.c
etc/atalkd/nbp.c
etc/atalkd/route.c
etc/atalkd/rtmp.c
etc/atalkd/zip.c
etc/papd/auth.c
etc/papd/comment.c
etc/papd/file.c
etc/papd/headers.c
etc/papd/lp.c
etc/papd/magics.c
etc/papd/main.c
etc/papd/ppd.c
etc/papd/printcap.c
etc/papd/queries.c
etc/papd/session.c
etc/papd/showppd.c
etc/papd/uam.c
etc/psf/psa.c
etc/psf/psf.c
etc/uams/Makefile.am
etc/uams/uams_dhx_pam.c
etc/uams/uams_dhx_passwd.c
etc/uams/uams_guest.c
etc/uams/uams_pam.c
etc/uams/uams_passwd.c
etc/uams/uams_pgp.c
etc/uams/uams_randnum.c
libatalk/adouble/ad_attr.c
libatalk/adouble/ad_date.c
libatalk/adouble/ad_flush.c
libatalk/adouble/ad_lock.c
libatalk/adouble/ad_mmap.c
libatalk/adouble/ad_open.c
libatalk/adouble/ad_read.c
libatalk/adouble/ad_sendfile.c
libatalk/adouble/ad_size.c
libatalk/adouble/ad_write.c
libatalk/asp/asp_attn.c
libatalk/asp/asp_close.c
libatalk/asp/asp_cmdreply.c
libatalk/asp/asp_getreq.c
libatalk/asp/asp_getsess.c
libatalk/asp/asp_init.c
libatalk/asp/asp_shutdown.c
libatalk/asp/asp_tickle.c
libatalk/asp/asp_write.c
libatalk/atp/atp_bprint.c
libatalk/atp/atp_bufs.c
libatalk/atp/atp_close.c
libatalk/atp/atp_open.c
libatalk/atp/atp_packet.c
libatalk/atp/atp_rreq.c
libatalk/atp/atp_rresp.c
libatalk/atp/atp_sreq.c
libatalk/atp/atp_sresp.c
libatalk/compat/flock.c
libatalk/compat/getusershell.c
libatalk/compat/inet_aton.c
libatalk/compat/mktemp.c
libatalk/compat/rquota_xdr.c
libatalk/compat/strcasecmp.c
libatalk/compat/strdup.c
libatalk/compat/strstr.c
libatalk/dsi/dsi_attn.c
libatalk/dsi/dsi_close.c
libatalk/dsi/dsi_cmdreply.c
libatalk/dsi/dsi_getsess.c
libatalk/dsi/dsi_getstat.c
libatalk/dsi/dsi_init.c
libatalk/dsi/dsi_opensess.c
libatalk/dsi/dsi_read.c
libatalk/dsi/dsi_stream.c
libatalk/dsi/dsi_tcp.c
libatalk/dsi/dsi_tickle.c
libatalk/dsi/dsi_write.c
libatalk/nbp/nbp_lkup.c
libatalk/nbp/nbp_rgstr.c
libatalk/nbp/nbp_unrgstr.c
libatalk/nbp/nbp_util.c
libatalk/netddp/netddp_open.c
libatalk/netddp/netddp_recvfrom.c
libatalk/netddp/netddp_sendto.c
libatalk/pap/pap_close.c
libatalk/pap/pap_init.c
libatalk/pap/pap_open.c
libatalk/pap/pap_read.c
libatalk/pap/pap_sendstatus.c
libatalk/pap/pap_slinit.c
libatalk/pap/pap_tickle.c
libatalk/util/atalk_addr.c
libatalk/util/bprint.c
libatalk/util/getiface.c
libatalk/util/module.c
libatalk/util/server_child.c
libatalk/util/server_lock.c
libatalk/util/strdicasecmp.c

index 5c0c2e9f6fa6b38b0bbce955cb5d2fc92079673d..47a2dda28ecb732d9af4798da09eb0658ed11bc8 100644 (file)
@@ -3,12 +3,12 @@
 
 SRC = unix.c ofork.c main.c switch.c auth.c volume.c directory.c file.c \
        enumerate.c desktop.c filedir.c fork.c appl.c gettok.c \
-       status.c afp_options.c afp_asp.c afp_dsi.c messages.c config.c \
+       status.c afp_options.c afp_asp.c afp_dsi.c messages.c afp_config.c \
        nfsquota.c codepage.c quota.c uam.c afs.c
 
 OBJ = unix.o ofork.o main.o switch.o auth.o volume.o directory.o file.o \
        enumerate.o desktop.o filedir.o fork.o appl.o gettok.o \
-       status.o afp_options.o afp_asp.o afp_dsi.o messages.o config.o \
+       status.o afp_options.o afp_asp.o afp_dsi.o messages.o afp_config.o \
        nfsquota.o codepage.o quota.o uam.o afs.o
 
 INCPATH=       -I../../include ${AFSINCPATH}
@@ -89,7 +89,7 @@ afp_options.o : afp_options.c
            -D_PATH_AFPDNLSPATH=\"${RESDIR}/nls/\" \
            ${CPPFLAGS} -c $<
 
-config.o: config.c
+afp_config.o: afp_config.c
        ${CC} ${CFLAGS} \
            -DVERSION=\"`cat ../../VERSION`\" \
            ${CPPFLAGS} -c $< 
index 5b644062e7ba326dddb0787702d4c67562c4f2df..50d75bc645ad0b6978b1d6ea6c441552d516130f 100644 (file)
@@ -4,10 +4,10 @@ SUBDIRS = nls
 
 sbin_PROGRAMS = afpd
 
-afpd_SOURCES = unix.c ofork.c main.c switch.c auth.c volume.c directory.c file.c enumerate.c desktop.c filedir.c fork.c appl.c gettok.c status.c afp_options.c afp_asp.c afp_dsi.c messages.c config.c nfsquota.c codepage.c quota.c uam.c afs.c
+afpd_SOURCES = unix.c ofork.c main.c switch.c auth.c volume.c directory.c file.c enumerate.c desktop.c filedir.c fork.c appl.c gettok.c status.c afp_options.c afp_asp.c afp_dsi.c messages.c afp_config.c nfsquota.c codepage.c quota.c uam.c afs.c
 afpd_LDADD = $(top_srcdir)/libatalk/libatalk.a -latalk
 
-noinst_HEADERS = auth.h codepage.h config.h desktop.h directory.h file.h filedir.h fork.h globals.h icon.h misc.h status.h switch.h uam_auth.h unix.h volume.h
+noinst_HEADERS = auth.h codepage.h afp_config.h desktop.h directory.h file.h filedir.h fork.h globals.h icon.h misc.h status.h switch.h uam_auth.h unix.h volume.h
 
 CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys \
         -D_PATH_AFPDDEFVOL=\"$(CONFIG_DIR)/AppleVolumes.default\" \
index 57c25a7a400515beeb3ddbc6e81c26fc79269652..ceacf85906bd2bf47ccdfbb28fc7aa6cd21e6d3a 100644 (file)
@@ -6,6 +6,10 @@
  * modified from main.c. this handles afp over asp. 
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifndef NO_DDP
 
 #include <stdio.h>
diff --git a/etc/afpd/afp_config.c b/etc/afpd/afp_config.c
new file mode 100644 (file)
index 0000000..8c65878
--- /dev/null
@@ -0,0 +1,358 @@
+/* 
+ * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
+ * All Rights Reserved.  See COPYRIGHT.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <syslog.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <atalk/dsi.h>
+#include <atalk/atp.h>
+#include <atalk/asp.h>
+#include <atalk/nbp.h>
+#include <atalk/afp.h>
+#include <atalk/compat.h>
+#include <atalk/server_child.h>
+
+#include "globals.h"
+#include "afp_config.h"
+#include "uam_auth.h"
+#include "status.h"
+
+#define LINESIZE 1024  
+
+/* get rid of unneeded configurations. i use reference counts to deal
+ * w/ multiple configs sharing the same afp_options. oh, to dream of
+ * garbage collection ... */
+void configfree(AFPConfig *configs, const AFPConfig *config)
+{
+  AFPConfig *p, *q;
+
+  for (p = configs; p; p = q) {
+    q = p->next;
+    if (p == config)
+      continue;
+
+    /* do a little reference counting */
+    if (--(*p->optcount) < 1) {
+      afp_options_free(&p->obj.options, p->defoptions);
+      free(p->optcount);
+    }
+
+    switch (p->obj.proto) {
+#ifndef NO_DDP
+    case AFPPROTO_ASP:
+      free(p->obj.Obj);
+      free(p->obj.Type);
+      free(p->obj.Zone);
+      atp_close(((ASP) p->obj.handle)->asp_atp);
+      free(p->obj.handle);
+      break;
+#endif /* no afp/asp */
+    case AFPPROTO_DSI:
+      close(p->fd);
+      free(p->obj.handle);
+      break;
+    }
+    free(p);
+  }
+}
+
+#ifndef NO_DDP
+static void asp_cleanup(const AFPConfig *config)
+{
+  nbp_unrgstr(config->obj.Obj, config->obj.Type, config->obj.Zone,
+             &config->obj.options.ddpaddr);
+}
+
+/* these two are almost identical. it should be possible to collapse them
+ * into one with minimal junk. */
+static int asp_start(AFPConfig *config, AFPConfig *configs, 
+                    server_child *server_children) 
+{
+  ASP asp;
+
+  if (!(asp = asp_getsession(config->obj.handle, server_children, 
+                            config->obj.options.tickleval))) {
+    syslog( LOG_ERR, "main: asp_getsession: %m" );
+    exit( 1 );
+  } 
+  
+  if (asp->child) {
+    configfree(configs, config); /* free a bunch of stuff */
+    afp_over_asp(&config->obj);
+    exit (0);
+  }
+}
+#endif /* no afp/asp */
+
+static int dsi_start(AFPConfig *config, AFPConfig *configs,
+                    server_child *server_children)
+{
+  DSI *dsi;
+
+  if (!(dsi = dsi_getsession(config->obj.handle, server_children,
+                            config->obj.options.tickleval))) {
+    syslog( LOG_ERR, "main: dsi_getsession: %m" );
+    exit( 1 );
+  } 
+  
+  /* we've forked. */
+  if (dsi->child) {
+    configfree(configs, config);
+    afp_over_dsi(&config->obj); /* start a session */
+    exit (0);
+  }
+}
+
+#ifndef NO_DDP
+static AFPConfig *ASPConfigInit(const struct afp_options *options,
+                               unsigned char *refcount)
+{
+  AFPConfig *config;
+  ATP atp;
+  ASP asp;
+  char *Obj, *Type = "AFPServer", *Zone = "*";
+  
+  if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL)
+    return NULL;
+  
+  if ((atp = atp_open(ATADDR_ANYPORT, &options->ddpaddr)) == NULL)  {
+    syslog( LOG_ERR, "main: atp_open: %m");
+    free(config);
+    return NULL;
+  }
+  
+  if ((asp = asp_init( atp )) == NULL) {
+    syslog( LOG_ERR, "main: asp_init: %m" );
+    atp_close(atp);
+    free(config);
+    return NULL;
+  }
+  
+  /* register asp server */
+  Obj = (char *) options->hostname;
+  if (nbp_name(options->server, &Obj, &Type, &Zone )) {
+    syslog( LOG_ERR, "main: can't parse %s", options->server );
+    goto serv_free_return;
+  }
+
+  /* dup Obj, Type and Zone as they get assigned to a single internal
+   * buffer by nbp_name */
+  if ((config->obj.Obj  = strdup(Obj)) == NULL) 
+    goto serv_free_return;
+
+  if ((config->obj.Type = strdup(Type)) == NULL) {
+    free(config->obj.Obj);
+    goto serv_free_return;
+  }
+
+  if ((config->obj.Zone = strdup(Zone)) == NULL) {
+    free(config->obj.Obj);
+    free(config->obj.Type);
+    goto serv_free_return;
+  }
+  
+  /* make sure we're not registered */
+  nbp_unrgstr(Obj, Type, Zone, &options->ddpaddr); 
+  if (nbp_rgstr( atp_sockaddr( atp ), Obj, Type, Zone ) < 0 ) {
+    syslog( LOG_ERR, "Can't register %s:%s@%s", Obj, Type, Zone );
+    free(config->obj.Obj);
+    free(config->obj.Type);
+    free(config->obj.Zone);
+    goto serv_free_return;
+  }
+
+  syslog( LOG_INFO, "%s:%s@%s started on %u.%u:%u (%s)", Obj, Type, Zone,
+         ntohs( atp_sockaddr( atp )->sat_addr.s_net ),
+         atp_sockaddr( atp )->sat_addr.s_node,
+         atp_sockaddr( atp )->sat_port, VERSION );
+  
+  config->fd = atp_fileno(atp);
+  config->obj.handle = asp;
+  config->obj.config = config;
+  config->obj.proto = AFPPROTO_ASP;
+
+  memcpy(&config->obj.options, options, sizeof(struct afp_options));
+  config->optcount = refcount;
+  (*refcount)++;
+
+  config->server_start = asp_start;
+  config->server_cleanup = asp_cleanup;
+
+  return config;
+
+serv_free_return:
+  asp_close(asp);
+  free(config);
+  return NULL;
+}
+#endif /* no afp/asp */
+
+
+static AFPConfig *DSIConfigInit(const struct afp_options *options,
+                               unsigned char *refcount,
+                               const dsi_proto protocol) 
+{
+  AFPConfig *config;
+  DSI *dsi;
+  char *p, *q;
+
+  if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) {
+    syslog( LOG_ERR, "DSIConfigInit: malloc(config): %m" );
+    return NULL;
+  }
+
+  if ((dsi = dsi_init(protocol, "afpd", options->hostname,
+                     options->ipaddr, options->port, 
+                     options->flags & OPTION_PROXY, 
+                     options->server_quantum)) == NULL) {
+    syslog( LOG_ERR, "main: dsi_init: %m" );
+    free(config);
+    return NULL;
+  }
+
+  if (options->flags & OPTION_PROXY) {
+    syslog(LOG_INFO, "ASIP proxy initialized for %s:%d (%s)",
+          inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), 
+          VERSION);
+  } else {
+    syslog(LOG_INFO, "ASIP started on %s:%d(%d) (%s)",
+          inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), 
+          dsi->serversock, VERSION);
+  }
+
+  config->fd = dsi->serversock;
+  config->obj.handle = dsi;
+  config->obj.config = config;
+  config->obj.proto = AFPPROTO_DSI;
+
+  memcpy(&config->obj.options, options, sizeof(struct afp_options));
+  /* get rid of any appletalk info. we use the fact that the DSI
+   * stuff is done after the ASP stuff. */
+  p = config->obj.options.server;
+  if (p && (q = strchr(p, ':')))
+    *q = '\0';
+    
+  config->optcount = refcount;
+  (*refcount)++;
+
+  config->server_start = dsi_start;
+  return config;
+}
+
+/* allocate server configurations. this should really store the last
+ * entry in config->last or something like that. that would make
+ * supporting multiple dsi transports easier. */
+static AFPConfig *AFPConfigInit(const struct afp_options *options,
+                               const struct afp_options *defoptions)
+{
+  AFPConfig *config = NULL, *next = NULL;
+  unsigned char *refcount;
+
+  if ((refcount = (unsigned char *) 
+       calloc(1, sizeof(unsigned char))) == NULL) {
+    syslog( LOG_ERR, "AFPConfigInit: calloc(refcount): %m" );
+    return NULL;
+  }
+
+#ifndef NO_DDP
+  /* handle asp transports */
+  if ((options->transports & AFPTRANS_DDP) && 
+      (config = ASPConfigInit(options, refcount)))
+    config->defoptions = defoptions;
+#endif
+
+  /* handle dsi transports and dsi proxies. we only proxy
+   * for DSI connections. */
+
+  /* this should have something like the following:
+   * for (i=mindsi; i < maxdsi; i++)
+   *   if (options->transports & (1 << i) && 
+   *     (next = DSIConfigInit(options, refcount, i)))
+   *     next->defoptions = defoptions;
+   */
+  if ((options->transports & AFPTRANS_TCP) &&
+      (((options->flags & OPTION_PROXY) == 0) ||
+       ((options->flags & OPTION_PROXY) && config))
+      && (next = DSIConfigInit(options, refcount, DSI_TCPIP)))
+    next->defoptions = defoptions;
+
+  /* load in all the authentication modules. we can load the same
+     things multiple times if necessary. however, loading different
+     things with the same names will cause complaints. by not loading
+     in any uams with proxies, we prevent ddp connections from succeeding.
+  */
+  auth_load(options->uampath, options->uamlist);
+
+  /* this should be able to accept multiple dsi transports. i think
+   * the only thing that gets affected is the net addresses. */
+  status_init(config, next, options);
+
+  /* attach dsi config to tail of asp config */
+  if (config) {
+    config->next = next;
+    return config;
+  } 
+    
+  return next;
+}
+
+/* fill in the appropriate bits for each interface */
+AFPConfig *configinit(struct afp_options *cmdline)
+{
+  FILE *fp;
+  char buf[LINESIZE + 1], *p, have_option = 0;
+  struct afp_options options;
+  AFPConfig *config, *first = NULL;
+
+  /* if config file doesn't exist, load defaults */
+  if ((fp = fopen(cmdline->configfile, "r")) == NULL) 
+    return AFPConfigInit(cmdline, cmdline);
+
+  /* scan in the configuration file */
+  while (!feof(fp)) {
+    if (!fgets(buf, sizeof(buf), fp) || buf[0] == '#')
+      continue;
+    
+    /* a little pre-processing to get rid of spaces and end-of-lines */
+    p = buf;
+    while (p && isspace(*p)) 
+      p++;
+    if (!p || (*p == '\0'))
+      continue;
+
+    have_option = 1;
+
+    memcpy(&options, cmdline, sizeof(options));
+    if (!afp_options_parseline(p, &options))
+      continue;
+
+    /* this should really get a head and a tail to simplify things. */
+    if (!first) {
+      if ((first = AFPConfigInit(&options, cmdline)))
+       config = first->next ? first->next : first;
+    } else if ((config->next = AFPConfigInit(&options, cmdline))) {
+      config = config->next->next ? config->next->next : config->next;
+    }
+  }
+
+  fclose(fp);
+
+  if (!have_option)
+    return AFPConfigInit(cmdline, cmdline);
+
+  return first;
+}
diff --git a/etc/afpd/afp_config.h b/etc/afpd/afp_config.h
new file mode 100644 (file)
index 0000000..74c4940
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef AFPD_CONFIG_H
+#define AFPD_CONFIG_H 1
+
+#include <sys/cdefs.h>
+#include <atalk/server_child.h>
+#include <atalk/atp.h>
+#include "globals.h"
+
+typedef struct AFPConfig {
+  AFPObj obj;
+  int fd, statuslen;
+  unsigned char *optcount;
+  char status[ATP_MAXDATA];
+  const void *defoptions, *signature;
+  int (*server_start) __P((struct AFPConfig *, struct AFPConfig *,
+                          server_child *));
+  void (*server_cleanup) __P((const struct AFPConfig *));
+  struct AFPConfig *next;
+} AFPConfig;
+
+extern AFPConfig *configinit __P((struct afp_options *));
+extern void configfree __P((AFPConfig *, const AFPConfig *));
+#endif
index 176921b8e9074cc76395b29dae2b4c0c06307267..79cbc8993cf6a241b3392a5e96b0e1e600050d01 100644 (file)
@@ -6,6 +6,10 @@
  * modified from main.c. this handles afp over tcp.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>
index 13ccf7f6a252d10ad154c24cb5b4aad752376174..134bbf0d9ffe9ade0c5ed4eba5b28f83bd073c61 100644 (file)
@@ -5,6 +5,11 @@
  *
  * modified from main.c. this handles afp options.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 82f35d9d8455d428d2ff9498a02869477d28e1bc..8008d94bcbce4d15869b8f8cf0a323054afd2f92 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef AFS
 
 #include <string.h>
index dcefdaff142a2ef884d96b1d8d0c9741d7161de0..c5d9ea06c817d360daa367ee133a68c6354a5950 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index e302e2643bddab88ae0e5c8760877ba0b5f442d5..01ce135b0475bfa9e54e00c4b3b548b4d32ac990 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index b2d0e5ae04eaf996df21a418353691c0b524e644..084be7ddd7cb6c34dbe2ed973af008036e8399ba 100644 (file)
  * occur in those cases.  
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/etc/afpd/config.c b/etc/afpd/config.c
deleted file mode 100644 (file)
index d57b22d..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/* 
- * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
- * All Rights Reserved.  See COPYRIGHT.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <syslog.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <atalk/dsi.h>
-#include <atalk/atp.h>
-#include <atalk/asp.h>
-#include <atalk/nbp.h>
-#include <atalk/afp.h>
-#include <atalk/compat.h>
-#include <atalk/server_child.h>
-
-#include "globals.h"
-#include "config.h"
-#include "uam_auth.h"
-#include "status.h"
-
-#define LINESIZE 1024  
-
-/* get rid of unneeded configurations. i use reference counts to deal
- * w/ multiple configs sharing the same afp_options. oh, to dream of
- * garbage collection ... */
-void configfree(AFPConfig *configs, const AFPConfig *config)
-{
-  AFPConfig *p, *q;
-
-  for (p = configs; p; p = q) {
-    q = p->next;
-    if (p == config)
-      continue;
-
-    /* do a little reference counting */
-    if (--(*p->optcount) < 1) {
-      afp_options_free(&p->obj.options, p->defoptions);
-      free(p->optcount);
-    }
-
-    switch (p->obj.proto) {
-#ifndef NO_DDP
-    case AFPPROTO_ASP:
-      free(p->obj.Obj);
-      free(p->obj.Type);
-      free(p->obj.Zone);
-      atp_close(((ASP) p->obj.handle)->asp_atp);
-      free(p->obj.handle);
-      break;
-#endif /* no afp/asp */
-    case AFPPROTO_DSI:
-      close(p->fd);
-      free(p->obj.handle);
-      break;
-    }
-    free(p);
-  }
-}
-
-#ifndef NO_DDP
-static void asp_cleanup(const AFPConfig *config)
-{
-  nbp_unrgstr(config->obj.Obj, config->obj.Type, config->obj.Zone,
-             &config->obj.options.ddpaddr);
-}
-
-/* these two are almost identical. it should be possible to collapse them
- * into one with minimal junk. */
-static int asp_start(AFPConfig *config, AFPConfig *configs, 
-                    server_child *server_children) 
-{
-  ASP asp;
-
-  if (!(asp = asp_getsession(config->obj.handle, server_children, 
-                            config->obj.options.tickleval))) {
-    syslog( LOG_ERR, "main: asp_getsession: %m" );
-    exit( 1 );
-  } 
-  
-  if (asp->child) {
-    configfree(configs, config); /* free a bunch of stuff */
-    afp_over_asp(&config->obj);
-    exit (0);
-  }
-}
-#endif /* no afp/asp */
-
-static int dsi_start(AFPConfig *config, AFPConfig *configs,
-                    server_child *server_children)
-{
-  DSI *dsi;
-
-  if (!(dsi = dsi_getsession(config->obj.handle, server_children,
-                            config->obj.options.tickleval))) {
-    syslog( LOG_ERR, "main: dsi_getsession: %m" );
-    exit( 1 );
-  } 
-  
-  /* we've forked. */
-  if (dsi->child) {
-    configfree(configs, config);
-    afp_over_dsi(&config->obj); /* start a session */
-    exit (0);
-  }
-}
-
-#ifndef NO_DDP
-static AFPConfig *ASPConfigInit(const struct afp_options *options,
-                               unsigned char *refcount)
-{
-  AFPConfig *config;
-  ATP atp;
-  ASP asp;
-  char *Obj, *Type = "AFPServer", *Zone = "*";
-  
-  if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL)
-    return NULL;
-  
-  if ((atp = atp_open(ATADDR_ANYPORT, &options->ddpaddr)) == NULL)  {
-    syslog( LOG_ERR, "main: atp_open: %m");
-    free(config);
-    return NULL;
-  }
-  
-  if ((asp = asp_init( atp )) == NULL) {
-    syslog( LOG_ERR, "main: asp_init: %m" );
-    atp_close(atp);
-    free(config);
-    return NULL;
-  }
-  
-  /* register asp server */
-  Obj = (char *) options->hostname;
-  if (nbp_name(options->server, &Obj, &Type, &Zone )) {
-    syslog( LOG_ERR, "main: can't parse %s", options->server );
-    goto serv_free_return;
-  }
-
-  /* dup Obj, Type and Zone as they get assigned to a single internal
-   * buffer by nbp_name */
-  if ((config->obj.Obj  = strdup(Obj)) == NULL) 
-    goto serv_free_return;
-
-  if ((config->obj.Type = strdup(Type)) == NULL) {
-    free(config->obj.Obj);
-    goto serv_free_return;
-  }
-
-  if ((config->obj.Zone = strdup(Zone)) == NULL) {
-    free(config->obj.Obj);
-    free(config->obj.Type);
-    goto serv_free_return;
-  }
-  
-  /* make sure we're not registered */
-  nbp_unrgstr(Obj, Type, Zone, &options->ddpaddr); 
-  if (nbp_rgstr( atp_sockaddr( atp ), Obj, Type, Zone ) < 0 ) {
-    syslog( LOG_ERR, "Can't register %s:%s@%s", Obj, Type, Zone );
-    free(config->obj.Obj);
-    free(config->obj.Type);
-    free(config->obj.Zone);
-    goto serv_free_return;
-  }
-
-  syslog( LOG_INFO, "%s:%s@%s started on %u.%u:%u (%s)", Obj, Type, Zone,
-         ntohs( atp_sockaddr( atp )->sat_addr.s_net ),
-         atp_sockaddr( atp )->sat_addr.s_node,
-         atp_sockaddr( atp )->sat_port, VERSION );
-  
-  config->fd = atp_fileno(atp);
-  config->obj.handle = asp;
-  config->obj.config = config;
-  config->obj.proto = AFPPROTO_ASP;
-
-  memcpy(&config->obj.options, options, sizeof(struct afp_options));
-  config->optcount = refcount;
-  (*refcount)++;
-
-  config->server_start = asp_start;
-  config->server_cleanup = asp_cleanup;
-
-  return config;
-
-serv_free_return:
-  asp_close(asp);
-  free(config);
-  return NULL;
-}
-#endif /* no afp/asp */
-
-
-static AFPConfig *DSIConfigInit(const struct afp_options *options,
-                               unsigned char *refcount,
-                               const dsi_proto protocol) 
-{
-  AFPConfig *config;
-  DSI *dsi;
-  char *p, *q;
-
-  if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) {
-    syslog( LOG_ERR, "DSIConfigInit: malloc(config): %m" );
-    return NULL;
-  }
-
-  if ((dsi = dsi_init(protocol, "afpd", options->hostname,
-                     options->ipaddr, options->port, 
-                     options->flags & OPTION_PROXY, 
-                     options->server_quantum)) == NULL) {
-    syslog( LOG_ERR, "main: dsi_init: %m" );
-    free(config);
-    return NULL;
-  }
-
-  if (options->flags & OPTION_PROXY) {
-    syslog(LOG_INFO, "ASIP proxy initialized for %s:%d (%s)",
-          inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), 
-          VERSION);
-  } else {
-    syslog(LOG_INFO, "ASIP started on %s:%d(%d) (%s)",
-          inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), 
-          dsi->serversock, VERSION);
-  }
-
-  config->fd = dsi->serversock;
-  config->obj.handle = dsi;
-  config->obj.config = config;
-  config->obj.proto = AFPPROTO_DSI;
-
-  memcpy(&config->obj.options, options, sizeof(struct afp_options));
-  /* get rid of any appletalk info. we use the fact that the DSI
-   * stuff is done after the ASP stuff. */
-  p = config->obj.options.server;
-  if (p && (q = strchr(p, ':')))
-    *q = '\0';
-    
-  config->optcount = refcount;
-  (*refcount)++;
-
-  config->server_start = dsi_start;
-  return config;
-}
-
-/* allocate server configurations. this should really store the last
- * entry in config->last or something like that. that would make
- * supporting multiple dsi transports easier. */
-static AFPConfig *AFPConfigInit(const struct afp_options *options,
-                               const struct afp_options *defoptions)
-{
-  AFPConfig *config = NULL, *next = NULL;
-  unsigned char *refcount;
-
-  if ((refcount = (unsigned char *) 
-       calloc(1, sizeof(unsigned char))) == NULL) {
-    syslog( LOG_ERR, "AFPConfigInit: calloc(refcount): %m" );
-    return NULL;
-  }
-
-#ifndef NO_DDP
-  /* handle asp transports */
-  if ((options->transports & AFPTRANS_DDP) && 
-      (config = ASPConfigInit(options, refcount)))
-    config->defoptions = defoptions;
-#endif
-
-  /* handle dsi transports and dsi proxies. we only proxy
-   * for DSI connections. */
-
-  /* this should have something like the following:
-   * for (i=mindsi; i < maxdsi; i++)
-   *   if (options->transports & (1 << i) && 
-   *     (next = DSIConfigInit(options, refcount, i)))
-   *     next->defoptions = defoptions;
-   */
-  if ((options->transports & AFPTRANS_TCP) &&
-      (((options->flags & OPTION_PROXY) == 0) ||
-       ((options->flags & OPTION_PROXY) && config))
-      && (next = DSIConfigInit(options, refcount, DSI_TCPIP)))
-    next->defoptions = defoptions;
-
-  /* load in all the authentication modules. we can load the same
-     things multiple times if necessary. however, loading different
-     things with the same names will cause complaints. by not loading
-     in any uams with proxies, we prevent ddp connections from succeeding.
-  */
-  auth_load(options->uampath, options->uamlist);
-
-  /* this should be able to accept multiple dsi transports. i think
-   * the only thing that gets affected is the net addresses. */
-  status_init(config, next, options);
-
-  /* attach dsi config to tail of asp config */
-  if (config) {
-    config->next = next;
-    return config;
-  } 
-    
-  return next;
-}
-
-/* fill in the appropriate bits for each interface */
-AFPConfig *configinit(struct afp_options *cmdline)
-{
-  FILE *fp;
-  char buf[LINESIZE + 1], *p, have_option = 0;
-  struct afp_options options;
-  AFPConfig *config, *first = NULL;
-
-  /* if config file doesn't exist, load defaults */
-  if ((fp = fopen(cmdline->configfile, "r")) == NULL) 
-    return AFPConfigInit(cmdline, cmdline);
-
-  /* scan in the configuration file */
-  while (!feof(fp)) {
-    if (!fgets(buf, sizeof(buf), fp) || buf[0] == '#')
-      continue;
-    
-    /* a little pre-processing to get rid of spaces and end-of-lines */
-    p = buf;
-    while (p && isspace(*p)) 
-      p++;
-    if (!p || (*p == '\0'))
-      continue;
-
-    have_option = 1;
-
-    memcpy(&options, cmdline, sizeof(options));
-    if (!afp_options_parseline(p, &options))
-      continue;
-
-    /* this should really get a head and a tail to simplify things. */
-    if (!first) {
-      if ((first = AFPConfigInit(&options, cmdline)))
-       config = first->next ? first->next : first;
-    } else if ((config->next = AFPConfigInit(&options, cmdline))) {
-      config = config->next->next ? config->next->next : config->next;
-    }
-  }
-
-  fclose(fp);
-
-  if (!have_option)
-    return AFPConfigInit(cmdline, cmdline);
-
-  return first;
-}
diff --git a/etc/afpd/config.h b/etc/afpd/config.h
deleted file mode 100644 (file)
index 74c4940..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef AFPD_CONFIG_H
-#define AFPD_CONFIG_H 1
-
-#include <sys/cdefs.h>
-#include <atalk/server_child.h>
-#include <atalk/atp.h>
-#include "globals.h"
-
-typedef struct AFPConfig {
-  AFPObj obj;
-  int fd, statuslen;
-  unsigned char *optcount;
-  char status[ATP_MAXDATA];
-  const void *defoptions, *signature;
-  int (*server_start) __P((struct AFPConfig *, struct AFPConfig *,
-                          server_child *));
-  void (*server_cleanup) __P((const struct AFPConfig *));
-  struct AFPConfig *next;
-} AFPConfig;
-
-extern AFPConfig *configinit __P((struct afp_options *));
-extern void configfree __P((AFPConfig *, const AFPConfig *));
-#endif
index 6316ee354986bfd18efff1773b331fc50af7a7a0..f1de3e391fa076365ba9731d9b5196ecb44d92e7 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/syslog.h>
 #include <errno.h>
 #include <sys/types.h>
index 6d849ea814c2c679608ceb2b54ff6f3afa0ffc70..25ac5004811eec73922258088aa4999665aa89a5 100644 (file)
@@ -6,6 +6,10 @@
  * (asun@cobalt.com).
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/syslog.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 64b97d4383b5522a0dbb2f40152c7c8d9cd6f169..fcde82c3fd8f7688d53fe99fdadf9c2cb5d2804d 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index af6da8b13d56c5aeaac09f306ffd2424f38d3210..8b2a112a0bb173737b959acb18a0cd0bc1c38b22 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index f342b78bc2ea55439ab6852ead9fe2da7aa2463f..ead729e7c52337e43b252b51b1fa9d9e4604681b 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <errno.h>
 #include <sys/syslog.h>
 #include <sys/types.h>
index 7b1b8abbf489e4cb81bd25c030002febec019bbf..f0fda992cc16651bbce9178b8c129b7ea4a68c1e 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
index ea0a8e38b05192b5719bbb324359162cd1ed7c9f..88aed59fe2a5c291211adf582ebae9a584a621e4 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/param.h>
 #include <string.h>
 #include <ctype.h>
index 755ca448d7811386281c925ad8eae450b667e7ec..c521ce5ffce0453ac2d8ff0631283f23c71b69a8 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -33,7 +37,7 @@
 #include <atalk/server_child.h>
 
 #include "globals.h"
-#include "config.h"
+#include "afp_config.h"
 #include "status.h"
 #include "fork.h"
 #include "uam_auth.h"
index 982a706488e527163adc0e161fdc925a6ae859fd..95ee567ab5692e8c136f31f383f984c0ead11be1 100644 (file)
@@ -2,6 +2,11 @@
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <atalk/afp.h>
index 03754deb4070a312add01a3764e72590211b57f9..06209bc6f3581e4e69cac369ea4ffdf9958420a9 100644 (file)
  * Technische Universitaet Braunschweig, FRG
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
index 71eb5140021aa9ea8d41decfe368cdf2efb42092..d8584b73c903dda2fa3cb1b353cc48a0b4fdb7ab 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 99a2af6b3cb2366348d3efb723c1aea257b475e1..03b352608af301187a46c599e269a34111ba1511 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <itc.h>
 #include <stdio.h>
 #include <string.h>
index 25b7114ef9a8956d48202eaf1fc3c84ef55a0557..913e01556d36ae27a5b6d3c10369f4a3cb2451f9 100644 (file)
@@ -2,6 +2,11 @@
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index a770c1ad48f5eeb6ac17c90877cc7f94c1fed982..6253400598de9845f94c5664cc5f329f4db6a2ee 100644 (file)
@@ -2,6 +2,11 @@
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -24,7 +29,7 @@
 
 #include "globals.h"  /* includes <netdb.h> */
 #include "status.h"
-#include "config.h"
+#include "afp_config.h"
 #include "icon.h"
 
 static void status_flags(char *data, const int ipok,
index a59280a45394dfa9d2a72fd91a1c3bd0fafaec93..d2038e0846fd9285c21381c05e313bfc25e59010 100644 (file)
@@ -5,7 +5,7 @@
 #include <atalk/dsi.h>
 #include <atalk/asp.h>
 #include "globals.h"
-#include "config.h"
+#include "afp_config.h"
 
 /* we use these to prevent whacky alignment problems */
 #define AFPSTATUS_MACHOFF     0
index 854510b0c9ad0b1e01b6388d7f57fabc20c5b0a2..7f7ce973fb527ef116cd2658ef02a91c898c98ae 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>  /* to pick up NULL */
 #include <sys/stat.h> /* works around a bug */
 #include <syslog.h>
index 8bcc629b45be6c7c9ac00c0bc4a3af12d53c4006..60946a7369aea3e0b8b3e7ff534b63f1bb818fd9 100644 (file)
@@ -2,6 +2,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -23,7 +27,7 @@
 #include <atalk/util.h>
 
 #include "globals.h"
-#include "config.h"
+#include "afp_config.h"
 #include "auth.h"
 #include "uam_auth.h"
 
index 4dfde805c37e8f1eaa83cfca3d8655bc853ebf62..a1ea079902504f0d59458e836c73c9d9dc65bce6 100644 (file)
@@ -2,6 +2,11 @@
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 8b73be59df8101430ba330dd87702c69b30ea5a8..fc09f98cd07a510de0667ee46e815a11d9068bd7 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/time.h>
 #include <sys/syslog.h>
 #include <sys/types.h>
index 83a532305247ebc6c0060b3e7ed419bec3eb7384..5e5726dc5315d4d2f9b156951c6e40ada04c4974 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/syslog.h>
 #include <sys/types.h>
 #include <sys/socket.h>
index 1590d825f0c276a6a35c5d9000e633fb92ab8704..83ab824b892be9b56f586b6fddabb17649b87f3d 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
index a05e908f413772396d455063c2eabc961e42a178..c1af5e261de2e69fe022d34fbf8401bcbb188eca 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
index 365bcecd43d04d4a23ad7ad54fae7222f28bfb90..4f43038aaa076eab155cd572f204418a96c53f0d 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/param.h>
index e94130d8a610939cde66625089b9298bf8a6ebbd..5e92f280749d96b5f9888ce25f64b9a74545cee2 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/syslog.h>
index 94ee92c3bca20648f7d4cda6926bfb06ccb04660..cc97b2acedd9c69525ab35b3af389ff696253087 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
index f5db9ef032a4950e5437e008591e75173a556520..f8e05a1f2d9dd26f999136c52c8984c768296614 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <sys/syslog.h>
 #include <sys/types.h>
index 9012641ebbc8343d8b21092c05329b423000d440..3e2f715331cc4c09cf1b3979af616f57875260d7 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/param.h>
index 90f416186321f273bfa932b9282e4f5618639447..9776693ed7f9f115bf470c8ac1c7bf51eca9949f 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index db89202dcce3d67780319202adb6421ec6da88e5..426627182c0f776b2cc4b3d78ff067f9bf503a31 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/syslog.h>
 #include <sys/param.h>
 #include <stdio.h>
index 5616d3e8b3a29b04926e39ed64e01f9146a200a7..50a6986168ad6a57177b29138d0efb7776644dd6 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/syslog.h>
 #include <sys/param.h>
 #include <stdio.h>
index 0b5dfc36150357026765ab8d0b36a1feee78be3e..075c59a286ce1fbbf1247ce125856a2d345c4581 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h" 
+#endif
+
 #include <sys/syslog.h>
 #include <sys/param.h>
 #include <stdio.h>
index ed1c32a9e5804a1e224d69b557919dde51c9e252..fbfc2be916fa2756c7921e0746f45dfb6d77a7d4 100644 (file)
  * Interface to lpr system.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/param.h>
 #include <sys/syslog.h>
 #include <sys/time.h>
@@ -181,7 +185,7 @@ lp_init( out, sat )
     char       cost[ 22 ];
     char       balance[ 22 ];
 #endif ABS_PRINT
-#ifdef CAPDIR
+#if defined( CAPDIR ) || defined( USE_CAP )
     char       username[32];
     int                addr_net, addr_node;
     FILE       *cap_file;
index a13c30dfd09cf7fa5d959d75403df665d8131b00..6fb497308bf455f4fabbd7cfd1396ace0c1f2e9e 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/syslog.h>
 #include <sys/param.h>
 #include <stdio.h>
index ded4ecaae73980d8fae9d390119dd47d44b66f8b..a98009cd93bc5d375fa66986f081f84dee270259 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/time.h>
index d560f772b9d7b902828e95456c4798e1a0988aad..bd5406afc643b20fba77f575b61a2006ef4785e2 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 2459e1abc16b2a9c6f5ddc9a51f2c1d49ce93258..a2e0d19ebde91ff8875871b8e7b74c27dd5f0fff 100644 (file)
  * SUCH DAMAGE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifndef lint
 static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91";
 #endif /* not lint */
index 97b84326684cad525bea1d622e22fb33bd03abab..6a926e1bb142a69a045ee7a5ff43c98419006605 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/syslog.h>
 #include <sys/param.h>
index 8658415126d2680b0cf86298d686e5704a932357..b142a4c877a205c1acf68b8ccaca2d8e783a44e9 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/syslog.h>
index 57fb79368b00b2c87f4bd7a40c4dc2294836c87c..80e4d0d7a5efd7d10496d532c925cd78c323d0fb 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index a7ca13a15dc477878d96af3cf77dc16fe6c240cc..65b63a3f8405d4f18c6ae2d63337599a1dae3179 100644 (file)
@@ -2,6 +2,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 32675c2cb42b61a2c7508437fd2f810f7add8bab..05923f68cec054afa7c44052c01e4dbac2648605 100644 (file)
  * record in the accounting file.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 
 main( ac, av )
index e92c56fe288950f14eeeeaf687b9f6e418362258..e7dd5d567356601196dbb57cbe8511c85f6b07b1 100644 (file)
  * a troff or dvi to PostScript converter.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #define FUCKED
 
 #include <sys/time.h>
index 72a67a2dba82949bc76e035182ab17f75082595b..ca0a2b2796cee86cc653a959da68899ca2134599 100644 (file)
@@ -3,13 +3,15 @@
 #SUBDIRS = uams_krb4
 
 uamsdir = $(UAMS_PATH)
-uams_LTLIBRARIES = lib_uams_dhx_pam.la lib_uams_dhx.passwd.la lib_uams_guest.la lib_uams_pam.la lib_uams_pgp.la lib_uams_randnum.la
+uams_LTLIBRARIES = lib_uams_dhx_pam.la lib_uams_dhx.passwd.la lib_uams_guest.la lib_uams_pam.la lib_uams_randnum.la
+# removed lib_uams_pgp.la since it doesn't currently build (AFAIK)
 
 lib_uams_dhx_pam_la_SOURCES = uams_dhx_pam.c
 lib_uams_dhx_passwd_la_SOURCES = uams_dhx_passwd.c
 lib_uams_guest_la_SOURCES = uams_guest.c
 lib_uams_pam_la_SOURCES = uams_pam.c
-lib_uams_pgp_la_SOURCES = uams_pgp.c
+#lib_uams_pgp_la_SOURCES = uams_pgp.c
 lib_uams_randnum_la_SOURCES = uams_randnum.c
 
-CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys
+CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys \
+       -DUAM_RNDNUM
index e65b6f6ad643a81562208a267c2115d7ff9cdaed..063e5742ff3073cf060091e2bbf8b55ebc425100 100644 (file)
@@ -3,6 +3,11 @@
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #if defined(USE_PAM) && defined(UAM_DHX)
 #include <stdio.h>
 #include <stdlib.h>
index 934847ce3b6db753add45cd65e23c0c1cdf2fa35..90e4fe25b36948d0cb5cbd57fb8f68e2f5ce9d97 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef UAM_DHX
 #include <stdio.h>
 #include <stdlib.h>
index 0fe9d5cb0e0e6ee7a0a9fd5f94893410ae2d9857..1a6c906085edc75038ebd8303fa3e4bbf8d00a75 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 7b950b24ea612d44aca950487b796d86e96e4279..473e5e5c6e1ea6a6822e5b9f9823cb7abf8d13a4 100644 (file)
@@ -3,6 +3,11 @@
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef USE_PAM
 #include <stdio.h>
 #include <stdlib.h>
index 3d97959bfed5638524a9cf5a830cd854339666cd..8afc1247520416ee9e7c849c91d92c5b0fa6dae8 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 823b060dbc8bc246211485de37ec6243abb5baa9..7d0ea59e26bca833f791791fd30a99e9da24bf3b 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef UAM_PGP
 #include <stdio.h>
 #include <stdlib.h>
index 42ac4530a2dbd52c7ed8522af7200fda2f22657f..06f99b4fa5b7638980c2d8d54416d33489e75634 100644 (file)
@@ -4,6 +4,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index fd00a10181031a4bd9b740aa49544b2a16ae0d23..a08bcd06acc403e03215e7dc400cffb4006f0aa1 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <atalk/adouble.h>
 
index 0302cc423e11a01bc8083022216e706d60eb2787..00bb27bc55196557b180087d104caf914e4c9ff9 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 180b33d64444201b744e7a2ab2f6fb34944ee468..d5195b4c6689fab7cff8f1cb75b18b9ee05257fc 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index d848ccd5902da002267c74ede10e0c511b7a1523..29cf22f0e4bcb72441c0000ab0461a32880b7700 100644 (file)
  *       sorted.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 433249c6dfddf580ffd86aeadb9f77326c63fcd5..ef2a6824d16cf1945f9d5152bd46fe73f49a77fa 100644 (file)
@@ -4,6 +4,10 @@
  * ad_read/ad_write routines to avoid confusion.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index e685a3478dbe880b9a6c31fcce36b80b53476d1a..608035688488125ce102299601e21ab0ad97a56e 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
index b286f5561bd97a100d71d9733c473fcc24209364..1fcda8a11dba36c1e9b823ac04773fc040ac9990 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/param.h>
index 9a5ac2a8220d1898bf47cc9176f834c49ac224c5..1b96c86226cb525ecb61bbc1268c62648eff4cea 100644 (file)
@@ -8,6 +8,10 @@
  * 
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
index 5773cae191a86baf7f8f863bd71f0a3bb95adc6c..40f61906db220fb454eb0361c36254fd451879cf 100644 (file)
@@ -5,6 +5,10 @@
  * if we could depend upon inline functions, this would be one.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
index b0e69ef2206e80056101dae548893c06b70efedb..0d37ebf6cfff342ac95b1ba511d6f96fe1500a63 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/param.h>
index 9aa95bdd96aa4aa2e50173e0711bf981d2b2cb06..0305b3d1be281c113ceedd02f6a249603306ffd6 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <syslog.h>
index b830788d50f5253e4431305a8df67d9d81837092..b32ae2e892ae2a8cf298af5b9fcf6cba7d504650 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
index 9acd7d9a6880beaf8c8a293e813e0f2289d0e8a8..a401998250b7f5dff5f3ada59eaa4f81419af539 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/uio.h>
index 60cdd0cd74155127dbbcfb7869e7ca946c2db4b3..c8373be247824175e903e81b2a98b30a86ba9120 100644 (file)
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/time.h>
index df6c39fddddf7e01b6ae5a5d396671358906ae8a..da920bc55f5af5ab31f749e576d72c1e7fe7b5ee 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 431d80d113f47d905cb8e184703414e7196699d7..2a00d16d0fc2ba285063aed2228f90aab1efaea9 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/uio.h>
index afe3581ed4b3020d6fbd22fb64f5515c7f33866f..fe6dbc8146f0924adc0cda7d0f14a9e40784b962 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/time.h>
index a591db4891b319e7633bce5bd93f187d6e49a642..4e0bb8e4f2e3149b22feed0b471c6e2c8d1dec5e 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <syslog.h>
 #include <atalk/atp.h>
 #include <atalk/asp.h>
index 411eb0b292b0c8970b1568976c2dcc7fe30e1e04..2c5aea39d59425920ee6131e4e5c09eab68c3b99 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/uio.h>
index 6d141b7cedddf72cbe862dceda9f74b59ca88b46..cafacdae095e409b08dbf8e48a19257b6830f18f 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #define BPLEN  48
 #include <stdio.h>
 #include <ctype.h>
index ae79074f386f622b87bb4d387b342a0e68c93237..ce5c11f53d275cf4cdf79e1b642756c1cec9b143 100644 (file)
  * Our own memory maintenance for atp
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
index 47aa9abbc2db28c988fd9a7f47599153415890cc..be5a5b41fe80216bcb8926693cb9b29efa785c50 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/time.h>
index cc690f79867e06f6586b4fb2d129b7dedfa85c6f..58d61a643bbd4abd40b588a5b658cd33f601134c 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
index 6e029227cdc64a425772828373d5b77d73d55431..f5e43e58b215d847c137896bfa6683670c3964f9 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/time.h>
index be11f4298b0f508413c83e254d391d235dbad8a4..f7c02b3fea0ba6a779f44a4d3c4d657970132dfa 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
index dd9cb1761583ad2cc9290cd6896f564e29a89bc3..d7f8639e75b38ccd10621b7771599ec0ed1f79bd 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
index 0ec1b194c27b37ee0725afd6eaaaa2a8adb0dcd2..e073fac24d206d82f65f1e5a04977d411cbc8862 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
index 3d73be7c9dad302f361988eda5acf65e056ae129..532e111cf24401d84dbd33726dd464314441e6c9 100644 (file)
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
index 45ec45da14bc30dd33629c2c3670f3aef4e5aa32..4e1d7566de584965c7b7134bd2a9e80df89a8cde 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 static int     _flock_dummy;
 
 # if defined( sun ) && defined( __svr4__ )
index bd79d4fb04ae63797bdc653c103c261c003c7cda..4e4ed755078e641ca63f8c83725286e526dcc9db 100644 (file)
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)getusershell.c     5.6 (Berkeley) 6/1/90";
 #endif /* LIBC_SCCS and not lint */
index b073b5254c0f08de2ccf8069170522bd2392f095..dee43e799d957df5a10966a1100d21a22ccfe903 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index f08bd1eccbfce03ee0327aadf3672928c429f487..628da6bcd9775d3883cf440a0a052874f0f06d92 100644 (file)
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)mktemp.c   5.9 (Berkeley) 6/1/90";
 #endif /* LIBC_SCCS and not lint */
index f06da23eb205a8d9b73f96bf3f02b28c282033a9..cf311249c052e0af3cc4fbb56836032b0be571c4 100644 (file)
@@ -7,6 +7,10 @@
  * The University of Melbourne.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h> /* to get __GNU_LIBRARY__ */
 
 static int _xdr_rquota_dummy;
index 46acac36c290b56669f7451083c673bd3e4fc7b5..85c70209b0a10506eb4746a1ab3ee31d2162d217 100644 (file)
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 static int     _strcasecmp_dummy;
 
 # if defined( ibm032 )
index 04a427582d1f37593867980c2295929b7f09cddb..7c084dd50c3933173a8b46ec065c7d3f8739f5e2 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 2c3b2b43b1abf534ea6bfdc11343827ad7c7a466..c2bdd860659f487f98b50f96bc4630549ae5d078 100644 (file)
  * SUCH DAMAGE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)strstr.c   5.2 (Berkeley) 1/26/91";
 #endif /* LIBC_SCCS and not lint */
index 1bbfd7eec9093529a993159eb9e9b91a623b9eee..29e6c4b105bdc85108c71e06db532adc7f785500 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <signal.h>
index 3e7a2fbd99d5ad99f2d3f499228aa0e1d902de3b..0f0d951dfe39a6d7b96b9bdceb149afb91aa6138 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <atalk/dsi.h>
index 4459206f7542539ea334692337ae5bd22b93f840..1fb833ab7f33dd800d9ab6aaa6b7ed913ec25d33 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <atalk/dsi.h>
 #include <netatalk/endian.h>
index d4c1c6f8a35ca5e4809ae8127aebbe266c839898..24ef45db687e72a470ca0b188b92a5a11197625a 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 268caf44cab94e3ce7ca1ca3bb190da4713d0b00..9758ddebe2680ca5dc73008e7b0ef145ceb68abd 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 
index 2fcc17804be130d65bd40d20bc6a425711c04a33..6a545e94376482884389c2d96b28e7a81d497bbb 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>
index 8f16b131872d114219a2f6e2ee83d7d79b605679..e33d1d78490ba5a7f0eaaf872db2e7313340fd88 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
index ca922e7b8c9e5a1f14379c5db376be44d867fe4b..cc5a27b0251609ede38b4d5cb17302e5efb05e6c 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
index 5b275faefd003a043b335243e7fcf4b158a93a7b..30baf6130206aec917643e7ac8a222ed715c1efc 100644 (file)
@@ -9,6 +9,10 @@
  * dsi_stream_receive:  read a DSI header + data.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #define USE_WRITEV
 
 #include <stdio.h>
index 39c7b6aeef622d6f7d8ef5f738deec81bc0e5a55..87dee0e5243228d62375b04dedc709c86d68d303 100644 (file)
@@ -6,6 +6,10 @@
  * protocol specific initialization and shutdown procedures. all the
  * read/write stuff is done in dsi_stream.c.  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #define USE_TCP_NODELAY
 
 #include <stdio.h>
index c0ba655853888d1030aa1eeaa010512b5e16608a..3018489ed19d44597e9d1b680b928ddec429450b 100644 (file)
@@ -3,6 +3,10 @@
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <string.h>
index 0acad6c79e7c685c3873df3e71f0f3150d07194f..42dca69745111eec530dfc628d5bc66e220a8eb1 100644 (file)
@@ -5,6 +5,10 @@
  * 7 Oct 1997 added checks for 0 data.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 /* this streams writes */
 #include <stdio.h>
 #include <unistd.h>
index d3327a427ac66250da492d95e2018d830ada0d0c..a6290e850a43375311e40db92c603eb275d496f9 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/param.h>
index 6d820693588f7290e60907815291f18adeb34669..c1f927d4a8c0a9ed06485c63c59a3feb5f0d662b 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/param.h>
index 49cf2ace772ff662371940224133a3aacbfc9ba8..2209bcc3c663019835365deb66e3d0e7df691cfd 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/param.h>
index 83e9180f48283c230736164a41136831c4fae6a1..2985b63609bef74dae96dbc30140f0605ed66eb8 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <netdb.h>
 #include <sys/types.h>
index 999a243406473ff2b8ce6bf92a2a27f45e401a17..becaf6d09d0400d2c4a722437008bd6736e3be5d 100644 (file)
@@ -7,6 +7,10 @@
  * various address info if requested as well.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 static int _netddp_open_dummy;
 
 #include <stdio.h>
index b7974614932018188f7d89c051a6cc9541d2ec92..068590bc52efd395ea67d5c8e5b924b71bcd5512 100644 (file)
@@ -6,6 +6,10 @@
  * receive data.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 static int _netddp_recvfrom_dummy;
 
 #ifndef NO_DDP
index 3e26e338183e6962f6388cdefbc76cfec9c927f8..f6c9c78b607e4f9f17920eb972e7fda93169c36b 100644 (file)
@@ -6,6 +6,10 @@
  * send data.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 static int _netddp_sendto_dummy;
 
 #ifndef NO_DDP
index 4257a466f784ef115bd31dbb872da7c389f64410..b3c9953ff2f3c12856eb6ae3b17a6edab0dad27f 100644 (file)
@@ -1,5 +1,9 @@
 /* close the connection */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 int pap_close(PAP pap)
 {
   struct atp_block atpb;
index 94d20a1b44ea858baff3e955365d88a8466883b6..1709f03b69d6bf5edd1bf316b392ec89fd448e25 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 PAP pap_init(ATP atp)
 {
index 9d29625016fb06ed3c3da2923f114ef6f1b27bca..8204d228aa7ab2788c21338e0793c962991ca675 100644 (file)
@@ -1,5 +1,9 @@
 /* moved over from bin/pap/pap.c */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 static struct {
   PAP pap;
   int tickle;
index abd9014eb0ff3b06a569481dee4e7ad47aebefb6..f8cce39aa3543326452e87e1b7e4c01d581e3283 100644 (file)
@@ -1,5 +1,9 @@
 /* taken from bin/pap/pap.c */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 int pap_read(PAP pap)
 {
     struct atp_block atpb;
index 6c3ae9e97798831f602ef6c30241896cd83bdfae..5affb62df12cf5261dca71abc3e1f9d42dd896a9 100644 (file)
@@ -1,4 +1,6 @@
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 int pap_sendstatus(PAP pap)
 {
index 07403e628c513616b0d95dfb155f3b2dce3bf6fc..d9769a1e878edada4a48b1cc0c6fc37bd6320a25 100644 (file)
@@ -3,6 +3,10 @@
  * All Rights Reserved.  See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <syslog.h>
index b7e9a971cf8e0ca07036b9e7a157b6b8ba5d8c15..3d8531f3426917795652b4f126e21635528c8278 100644 (file)
@@ -1,4 +1,9 @@
 /* send a tickle */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 void pap_tickle(PAP pap, const u_int8_t connid, struct sockaddr_at *sat)
 {
   struct atp_block atpb; 
index 0cf4cc8e9b0a8eaa9eca86caa8b09250a7a6d5f2..769d4e68fe0159f8e3db6f86bc39d55fcf5f5053 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <netatalk/at.h>
 #include <netatalk/endian.h>
index c192ba753003269a8aa00eb3706f0a5c42474ce8..cb0734fd45e82f5c4b7f464d6d1de0ee65dfdc89 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 28aa03053652a87ebc213a91eea034b3feaea0e2..591ca2840505d1d36a7c0f7735704db550455b59 100644 (file)
@@ -4,6 +4,9 @@
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
index d32553493d27f1e62e71098f8ba24ca9ec4d00e6..afe2c027fa40f415c60ecdf67a5f2b4837fb545b 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <atalk/util.h>
index 82b6199d48e5280b358035da52ab14bd462669c7..7e26eb0332715f875ca64fda77d7dac9bc26aefe 100644 (file)
  * number of connections.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 2a5d43dc12d3f394b6cb632b388c6f30d7208624..e3669ac8a1caf1fd39f7b9d37b08c5937e9edafa 100644 (file)
@@ -5,6 +5,11 @@
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 6f3b996d59e42c8f8137a8501d3ee01a4177da6a..c3f6d2f488af6365ceb2b54dc954c24f74af3674 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <atalk/util.h>
 
 unsigned const char    _diacasemap[] = {