* README: updated 1.5+ install instructions to include list of
required and recommended packages
+ * etc/uams/uam_*.c: cleanups, addition of CVS Id tag to C source
+
+ * configure.in, acconfig.h: change USE_AFS to AFS to be the same as
+ all of the defines in the codebase
+
+ * etc/uams/uam_dhx_pam.c: fixed DHX login using this module (last
+ patch made with syslog()'s didn't include any brackets)
+ (Bug #233756)
+
+ * distrib/initscripts/.cvsignore: removed pulling of atalk
+
2001-02-26 jeff b <jeff@univrel.pr.uconn.edu>
* configure.in: added /usr/local/ssl to list of SSL paths to check, to
rc.atalk.redhat
rc.atalk.suse
rc.atalk.tru64
+atalk
--- /dev/null
+#################################################### VERSIONING INFORMATION
+%define name netatalk
+%define version 1.5pre5
+%define release 0
+
+################################################# BASIC PACKAGE INFORMATION
+Summary: Appletalk and Appleshare/IP services for Linux
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Copyright: BSD
+Group: Networking/Daemons
+Source0: %{name}-%{version}.tar.gz
+URL: http://netatalk.sourceforge.net/
+Packager: rufus t firefly <rufus.t.firefly@linux-mandrake.com>
+Obsoletes: netatalk-1.4b2+asun netatalk-1.4.99
+
+############################################################## REQUIREMENTS
+Requires: cracklib, openssl, tcp_wrappers, pam
+BuildRequires: openssl-devel
+
+Prefix: %{_prefix}
+BuildRoot: /var/tmp/%{name}-buildroot
+
+%description
+netatalk is an implementation of the AppleTalk Protocol Suite for Unix/Linux
+systems. The current release contains support for Ethertalk Phase I and II,
+DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and AFP. It provides Appletalk file
+printing and routing services on Solaris 2.5, Linux, FreeBSD, SunOS 4.1 and
+Ultrix 4. It also supports AFP 2.1 and 2.2 (Appleshare IP).
+
+%package devel
+Group: Development/Networking
+Summary: Appletalk and Appleshare/IP services for Linux development files
+%description devel
+netatalk is an implementation of the AppleTalk Protocol Suite for Unix/Linux
+systems. The current release contains support for Ethertalk Phase I and II,
+DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and AFP. It provides Appletalk file
+printing and routing services on Solaris 2.5, Linux, FreeBSD, SunOS 4.1 and
+Ultrix 4. It also supports AFP 2.1 and 2.2 (Appleshare IP).
+
+This package is required for developing appletalk-based applications.
+
+%changelog
+
+* Fri Feb 23 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
+ - v1.5pre5-0
+ - pre-release 5 for sourceforge (prebuild)
+
+* Tue Feb 20 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
+ - v1.5pre4-1
+ - pre-release 4 for sourceforge
+ - modified/split mandrake spec for redhat 7 build
+
+* Mon Dec 18 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
+ - v1.5pre3-1mdk
+ - pre-release 3 for sourceforge
+ - moved away from 1.4.99 ...
+
+* Wed Nov 08 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
+ - v1.4.99-0.20001108mdk
+ - pre-release 2 for sourceforge
+
+* Wed Sep 27 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
+ - v1.4.99-0.20000927mdk
+ - pre-release 1 for sourceforge
+
+%prep
+%setup -q -n %{name}/
+
+%build
+./autogen.sh
+CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer -fsigned-char" ./configure \
+ --prefix=%{prefix} \
+ --enable-lastdid \
+ --enable-redhat \
+ --with-cracklib \
+ --with-pam \
+ --with-shadow \
+ --with-tcp-wrappers \
+ --with-ssl
+# --with-flock-locks
+make all
+
+%install
+### INSTALL (USING "make install") ###
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR=$RPM_BUILD_ROOT install-strip
+
+# bzip2 man pages
+#for i in 1 3 4 5 8; do
+# bzip2 -v $RPM_BUILD_ROOT/usr/man/man$i/*.$i
+#done
+
+# install pam file
+#mkdir -p $RPM_BUILD_ROOT/etc/pam.d/
+#install -m 644 -o 0 -g 0 config/netatalk.pamd \
+# $RPM_BUILD_ROOT/etc/pam.d/netatalk
+
+%post
+### RUN CHKCONFIG ###
+/sbin/chkconfig --add atalk
+/sbin/ldconfig
+# after the first install only
+if [ "$1" = 1 ]; then
+ # add the ddp lines to /etc/services
+ if (grep '[0-9][0-9]*/ddp' /etc/services >/dev/null); then
+ cat <<'_EOD1_' >&2
+warning: The DDP services appear to be present in /etc/services.
+warning: Please check them against services.atalk in the documentation.
+_EOD1_
+ true
+ else
+ cat <<'_EOD2_' >>/etc/services
+# start of DDP services
+#
+# Everything between the 'start of DDP services' and 'end of DDP services'
+# lines will be automatically deleted when the netatalk package is removed.
+#
+rtmp 1/ddp # Routing Table Maintenance Protocol
+nbp 2/ddp # Name Binding Protocol
+echo 4/ddp # AppleTalk Echo Protocol
+zip 6/ddp # Zone Information Protocol
+
+afpovertcp 548/tcp # AFP over TCP
+afpovertcp 548/udp
+# end of DDP services
+_EOD2_
+ fi
+fi
+
+%preun
+### RUN CHKCONFIG ###
+/sbin/chkconfig --del atalk
+
+%postun
+# do only for the last un-install
+if [ "$1" = 0 ]; then
+ # remove the ddp lines from /etc/services
+ if (grep '^# start of DDP services$' /etc/services >/dev/null && \
+ grep '^# end of DDP services$' /etc/services >/dev/null ); then
+ sed -e '/^# start of DDP services$/,/^# end of DDP services$/d' \
+ </etc/services >/tmp/services.tmp$$
+ cat /tmp/services.tmp$$ >/etc/services
+ rm /tmp/services.tmp$$
+ else
+ cat <<'_EOD3_' >&2
+warning: Unable to find the lines `# start of DDP services` and
+warning: `# end of DDP services` in the file /etc/services.
+warning: You should remove the DDP services from /etc/services manually.
+_EOD3_
+ fi
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_DIR/%{name}/
+
+%files
+%defattr(-,root,root)
+%doc AUTHORS BUGS CHANGES CONTRIBUTORS COPYRIGHT ChangeLog NEWS README* TODO
+%doc VERSION doc/
+%config /etc/atalk/Apple*
+%config /etc/atalk/*.conf
+%config /etc/pam.d/netatalk
+/etc/atalk/nls/*
+/etc/atalk/uams/*.so
+/etc/rc.d/init.d/atalk
+%dir /etc/atalk
+%dir /etc/atalk/nls
+%dir /etc/atalk/uams
+%{prefix}/bin/*
+%{prefix}/sbin/*
+%{prefix}/man/man*/*
+
+%files devel
+%defattr(-,root,root)
+%{prefix}/lib/*.a
+%dir %{prefix}/include/atalk
+%{prefix}/include/atalk/*.h
+%dir %{prefix}/include/netatalk
+%{prefix}/include/netatalk/*.h
+%{prefix}/share/aclocal/netatalk.m4
/*
+ * $Id: uams_dhx_pam.c,v 1.13 2001-02-27 17:07:43 rufustfirefly 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.
#include <string.h>
#include <syslog.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
#include <security/pam_appl.h>
#ifdef OPENSSL_DHX
#define COPY_STRING(s) (s) ? strdup(s) : NULL
- if (num_msg < 1)
+ if (num_msg < 1) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM DHX Conversation Err -- %m");
/* Log Entry */
return PAM_CONV_ERR;
+ }
reply = (struct pam_response *)
calloc(num_msg, sizeof(struct pam_response));
- if (!reply)
+ if (!reply) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM DHX Conversation Err -- %m");
/* Log Entry */
return PAM_CONV_ERR;
+ }
for (count = 0; count < num_msg; count++) {
char *string = NULL;
switch (msg[count]->msg_style) {
case PAM_PROMPT_ECHO_ON:
- if (!(string = COPY_STRING(PAM_username)))
+ if (!(string = COPY_STRING(PAM_username))) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: username failure -- %m");
/* Log Entry */
goto pam_fail_conv;
+ }
break;
case PAM_PROMPT_ECHO_OFF:
- if (!(string = COPY_STRING(PAM_password)))
+ if (!(string = COPY_STRING(PAM_password))) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: passwd failure: --: %m");
/* Log Entry */
goto pam_fail_conv;
+ }
break;
case PAM_TEXT_INFO:
#ifdef PAM_BINARY_PROMPT
DH *dh;
/* get the client's public key */
- if (!(bn = BN_bin2bn(ibuf, KEYSIZE, NULL)))
+ if (!(bn = BN_bin2bn(ibuf, KEYSIZE, NULL))) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM No Public Key -- %m");
/* Log Entry */
return AFPERR_PARAM;
+ }
/* get our primes */
if (!(gbn = BN_bin2bn(&g, sizeof(g), NULL))) {
/* grab some of the options */
if (uam_afpserver_option(obj, UAM_OPTION_USERNAME, (void *) &buf,
- &i) < 0)
+ &i) < 0) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: uam_afpserver_option didn't meet uam_option_username -- %m");
/* Log Entry */
return AFPERR_PARAM;
+ }
len = (unsigned char) *ibuf++;
if ( len > i ) {
/* check for session id */
memcpy(&sessid, ibuf, sizeof(sessid));
- if (sessid != dhxhash(obj))
+ if (sessid != dhxhash(obj)) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM Session ID - DHXHash Mismatch -- %m");
/* Log Entry */
return AFPERR_PARAM;
+ }
ibuf += sizeof(sessid);
if (uam_afpserver_option(obj, UAM_OPTION_HOSTNAME,
err = AFPERR_NOTAUTH;
PAM_error = pam_start("netatalk", PAM_username, &PAM_conversation,
&pamh);
- if (PAM_error != PAM_SUCCESS)
+ if (PAM_error != PAM_SUCCESS) {
/* Log Entry */
- syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", PAM_error);
+ syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", pam_strerror(pamh,PAM_error));
/* Log Entry */
goto logincont_err;
+ }
/* solaris craps out if PAM_TTY and PAM_RHOST aren't set. */
pam_set_item(pamh, PAM_TTY, "afpd");
if (PAM_error == PAM_MAXTRIES)
err = AFPERR_PWDEXPR;
/* Log Entry */
- syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", PAM_error);
+ syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", pam_strerror(pamh, PAM_error));
/* Log Entry */
goto logincont_err;
}
err = AFPERR_PWDCHNG;
#endif
/* Log Entry */
- syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", PAM_error);
+ syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", pam_strerror(pamh, PAM_error));
/* Log Entry */
goto logincont_err;
}
#define PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED
#endif
PAM_error = pam_setcred(pamh, PAM_CRED_ESTABLISH);
- if (PAM_error != PAM_SUCCESS)
+ if (PAM_error != PAM_SUCCESS) {
/* Log Entry */
- syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", PAM_error);
+ syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", pam_strerror(pamh, PAM_error));
/* Log Entry */
goto logincont_err;
+ }
PAM_error = pam_open_session(pamh, 0);
- if (PAM_error != PAM_SUCCESS)
+ if (PAM_error != PAM_SUCCESS) {
/* Log Entry */
- syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", PAM_error);
+ syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM_Error: %s -- %m", pam_strerror(pamh, PAM_error));
/* Log Entry */
goto logincont_err;
+ }
memset(rbuf, 0, PASSWDLEN); /* zero out the password */
*uam_pwd = dhxpwd;
/* otherwise, it's like logincont but different. */
/* check out the session id */
- if (sessid != dhxhash(obj))
+ if (sessid != dhxhash(obj)) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: Session ID not Equal to DHX Hash -- %m");
/* Log Entry */
return AFPERR_PARAM;
+ }
/* we need this for pam */
if (uam_afpserver_option(obj, UAM_OPTION_HOSTNAME,
- (void *) &hostname, NULL) < 0)
+ (void *) &hostname, NULL) < 0) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: Hostname Null?? -- %m");
/* Log Entry */
return AFPERR_MISC;
+ }
/* grab the client's nonce, old password, and new password. */
CAST_cbc_encrypt(ibuf, ibuf, CHANGEPWBUFLEN, &castkey,
/* check to make sure that the random number is the same. we
* get sent back an incremented random number. */
- if (!(bn1 = BN_bin2bn(ibuf, KEYSIZE, NULL)))
+ if (!(bn1 = BN_bin2bn(ibuf, KEYSIZE, NULL))) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: Random Number Not the same or not incremented-- %m");
/* Log Entry */
return AFPERR_PARAM;
+ }
if (!(bn2 = BN_bin2bn(randbuf, sizeof(randbuf), NULL))) {
BN_free(bn1);
PAM_error = pam_start("netatalk", username, &PAM_conversation,
&lpamh);
- if (PAM_error != PAM_SUCCESS)
+ if (PAM_error != PAM_SUCCESS) {
/* Log Entry */
syslog(LOG_INFO, "uams_dhx_pam.c :PAM: Needless to say, PAM_error is != to PAM_SUCCESS -- %m");
/* Log Entry */
return AFPERR_PARAM;
+ }
pam_set_item(lpamh, PAM_TTY, "afpd");
pam_set_item(lpamh, PAM_RHOST, hostname);
-/* Copyright (c) 1990,1993 Regents of The University of Michigan.
+/*
+ * $Id: uams_dhx_passwd.c,v 1.6 2001-02-27 17:07:43 rufustfirefly 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.
*/
#ifdef SHADOWPW
#include <shadow.h>
-#endif SHADOWPW
+#endif /* SHADOWPW */
#ifdef OPENSSL_DHX
#include <openssl/bn.h>
#include <bn.h>
#include <dh.h>
#include <cast.h>
-#endif
+#endif /* OPENSSL_DHX */
#include <atalk/afp.h>
#include <atalk/uam.h>
+/*
+ * $Id: uams_guest.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ *
+ * (c) 2001 (see COPYING)
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/*
+ * $Id: uams_pam.c,v 1.6 2001-02-27 17:07:43 rufustfirefly 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.
-/* Copyright (c) 1990,1993 Regents of The University of Michigan.
+/*
+ * $Id: uams_passwd.c,v 1.6 2001-02-27 17:07:43 rufustfirefly 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.
*/
-/* Copyright (c) 1990,1993 Regents of The University of Michigan.
+/*
+ * $Id: uams_pgp.c,v 1.4 2001-02-27 17:07:43 rufustfirefly 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.
*/
#include <bn.h>
#include <dh.h>
#include <cast.h>
-#endif
+#endif /* OPENSSL_DHX */
#include <atalk/afp.h>
#include <atalk/uam.h>
UAM_MODULE_VERSION,
uam_setup, uam_cleanup
};
+
#endif
/*
+ * $Id: uams_randnum.c,v 1.4 2001-02-27 17:07:43 rufustfirefly 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.