# Makefile.am for bin/adv1tov2/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = adv1tov2
adv1tov2_SOURCES = adv1tov2.c
# Makefile.am for bin/aecho/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = aecho
aecho_SOURCES = aecho.c
# Makefile.am for bin/afile/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = afile achfile
bin_SCRIPTS = acleandir.rc
# Makefile.am for bin/getzones/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = getzones
getzones_SOURCES = getzones.c
getzones_LDADD = $(top_builddir)/libatalk/libatalk.la
-
-CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys
# Makefile.am for bin/megatron/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = megatron
megatron_SOURCES = asingle.c hqx.c macbin.c megatron.c nad.c updcrc.c
/*
- * $Id: asingle.c,v 1.8 2002-02-16 17:12:53 srittau Exp $
+ * $Id: asingle.c,v 1.8.6.1 2003-09-03 20:40:50 didg Exp $
*/
#ifdef HAVE_CONFIG_H
u_short num_entries;
int n;
int readlen;
- int date_entry;
+ int date_entry = 0;
off_t pos;
/*
*/
if ( version == 1 ) {
- if ( single.entry[ ADEID_FILEI ].ade_len > 0 ) {
+ if ( single.entry[ ADEID_FILEI ].ade_len > 0 )
date_entry = ADEID_FILEI;
- } else {
- date_entry = 0;
- }
} else if ( version == 2 ) {
- if ( single.entry[ ADEID_FILEDATESI ].ade_len > 0 ) {
+ if ( single.entry[ ADEID_FILEDATESI ].ade_len > 0 )
date_entry = ADEID_FILEDATESI;
- } else {
- date_entry = 0;
- }
}
#if DEBUG
fprintf( stderr, "date_entry = %d\n", date_entry );
/*
- * $Id: hqx.c,v 1.12 2002-04-29 01:52:49 morgana Exp $
+ * $Id: hqx.c,v 1.12.4.1 2003-09-03 20:40:50 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include <netatalk/endian.h>
#include "megatron.h"
+#include "nad.h"
#include "hqx.h"
#define HEXOUTPUT 0
/*
- * $Id: nad.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: nad.h,v 1.2.10.1 2003-09-03 20:40:50 didg Exp $
*/
#ifndef _NAD_H
int nad_write(int fork, char *forkbuf, int bufc);
int nad_close(int status);
+void select_charset(int options);
+
#endif /* _NAD_H */
# Makefile.am for bin/nbp/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = nbplkup nbprgstr nbpunrgstr
nbplkup_SOURCES = nbplkup.c
# Makefile.am for bin/pap/
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = pap papstatus
pap_SOURCES = pap.c
# Makefile.am for bin/psorder
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
bin_PROGRAMS = psorder
psorder_SOURCES = psorder.c pa.c
install-data-local: install-config-files $(PAMFILES)
$(mkinstalldirs) $(DESTDIR)$(pamdir)
- for f in $(PAMFILES); do \
- $(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk || echo "WARNING: Can't install PAM files"; \
- done
+ if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \
+ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk"; \
+ $(INSTALL_DATA) netatalk.pamd $(DESTDIR)$(pamdir)/netatalk || echo "WARNING: Can't install PAM files"; \
+ else \
+ echo "not overwriting $(DESTDIR)$(pamdir)/netatalk"; \
+ fi;
else
-D_PATH_AFPDUAMPATH=\"$(UAMS_PATH)/\" \
-D_PATH_AFPDNLSPATH=\"$(nlsdir)/\" \
-DAFPD_MTAB_FILE=\"$(pkgconfdir)/afpd.mtab\" \
- -DAPPLCNAME
+ -DAPPLCNAME \
+ -DSERVERTEXT=\"$(SERVERTEXT)/\"
/*
- * $Id: queries.c,v 1.16 2003-02-17 01:35:18 srittau Exp $
+ * $Id: queries.c,v 1.16.2.1 2003-09-03 20:40:50 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
* Handler for RBISpoolerID
*/
-static const char *spoolerid = "(PAPD Spooler) " VERSION "\n";
+static const char *spoolerid = "(PAPD Spooler) 1.0 (" VERSION ")\n";
int gq_rbispoolerid( out )
struct papfile *out;
*/
static struct uam_obj *papd_uam = NULL;
-/*static const char *rbiloginok = "0\r";*/
+static const char *rbiloginok = "0\r";
static const char *rbiloginbad = "-1\r";
static const char *rbiloginerrstr = "%%[Error: SecurityError; \
SecurityViolation: Unknown user, incorrect password or log on is \
{
char *start, *stop, *p, *begin;
int linelength, crlflength;
- char username[9] = "\0";
+ char username[UAM_USERNAMELEN + 1] = "\0";
struct papd_comment *comment = compeek();
char uamtype[20] = "\0";
} else {
if ( (papd_uam->u.uam_printer(p,stop,username,out)) == 0 ) {
lp_person( username );
+ append(out, rbiloginok, strlen( rbiloginok ));
+ LOG(log_info, logtype_papd, "RBILogin: Logged in '%s'", username);
} else {
append(out, rbiloginbad, strlen( rbiloginbad));
append(out, rbiloginerrstr, strlen(rbiloginerrstr));
/*
- * $Id: uams_pam.c,v 1.15 2003-01-08 22:16:25 didg Exp $
+ * $Id: uams_pam.c,v 1.15.2.1 2003-09-03 20:40:50 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#define PASSWDLEN 8
+#ifndef MIN
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif /* MIN */
+
+
/* Static variables used to communicate between the conversation function
* and the server_login function
*/
char *data, *p, *q;
char password[PASSWDLEN + 1] = "\0";
static const char *loginok = "0\r";
+ struct passwd *pwd;
+
+ data = (char *)malloc(stop - start + 2);
+ if (!data) {
+ LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: malloc");
+ return(-1);
+ }
- data = (char *)malloc(stop - start + 1);
strncpy(data, start, stop - start + 1);
+ data[stop - start + 2] = 0;
/* We are looking for the following format in data:
* (username) (password)
return(-1);
}
p++;
- if ((q = strstr(data, ") (" )) == NULL) {
+ if ((q = strstr(p, ") (" )) == NULL) {
LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: username not found in string");
free(data);
return(-1);
}
- strncpy(username, p, q - p);
+ strncpy(username, p, MIN(UAM_USERNAMELEN, q - p) );
+ username[ UAM_USERNAMELEN +1] = '\0';
/* Parse input for password in next () */
p = q + 3;
- if ((q = strrchr(data, ')' )) == NULL) {
+ if ((q = strrchr(p, ')' )) == NULL) {
LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: password not found in string");
free(data);
return(-1);
}
- strncpy(password, p, q - p);
+ strncpy(password, p, MIN(PASSWDLEN, (q - p)) );
+ password[ PASSWDLEN + 1] = '\0';
/* Done copying username and password, clean up */
free(data);
+ if (( pwd = uam_getname(username, strlen(username))) == NULL ) {
+ LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: ( %s ) not found ",
+ username);
+ return(-1);
+ }
+
+ if (uam_checkuser(pwd) < 0) {
+ /* syslog of error happens in uam_checkuser */
+ return(-1);
+ }
+
PAM_username = username;
PAM_password = password;
/*
- * $Id: uams_passwd.c,v 1.19 2002-10-17 18:01:55 didg Exp $
+ * $Id: uams_passwd.c,v 1.19.2.1 2003-09-03 20:40:50 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* All Rights Reserved. See COPYRIGHT.
*/
+#define _XOPEN_SOURCE /* for crypt() */
+
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#define PASSWDLEN 8
+#ifndef MIN
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif /* MIN */
+
+
#ifdef TRU64
#include <sia.h>
#include <siad.h>
static const char *loginok = "0\r";
int ulen;
- data = (char *)malloc(stop - start + 1);
+ data = (char *)malloc(stop - start + 2);
+ if (!data) {
+ LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: malloc");
+ return(-1);
+ }
strncpy(data, start, stop - start + 1);
+ data[stop - start + 2] = 0;
/* We are looking for the following format in data:
* (username) (password)
free(data);
return(-1);
}
- strncpy(username, p, q - p);
+ strncpy(username, p, MIN( UAM_USERNAMELEN, (q - p)) );
+ username[ UAM_USERNAMELEN+1] = '\0';
+
/* Parse input for password in next () */
p = q + 3;
free(data);
return(-1);
}
- strncpy(password, p, q - p);
+ strncpy(password, p, MIN(PASSWDLEN, q - p) );
+ password[ PASSWDLEN+1] = '\0';
+
/* Done copying username and password, clean up */
free(data);
#define UAM_PASSWD_MAXFAIL (1 << 2) /* not implemented yet. */
#define UAM_PASSWD_EXPIRETIME (1 << 3) /* not implemented yet. */
+/* max lenght of username */
+#define UAM_USERNAMELEN 255
+
/* i'm doing things this way because os x server's dynamic linker
* support is braindead. it also allows me to do a little versioning. */
struct uam_export {
-dnl $Id: config-checks.m4,v 1.3 2002-04-29 06:23:58 morgana Exp $
+dnl $Id: config-checks.m4,v 1.3.4.1 2003-09-03 20:40:51 didg Exp $
dnl Autoconf macro to set the configuration directories.
AC_DEFUN([NETATALK_CONFIG_DIRS], [
]
)
- NLSDIR="${PKGCONFDIR}/nls"
+ NLSDIR="${datadir}/netatalk/nls"
AC_ARG_WITH(nls-dir,
- [ --with-nls-dir=PATH path to NLS files [PKGCONF/nls]],
+ [ --with-nls-dir=PATH path to NLS files [DATA/netatalk/nls]],
[
if test "x$withval" != "x"; then
NLSDIR="$withval"
AC_ARG_WITH(message-dir,
[ --with-message-dir=PATH path to server message files [PKGCONF/msg]],
[
- if test "x$withval" != "x"; then
+ if test x"$withval" = x"no"; then
+ AC_MSG_WARN([*** message-dir is mandatory and cannot be disabled, using default ***])
+ elif test "x$withval" != "x" && test x"$withval" != x"yes"; then
SERVERTEXT="$withval"
- cat >> confdefs.h <<EOF
-#define SERVERTEXT "$withval"
-EOF
fi
]
)
.SH NAME
afpd \- AppleTalk Filing Protocol daemon
.SH SYNOPSIS
-.B :SBINDIR:/afpd
+.B afpd
[
-.B -d
+.B -duptDTvI
]
[
.B -f
.I systemvolumes
]
[
-.B -u
-]
-[
.B -n
.I nbpname
]
.I guest
]
[
-.B -G
+.B -P
+.I pidfile
+]
+[
+.B -S
+.I port
+]
+[
+.B -L
+.I message
]
[
-.B -K
+.B -F
+.I config
]
[
-.B -C
+.B -U
+.I uams
]
[
-.B -A
+.B -m
+.I umask
]
.SH DESCRIPTION
.B afpd
.BI \-g " guest"
Specifies the name of the guest account. The default is ``nobody''.
.TP
-.B \-G
+.BI \-P " pidfile"
+Specifies the file in which
+.B afpd
+stores its process id.
.TP
-.B \-K
+.B \-p
+Prevents clients from saving their passwords. (Equivalent to
+.I \-nosavepasswd
+in
+.BR afpd.conf .)
.TP
-.B \-C
+.B \-t
+Allows clients to change their passwords. (Equivalent to
+.I \-setpasswd
+in
+.BR afpd.conf .)
.TP
-.B \-A
-Causes the server to not offer
-.BR NoUserAuthent ,
-.BR "Kerberos IV" ,
-.BR "Cleartxt Passwrd" ,
-and
-.B AFS Kerberos
-logins, respectively. The default is to enable all available login methods.
+.B \-D
+Use DDP (AppleTalk) as transport protocol. (Equivalent to
+.I \-ddp
+in
+.BR afpd.cond .)
+.TP
+.B \-T
+Use TCP/IP as transport protocol. (Equivalent to
+.I \-tcp
+in
+.BR afpd.conf .)
+.TP
+.BI \-S " port"
+Specifies the port to register with when doing AFPoverTCP. Defaults to
+.IR 548 .
+(Equivalent to
+.I -port
+in
+.BR afpd.conf .)
+.TP
+.BI \-L " message"
+Specifies the login message that will be sent to clients. (Equivalent to
+.I \-loginmsg
+in
+.BR afpd.conf .)
+.TP
+.BI \-F " config"
+Specifies the configuration file to use. (Defaults to
+.IR :ETCDIR:/afpd.conf .)
+.TP
+.BI \-U " uams"
+Comma-separated list of UAMs to use for the authentication process.
+(Equivalent to
+.I -uamlist
+in
+.BR afpd.conf .)
+.TP
+.B \-I
+Use a platform specific icon. (Equivalent to
+.I \-icon
+in
+.BR afpd.conf .)
+.TP
+.BR \-m " umask"
+Use this umask for the creation of folders in Netatalk.
+.TP
+.B \-v
+Print version information and exit.
.SH AUTHENTICATION
.B afpd
currently understands three User Authentication Methods (UAMs):
# Solaris specific defines, passed to subdirectories.
# To use Sun CC, uncomment the CC and KFLAGS variables.
#
-# $Id: Makefile.kernel.in,v 1.3 2002-04-08 20:47:25 morgana Exp $
+# $Id: Makefile.kernel.in,v 1.3.4.1 2003-09-03 20:40:51 didg Exp $
# uncomment for 64-bit sparc kernel
# use gcc
KCFLAGS = -D_KERNEL -Wall -Wstrict-prototypes ${KGCCFLAGS} # -mcpu=ultrasparc
-OPTOPTS = -O
+# optimization has been reported to cause problems, leave it off
+OPTOPTS =
CSHAREDFLAGS = -fPIC
LDSHARED = ${CC}
LDSHAREDFLAGS = -shared