-($Id: ChangeLog,v 1.53 2001-06-25 18:17:49 rufustfirefly Exp $)
+($Id: ChangeLog,v 1.54 2001-06-25 20:13:45 rufustfirefly Exp $)
2001-06-25 jeff b <jeff@univrel.pr.uconn.edu>
* etc/afpd/auth.c, etc/afpd/main.c, etc/afpd/uam.c,
* etc/afpd/uam.c, etc/papd/uam.c: fixed DISABLE_SHELLCHECK
support in both afpd and papd (Jason Keltz <jas@cs.yorku.ca>)
+ * etc/*/*.{c,h}: corrected malformed defines, nicer comments,
+ CVS Id tags
+
2001-06-20 jeff b <jeff@univrel.pr.uconn.edu>
* configure.in: check for linux/quota.h before enabling
QUOTACTL_WRAPPER (Joe Clarke)
/*
+ * $Id: aep.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/syslog.h>
#include <sys/types.h>
/*
+ * $Id: atserv.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1992 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: config.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
#include <errno.h>
#ifdef __svr4__
#include <sys/sockio.h>
#include <sys/stropts.h>
-#endif __svr4__
+#endif /* __svr4__ */
#include "interface.h"
#include "multicast.h"
#ifndef IFF_SLAVE /* a little backward compatibility */
#define IFF_SLAVE 0
-#endif
+#endif /* IFF_SLAVE */
int router(), dontroute(), seed(), phase(), net(), addr(), zone();
fclose(conf);
return -1;
}
-#endif __svr4__
+#endif /* __svr4__ */
while ( fgets( line, sizeof( line ), conf ) != NULL ) {
if (( argv = parseline( line )) == NULL ) {
if ((ifr.ifr_flags & IFF_MULTICAST) == 0)
fprintf(stderr, "%s: multicast may not work properly.\n",
ifr.ifr_name);
-#endif
+#endif /* IFF_MULTICAST */
/* configure hw multicast for this interface. */
if (addmulti(ifr.ifr_name, NULL) < 0) {
fprintf(stderr, "Can't configure multicast.\n");
goto read_conf_err;
}
-#endif __svr4__
+#endif /* __svr4__ */
if (( niface = newiface( argv[ 0 ] )) == NULL ) {
perror( "newiface" );
#ifndef __svr4__
close( s );
-#endif
+#endif /* __svr4__ */
fclose( conf );
read_conf_err:
#ifndef __svr4__
close(s);
-#endif
+#endif /* __svr4__ */
fclose(conf);
return -1;
}
if ((ifr.ifr_flags & IFF_MULTICAST) == 0)
fprintf(stderr, "%s: multicast may not work correctly.\n",
ifr.ifr_name);
-#endif
+#endif /* IFF_MULTICAST */
if (addmulti(ifr.ifr_name, NULL) < 0) {
fprintf(stderr, "%s: disabled.\n", ifr.ifr_name);
strncpy( niface->i_name, name, sizeof(niface->i_name));
#ifdef BSD4_4
niface->i_addr.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
niface->i_addr.sat_family = AF_APPLETALK;
#ifdef BSD4_4
niface->i_caddr.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
niface->i_caddr.sat_family = AF_APPLETALK;
return( niface );
}
return( 0 );
}
-#endif __svr4__
+#endif /* __svr4__ */
/*
+ * $Id: gate.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: interface.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
* Copyright (c) 1990,1992 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
extern struct interface *ciface;
struct interface *newiface __P((const char *));
-#endif
+#endif /* ATALKD_INTERFACE_H */
/*
+ * $Id: list.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1992 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: main.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#if defined( sun ) && defined( __svr4__ )
#include </usr/ucbinclude/sys/file.h>
-#else sun __svr4__
+#else /* sun __svr4__ */
#include <sys/file.h>
-#endif sun __svr4__
+#endif /* sun __svr4__ */
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/ioctl.h>
#ifdef __svr4__
#include <sys/sockio.h>
#include <termios.h>
-#endif __svr4__
+#endif /* __svr4__ */
#include "interface.h"
#include "gate.h"
/* FIXME/SOCKLEN_T: socklen_t is a unix98 feature */
#ifndef SOCKLEN_T
#define SOCKLEN_T unsigned int
-#endif
+#endif /* SOCKLEN_T */
#ifndef WEXITSTATUS
#define WEXITSTATUS(x) ((x).w_retcode)
-#endif WEXITSTATUS
+#endif /* WEXITSTATUS */
/* linux has a special ioctl for appletalk device destruction. as of
* 2.1.57, SIOCDIFADDR works w/ linux. okay, we need to deal with the
#if (SIOCDIFADDR != SIOCATALKDIFADDR)
if (!ifconfig(iface->i_name, SIOCATALKDIFADDR, &iface->i_addr))
continue;
-#endif
-#endif
+#endif /* SIOCDIFADDR != SIOCATALKDIFADDR */
+#endif /* SIOCATALKIFADDR */
syslog( LOG_ERR, "difaddr(%u.%u): %m",
ntohs(iface->i_addr.sat_addr.s_net),
iface->i_addr.sat_addr.s_node);
}
}
-#endif
+#endif /* SOPCDOFADDR */
server_unlock(pidfile);
exit(i);
#if !defined( ibm032 ) && !defined( _IBMR2 )
void
-#endif ibm032 _IBMR2
+#endif /* ibm032 _IBMR2 */
as_timer()
{
struct sockaddr_at sat;
if ((iface->i_flags & IFACE_ISROUTER)) {
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
sat.sat_family = AF_APPLETALK;
sat.sat_addr.s_net = ATADDR_ANYNET;
sat.sat_addr.s_node = ATADDR_BCAST;
#ifdef DEBUG
consistency();
-#endif DEBUG
+#endif /* DEBUG */
}
#ifdef DEBUG
}
}
}
-#endif DEBUG
+#endif /* DEBUG */
#if !defined( ibm032 ) && !defined( _IBMR2 )
void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
as_debug()
{
struct interface *iface;
*/
#if !defined( ibm032 ) && !defined( _IBMR2 )
void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
as_down()
{
struct interface *iface;
fprintf(stderr, "can't establish STREAMS plumbing, exiting.\n" );
atalkd_exit( 1 );
}
-#endif __svr4__
+#endif /* __svr4__ */
/* delete pre-existing interface addresses. */
#ifdef SIOCDIFADDR
#ifdef SIOCATALKDIFADDR
#if (SIOCDIFADDR != SIOCATALKDIFADDR)
ifconfig(iface->i_name, SIOCATALKDIFADDR, &iface->i_addr);
-#endif
-#endif
+#endif /* SIOCDIFADDR != SIOCATALKDIFADDR */
+#endif /* SIOCATALKDIFADDR */
}
}
-#endif
+#endif /* SIOCDIFADDR */
/*
* Disassociate. The child will send itself a signal when it is
#ifdef ultrix
openlog( prog, LOG_PID );
-#else ultrix
+#else /* ultrix */
openlog( prog, LOG_PID, LOG_DAEMON );
-#endif ultrix
+#endif /* ultrix */
syslog( LOG_INFO, "restart (%s)", version );
syslog( LOG_ERR, "route shutdown: %m" );
atalkd_exit( 1 );
}
-#else BSD4_4
+#else /* BSD4_4 */
if (( rtfd = socket( AF_APPLETALK, SOCK_DGRAM, 0 )) < 0 ) {
syslog( LOG_ERR, "route socket: %m" );
atalkd_exit( 1 );
}
-#endif BSD4_4
+#endif /* BSD4_4 */
memset(&sv, 0, sizeof(sv));
sv.sa_handler = as_down;
iface->i_flags, ap->ap_port, ap->ap_fd );
bprint( Packet, c );
}
-#endif DEBUG
+#endif /* DEBUG */
#ifdef __svr4__
if ( sighold( SIGALRM ) || sighold( SIGUSR1 )) {
syslog( LOG_ERR, "sighold: %m" );
atalkd_exit( 1 );
}
-#else __svr4__
+#else /* __svr4__ */
mask = sigsetmask( sigmask( SIGALRM ) |
sigmask( SIGUSR1 ));
-#endif __svr4__
+#endif /* __svr4__ */
if (( *ap->ap_packet )( ap, &sat, Packet, c ) < 0) {
syslog(LOG_ERR, "ap->ap_packet: %m");
atalkd_exit(1);
#ifdef DEBUG
consistency();
-#endif DEBUG
+#endif /* DEBUG */
#ifdef __svr4__
if ( sigrelse( SIGUSR1 ) || sigrelse( SIGALRM )) {
syslog( LOG_ERR, "sigrelse: %m" );
atalkd_exit( 1 );
}
-#else __svr4__
+#else /* __svr4__ */
sigsetmask( mask );
-#endif __svr4__
+#endif /* __svr4__ */
}
}
}
#ifdef BSD4_4
iface->i_addr.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
iface->i_addr.sat_family = AF_APPLETALK;
iface->i_addr.sat_addr.s_net = net;
iface->i_addr.sat_addr.s_node = node;
/* open ports */
i = 1; /* enable broadcasts */
-#if defined(__svr4__)
+#ifdef __svr4__
syslog(LOG_INFO, "setsockopt incompatible w/ Solaris STREAMS module.");
-#endif
+#endif /* __svr4__ */
for ( ap = iface->i_ports; ap; ap = ap->ap_next ) {
if (( ap->ap_fd = socket( AF_APPLETALK, SOCK_DGRAM, 0 )) < 0 ) {
syslog( LOG_ERR, "socket: %m" );
atalkd_exit( 1 );
}
-#if !defined(__svr4__)
+#ifndef __svr4__
setsockopt(ap->ap_fd, SOL_SOCKET, SO_BROADCAST, &i, sizeof(i));
-#endif
+#endif /* ! __svr4 */
memset( &sat, 0, sizeof( struct sockaddr_at ));
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
sat.sat_family = AF_APPLETALK;
sat.sat_addr.s_net = iface->i_addr.sat_addr.s_net;
sat.sat_addr.s_node = iface->i_addr.sat_addr.s_node;
#ifdef SIOCATALKDIFADDR
#if (SIOCDIFADDR != SIOCATALKDIFADDR)
ifconfig( iface->i_name, SIOCATALKDIFADDR, &iface->i_addr );
-#endif
-#endif
+#endif /* SIOCDIFADDR != SIOCATALKDIFADDR */
+#endif /* SIOCATALKDIFADDR */
}
}
-#endif
+#endif /* SIOCDIFADDR */
atalkd_exit( 1 );
}
}
printf( "\n" );
fflush( stdout );
}
-#endif DEBUG
+#endif /* DEBUG */
+/*
+ * $Id: main.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
#ifndef ATALKD_MAIN_H
#define ATALKD_MAIN_H
/*
+ * $Id: multicast.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#if __FreeBSD_version >= 300000
#include <net/if_dl.h>
#define NO_DATA_LINK_PASSTHROUGH
-#endif
-#endif
+#endif /* __FreeBSD_version >= 300000 */
+#endif /* __FreeBSD__ */
#ifdef __svr4__
#include <sys/sockio.h>
-#endif __svr4__
+#endif /* __svr4__ */
#include <atalk/util.h>
#include <netatalk/endian.h>
{
#ifdef NO_DATA_LINK_PASSTHROUGH
struct sockaddr_dl sa;
-#else
+#else /* NO_DATA_LINK_PASSTHROUGH */
struct sockaddr sa;
-#endif
+#endif /* NO_DATA_LINK_PASSTHROUGH */
memset(&sa, 0, sizeof(sa));
#ifdef NO_DATA_LINK_PASSTHROUGH
memcpy(LLADDR(&sa), data ? data : ethermulti, sizeof(ethermulti));
sa.sdl_alen = sizeof(ethermulti);
sa.sdl_len = sizeof(sa);
-#else
+#else /* NO_DATA_LINK_PASSTHROUGH */
memcpy(sa.sa_data, data ? data : ethermulti, sizeof(ethermulti));
-#endif
+#endif /* NO_DATA_LINK_PASSTHROUGH */
if (ifconfig(name, SIOCADDMULTI, (struct sockaddr_at *)&sa))
return -1;
/*
+ * $Id: multicast.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1997 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: nbp.c,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#ifdef __svr4__
#include <sys/sockio.h>
-#endif __svr4__
+#endif /* __svr4__ */
#include "atserv.h"
#include "interface.h"
memset( &nn.nn_sat, 0, sizeof( struct sockaddr_at ));
#ifdef BSD4_4
nn.nn_sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
nn.nn_sat.sat_family = AF_APPLETALK;
nn.nn_sat.sat_addr.s_net = nt.nt_net;
nn.nn_sat.sat_addr.s_node = nt.nt_node;
if ( zt == 0 ) {
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
sat.sat_family = AF_APPLETALK;
sat.sat_port = ap->ap_port;
} else {
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
sat.sat_family = AF_APPLETALK;
sat.sat_port = ap->ap_port;
for ( l = zt->zt_rt; l; l = l->l_next ) {
/*
+ * $Id: nbp.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: route.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <string.h>
#include <sys/param.h>
{
#ifdef TRU64
struct ortentry rtent;
-#else
+#else /* TRU64 */
struct rtentry rtent;
-#endif
+#endif /* TRU64 */
memset( &rtent, 0, sizeof( struct rtentry ));
rtent.rt_dst = *dst;
return( ioctl( rtfd, message, &rtent ));
}
-#else BSD4_4
+#else /* BSD4_4 */
struct sockaddr_m {
u_char sam_len;
}
return( 0 );
}
-#endif BSD4_4
+#endif /* BSD4_4 */
/*
- * $Id: rtmp.c,v 1.5 2001-06-19 18:04:39 rufustfirefly Exp $
+ * $Id: rtmp.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
RTF_UP | RTF_HOST ) ) {
return( 1 );
}
-#else /* BSD4_4 */
+#else /* ! BSD4_4 */
if ( route( cmd,
(struct sockaddr_at *) &dst,
(struct sockaddr_at *) &loop,
ntohs( gate.sat_addr.s_net ), gate.sat_addr.s_node );
continue;
}
-#else /* BSD4_4 */
+#else /* ! BSD4_4 */
if ( route( command,
(struct sockaddr_at *) &dst,
(struct sockaddr_at *) &gate,
ntohs( gate.sat_addr.s_net ), gate.sat_addr.s_node );
continue;
}
-#endif /* BSD4_4 */
+#endif /* ! BSD4_4 */
} while ( net++ < ntohs( rtmp->rt_lastnet ));
if ( command == RTMP_ADD ) {
/*
+ * $Id: rtmp.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
* We have an rtmptab circular linked list for each gateway. Entries
* are inserted in the order we get them. The expectation is that
* we will get a complexity of N for the stable case. If we have N
#ifndef BSD4_4
#define RTMP_ADD SIOCADDRT
#define RTMP_DEL SIOCDELRT
-#else BSD4_4
+#else /* BSD4_4 */
#define RTMP_ADD RTM_ADD
#define RTMP_DEL RTM_DELETE
-#endif BSD4_4
+#endif /* BSD4_4 */
#define STARTUP_FIRSTNET 0xff00
#define STARTUP_LASTNET 0xfffe
/*
+ * $Id: zip.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#ifdef __svr4__
#include <sys/sockio.h>
-#endif __svr4__
+#endif /* __svr4__ */
#include <atalk/ddp.h>
#include <atalk/zip.h>
#ifdef DEBUG
printf( "zip notify from %u.%u\n", ntohs( from->sat_addr.s_net ),
from->sat_addr.s_node );
-#endif DEBUG
+#endif /* DEBUG */
break;
default :
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
sat.sat_family = AF_APPLETALK;
sat.sat_addr.s_net = 0;
sat.sat_addr.s_node = ATADDR_BCAST;
/*
+ * $Id: zip.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: auth.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
/*
+ * $Id: comment.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/syslog.h>
#include <sys/param.h>
/*
+ * $Id: comment.h,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: file.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/syslog.h>
#include <sys/param.h>
/*
+ * $Id: file.h,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
/*
+ * $Id: lp.c,v 1.9 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/param.h>
#include <sys/syslog.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <ctype.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#if defined( sun ) && defined( __svr4__ )
#include </usr/ucbinclude/sys/file.h>
-#else sun __svr4__
+#else /* sun && __svr4__ */
#include <sys/file.h>
-#endif sun __svr4__
+#endif /* sun && __svr4__ */
#include <sys/un.h>
#include <netinet/in.h>
#undef s_net
#ifdef ABS_PRINT
#include <math.h>
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
#include <pwd.h>
#include "printer.h"
printer->p_balance = atof( balance ) + atof( cost );
return( err < 0 ? -1 : 0 );
}
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
void lp_host( host )
char *host;
#ifdef ABS_PRINT
char cost[ 22 ];
char balance[ 22 ];
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
if ( printer->p_flags & P_AUTH ) {
authenticated = 0;
spoolerror( out, "No ABS funds available." );
return( -1 );
}
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
}
if ( gethostname( hostname, sizeof( hostname )) < 0 ) {
+/*
+ * $Id: lp.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
#ifndef PAPD_LP_H
#define PAPD_LP_H 1
/*
+ * $Id: main.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/param.h>
#include <sys/types.h>
#include <sys/uio.h>
#if defined( sun ) && defined( __svr4__ )
#include </usr/ucbinclude/sys/file.h>
-#else sun __svr4__
+#else /* sun && __svr4__ */
#include <sys/file.h>
-#endif sun __svr4__
+#endif /* sun && __svr4__ */
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <netdb.h>
#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <netatalk/endian.h>
#include <netatalk/at.h>
#if !defined( ibm032 ) && !defined( _IBMR2 )
void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
die( n )
int n;
{
#if !defined( ibm032 ) && !defined( _IBMR2 )
void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
reap()
{
int status;
#ifdef __svr4__
defprinter.p_flags = P_PIPED;
defprinter.p_printer = "/usr/bin/lp -T PS";
-#else
+#else /* __svr4__ */
defprinter.p_flags = P_SPOOLED;
defprinter.p_printer = "lp";
-#endif
+#endif /* __svr4__ */
defprinter.p_operator = "operator";
defprinter.p_spool = _PATH_PAPDSPOOLDIR;
#ifdef ABS_PRINT
defprinter.p_role = NULL;
defprinter.p_srvid = 0;
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
defprinter.p_pagecost = 200; /* default cost */
defprinter.p_pagecost_msg = NULL;
defprinter.p_lock = "lock";
}
#ifdef ultrix
openlog( p, LOG_PID );
-#else ultrix
+#else /* ultrix */
openlog( p, LOG_NDELAY|LOG_PID, LOG_LPR );
-#endif ultrix
+#endif /* ultrix */
syslog( LOG_INFO, "restart (%s)", version );
bzero( &sat, sizeof( struct sockaddr_at ));
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
sat.sat_family = AF_APPLETALK;
sat.sat_addr.s_net = ATADDR_ANYNET;
sat.sat_addr.s_node = ATADDR_ANYNODE;
if ( atp_sresp( pr->p_atp, &atpb ) < 0 ) {
syslog( LOG_ERR, "atp_sresp: %m" );
}
-#endif notdef
+#endif /* notdef */
}
}
}
} else {
pr->p_srvid = c;
}
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
}
} else {
pr->p_flags &= ~P_KRB;
}
-#endif
+#endif /* KRB */
endprent();
}
/*
+ * $Id: ppd.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
return read_ppd( printer->p_ppdfile, 0 );
}
-#endif SHOWPPD
+#endif /* SHOWPPD */
struct ppdent *getppdent( stream )
FILE *stream;
if ( ! ppd_inited ) {
ppd_init();
}
-#endif SHOWPPD
+#endif /* SHOWPPD */
for ( pfo = ppd_fonts; pfo; pfo = pfo->pd_next ) {
if ( strcmp( pfo->pd_font, font ) == 0 ) {
if ( ! ppd_inited ) {
ppd_init();
}
-#endif SHOWPPD
+#endif /* SHOWPPD */
for ( end = feature + len, p = feature, q = ppd_feature_main;
(p <= end) && (*p != '\n') && (*p != '\r'); p++, q++ ) {
/*
+ * $Id: ppd.h,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
+
#ifndef PAPD_PPD_H
#define PAPD_PPD_H 1
/*
+ * $Id: printcap.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#ifndef lint
static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91";
#include <ctype.h>
#include <stdio.h>
#include <string.h>
+#ifndef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
#include <atalk/paths.h>
#include "printcap.h"
#ifndef BUFSIZ
#define BUFSIZ 1024
-#endif
+#endif /* ! BUFSIZ */
#define MAXHOP 32 /* max number of tc= indirections */
/*
#define tnchktc pnchktc
#define tnamatch pnamatch
#define V6
-#endif
+#endif /* PRINTCAP */
static FILE *pfp = NULL; /* printcap data base file pointer */
static char *tbuf;
+/*
+ * $Id: printcap.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
#ifndef PAPD_PRINTCAP_H
#define PAPD_PRINTCAP_H 1
/*
+ * $Id: printer.h,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef notdef
char *p_fonts;
char *p_psetdir;
-#endif notdef
+#endif /* notdef */
char *p_ppdfile;
char *p_authprintdir;
int p_flags;
char *pr_role;
double pr_balance;
int pr_srvid;
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
int pr_pagecost;
char *pr_pagecost_msg;
char *pr_lock;
#define p_role p_un.pu_pr.pr_role
#define p_balance p_un.pu_pr.pr_balance
#define p_srvid p_un.pu_pr.pr_srvid
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
#define p_pagecost p_un.pu_pr.pr_pagecost
#define p_pagecost_msg p_un.pu_pr.pr_pagecost_msg
#define p_lock p_un.pu_pr.pr_lock
/*
+ * $Id: queries.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <string.h>
#include <stdio.h>
#ifdef KRB
#ifdef SOLARIS
#include <kerberos/krb.h>
-#else
+#else /* SOLARIS */
#include <krb.h>
-#endif
-#endif KRB
+#endif /* SOLARIS */
+#endif /* KRB */
#include "file.h"
#include "comment.h"
CONSUME( in, linelength + crlflength );
}
}
-#endif KRB
+#endif /* KRB */
int gq_true( out )
struct papfile *out;
} else if ( printer->p_flags & P_ACCOUNT ) {
#ifdef ABS_PRINT
lp_pagecost();
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
sprintf( cost, "%d", printer->p_pagecost );
append( out, cost, strlen( cost ));
} else {
append( out, balance, strlen( balance ));
return( 0 );
}
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
/*
{ "UMICHCostPerPage", gq_pagecost },
#ifdef notdef
{ "UMICHUserBalance", gq_balance },
-#endif
+#endif /* notdef */
{ "RBISpoolerID", gq_rbispoolerid },
{ "RBIUAMListQuery", gq_rbiuamlist },
{ "UMICHListQueue", gq_true },
/*
+ * $Id: session.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
+/*
+ * $Id: session.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
#ifndef PAPD_SESSION_H
#define PAPD_SESSION_H 1
/*
+ * $Id: showppd.c,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
-/* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
+/*
+ * $Id: uam.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
+ * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <fcntl.h>
#include <ctype.h>
#include <syslog.h>
}
}
endpwent();
-#endif
+#endif /* NO_REAL_USER_NAME */
/* os x server doesn't keep anything useful if we do getpwent */
return pwent ? getpwnam(name) : NULL;
-/* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
+/*
+ * $Id: uam_auth.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
+ * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
*
* interface between uam.c and auth.c
/*
+ * $Id: psa.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
* PostScript Accounting, psa.
*
* psa is invoked by psf, as output for a communication program. The
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
+ * $Id: psf.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
* PostScript Filter, psf.
*
* Handles both PostScript files and text files. Files with the
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#define FUCKED
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
int c, rc, children = 0;
#ifdef FUCKED
int psafileno, multiconn = 0, waitidle = 0, waitidle2 = 0;
-#endif FUCKED
+#endif /* FUCKED */
int status;
extern char *optarg;
extern int optind, opterr;
}
#ifdef ultrix
openlog( prog, LOG_PID );
-#else ultrix
+#else /* ultrix */
openlog( prog, LOG_PID, LOG_LPR );
-#endif ultrix
+#endif /* ultrix */
while (( c = getopt( ac, av, "P:C:D:F:L:J:x:y:n:h:w:l:i:c" )) != EOF ) {
switch ( c ) {
if ( width == 0 ) {
width = 80;
}
-#endif ZEROWIDTH
+#endif /* ZEROWIDTH */
break;
case 'l' :
default :
syslog( LOG_ERR, "bad option: %c", c );
exit( 2 );
-#endif notdef
+#endif /* notdef */
}
}
if ( ac - optind > 1 ) {
if ( index( prog, 'm' )) {
multiconn++;
}
-#endif FUCKED
+#endif /* FUCKED */
syslog( LOG_INFO, "starting for %s", name ? name : "?" );
papargv[ 5 ] = _PATH_PAGECOUNT;
papargv[ 6 ] = 0;
}
-#endif FUCKED
+#endif /* FUCKED */
} else {
papargv[ 2 ] = "-c";
papargv[ 3 ] = "-E";
children++;
syslog( LOG_INFO, "pagecount with pap[%d]", c );
}
-#endif FUCKED
+#endif /* FUCKED */
if ( children ) {
close( 1 );
if ( WIFEXITED( status )) {
#ifndef WEXITSTATUS
#define WEXITSTATUS(x) ((x).w_status)
-#endif WEXITSTATUS
+#endif /* WEXITSTATUS */
if ( WEXITSTATUS( status ) != 0 ) {
syslog( LOG_ERR, "%d died with %d", c, WEXITSTATUS( status ));
exit( WEXITSTATUS( status ));
/*
- * $Id: uams_dhx_pam.c,v 1.14 2001-04-16 17:49:49 rufustfirefly Exp $
+ * $Id: uams_dhx_pam.c,v 1.15 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#if defined(USE_PAM) && defined(UAM_DHX)
#include <stdio.h>
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/cast.h>
-#else
+#else /* OPENSSL_DHX */
#include <bn.h>
#include <dh.h>
#include <cast.h>
-#endif
+#endif /* OPENSSL_DHX */
#include <atalk/afp.h>
#include <atalk/uam.h>
goto pam_fail;
}
memcpy(rbuf + KEYSIZE, buf, KEYSIZE);
-#else
+#else /* 0 */
memset(rbuf + KEYSIZE, 0, KEYSIZE);
-#endif
+#endif /* 0 */
/* encrypt using cast */
CAST_cbc_encrypt(rbuf, rbuf, CRYPTBUFLEN, &castkey, msg2_iv,
/*
- * $Id: uams_dhx_passwd.c,v 1.9 2001-06-25 15:18:01 rufustfirefly Exp $
+ * $Id: uams_dhx_passwd.c,v 1.10 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#ifdef UAM_DHX
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#ifndef NO_CRYPT_H
#include <crypt.h>
-#endif
+#endif /* ! NO_CRYPT_H */
#include <pwd.h>
#include <syslog.h>
#ifdef SOLARIS
#define SHADOWPW
-#endif SOLARIS
+#endif /* SOLARIS */
#ifdef SHADOWPW
#include <shadow.h>
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/cast.h>
-#else
+#else /* OPENSSL_DHX */
#include <bn.h>
#include <dh.h>
#include <cast.h>
u_int8_t g = 0x07;
#ifdef SHADOWPW
struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
BIGNUM *bn, *gbn, *pbn;
u_int16_t sessid;
int len, i;
return AFPERR_NOTAUTH;
}
dhxpwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
if (!dhxpwd->pw_passwd)
return AFPERR_NOTAUTH;
goto passwd_fail;
}
memcpy(rbuf + KEYSIZE, name, KEYSIZE);
-#else
+#else /* 0 */
memset(rbuf + KEYSIZE, 0, KEYSIZE);
-#endif
+#endif /* 0 */
/* encrypt using cast */
CAST_cbc_encrypt(rbuf, rbuf, CRYPTBUFLEN, &castkey, iv, CAST_ENCRYPT);
UAM_MODULE_VERSION,
uam_setup, uam_cleanup
};
-#endif
+
+#endif /* UAM_DHX */
/*
- * $Id: uams_guest.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_guest.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
*
* (c) 2001 (see COPYING)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H &/
#include <stdio.h>
#include <stdlib.h>
/*
- * $Id: kuam.c,v 1.3 2001-03-28 22:42:15 samnoble Exp $
+ * $Id: kuam.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
-#if defined( HAVE_CONFIG_H )
+#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#ifdef UAM_AFSKRB
/*
- * $Id: lifetime.c,v 1.2 2001-02-27 21:07:20 rufustfirefly Exp $
+ * $Id: lifetime.c,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Ticket lifetime. This defines the table used to lookup lifetime
* for the fixed part of rande of the one byte lifetime field. Values
* upperbounds on ticket lifetimes.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#include <sys/types.h>
#include <netatalk/endian.h>
#define MAXTKTLIFETIME (30*24*3600) /* 30 days */
#ifndef NEVERDATE
#define NEVERDATE ((u_int32_t)-1L)
-#endif
+#endif /* NEVERDATE */
static int tkt_lifetimes[TKTLIFENUMFIXED] = {
38400, /* 10.67 hours, 0.44 days */
/*
- * $Id: send_to_kdc.c,v 1.3 2001-03-28 22:42:46 samnoble Exp $
+ * $Id: send_to_kdc.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Author: rufustfirefly $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
* $Source: /home/ralph/netatalk/rsync/netatalk/etc/uams/uams_krb4/send_to_kdc.c,v $
- * $Author: samnoble $
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
*
#ifndef lint
static char rcsid_send_to_kdc_c[] =
-"$Id: send_to_kdc.c,v 1.3 2001-03-28 22:42:46 samnoble Exp $";
+"$Id: send_to_kdc.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $";
#endif /* lint */
-#if defined( HAVE_CONFIG_H )
+#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#ifdef UAM_AFSKRB
/*
- * $Id: uams_krb4.c,v 1.3 2001-03-28 22:49:25 samnoble Exp $
+ * $Id: uams_krb4.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#endif
#if defined( KRB ) || defined( UAM_AFSKRB )
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <krb.h>
#if 0
#include <prot.h>
-#endif
+#endif /* 0 */
#include <netatalk/endian.h>
#include <atalk/afp.h>
static int logged = 0;
static char *tktfile;
static char instance[ INST_SZ ], name[ ANAME_SZ ];
-#endif /*UAM_AFSKRB*/
+#endif /* UAM_AFSKRB */
#ifdef AFS
#include <afs/stds.h>
int32_t BeginTimestamp;
int32_t EndTimestamp;
};
-#endif /*AFS*/
+#endif /* AFS */
#ifdef KRB
p = rbuf;
-#if !defined( AFS )
+#ifdef AFS
*p = KRB4RPL_DONE; /* XXX */
*rbuflen = 1;
return( AFPERR_NOTAUTH );
}
-#if defined( AFS )
+#ifdef AFS
if ( setpag() < 0 ) {
*rbuflen = 0;
syslog( LOG_ERR, "krb_login: setpag: %m" );
#ifdef AFS
struct ViceIoctl vi;
struct ClearToken ct;
-#endif /*AFS*/
+#endif /* AFS */
char buf[ 1024 ];
int aint, ulen, snlen;
ibuf++;
switch ( rc = *ibuf++ ) {
case KRB4CMD_TOKEN :
-#if defined (AFS)
+#ifdef AFS
p = buf;
memcpy( &len, ibuf, sizeof( u_int16_t ) );
ibuf += sizeof( len );
}
*uam_pwd = pwd;
return AFP_OK;
-#else AFS
+#else /* ! AFS */
/* get principals */
*p++ = KRB4RPL_PRINC;
len = strlen( realm );
}
}
-#endif /*KRB*/
+#endif /* KRB */
#ifdef AFS
passwd,/*setpag*/0,&errorstring);
}
}
-#endif /*AFS*/
+#endif /* AFS */
#if defined( UAM_AFSKRB ) && defined( AFS )
static int afskrb_login(void *obj, struct passwd *uam_pwd,
uam_register(UAM_SERVER_LOGIN, path, "Kerberos IV", krb4_login,
krb4_logincont, NULL);
/* uam_afpserver_action(); */
-#endif
+#endif /* KRB */
#ifdef UAM_AFSKRB
uam_register(UAM_SERVER_LOGIN, path, "AFS Kerberos", afskrb_login,
afskrb_logincont, NULL);
/* uam_afpserver_action(); */
-#endif
+#endif /* UAM_AFSKRB */
return 0;
}
/*
- * $Id: uams_pam.c,v 1.6 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_pam.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#ifdef USE_PAM
+
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <string.h>
#include <syslog.h>
case PAM_TEXT_INFO:
#ifdef PAM_BINARY_PROMPT
case PAM_BINARY_PROMPT:
-#endif
+#endif /* PAM_BINARY_PROMPT */
/* ignore it... */
break;
case PAM_ERROR_MSG:
#ifdef PAM_AUTHTOKEN_REQD
else if (PAM_error == PAM_AUTHTOKEN_REQD)
err = AFPERR_PWDCHNG;
-#endif
+#endif /* PAM_AUTHTOKEN_REQD */
goto login_err;
}
#ifndef PAM_CRED_ESTABLISH
#define PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED
-#endif
+#endif /* PAM_CRED_ESTABLISH */
PAM_error = pam_setcred(pamh, PAM_CRED_ESTABLISH);
if (PAM_error != PAM_SUCCESS)
goto login_err;
/*
- * $Id: uams_passwd.c,v 1.11 2001-06-25 15:18:01 rufustfirefly Exp $
+ * $Id: uams_passwd.c,v 1.12 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#ifndef NO_CRYPT_H
#include <crypt.h>
-#endif
+#endif /* ! NO_CRYPT_H */
#include <pwd.h>
#include <syslog.h>
#ifdef SOLARIS
#define SHADOWPW
-#endif SOLARIS
+#endif /* SOLARIS */
#ifdef SHADOWPW
#include <shadow.h>
-#endif SHADOWPW
+#endif /* SHADOWPW */
#include <atalk/afp.h>
#include <atalk/uam.h>
return AFPERR_NOTAUTH;
}
pwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
if (!pwd->pw_passwd)
return AFPERR_NOTAUTH;
{
#ifdef SHADOWPW
struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
char pw[PASSWDLEN + 1], *p;
uid_t uid = geteuid();
return AFPERR_PARAM;
}
pwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
p = crypt(pw, pwd->pw_passwd );
if (strcmp( p, pwd->pw_passwd )) {
ibuf[PASSWDLEN] = '\0';
#ifdef SHADOWPW
-#else
-#endif
+#else /* SHADOWPW */
+#endif /* SHADOWPW */
return AFP_OK;
-}
-#endif
+}
+#endif /* 0 */
/* Printer ClearTxtUAM login */
struct passwd *pwd;
#ifdef SHADOWPW
struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
char *data, *p, *q;
char password[PASSWDLEN + 1] = "\0";
static const char *loginok = "0\r";
return(-1);
}
pwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
if (!pwd->pw_passwd) {
syslog(LOG_INFO, "Bad Login ClearTxtUAM: no password for %s",
#ifdef AFS
if ( kcheckuser( pwd, password) == 0)
return(0);
-#endif AFS
+#endif /* AFS */
p = crypt(password, pwd->pw_passwd);
if (strcmp(p, pwd->pw_passwd) != 0) {
/*
- * $Id: uams_pgp.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_pgp.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#ifdef UAM_PGP
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <pwd.h>
#include <syslog.h>
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/cast.h>
-#else
+#else /* OPENSSL_DHX */
#include <bn.h>
#include <dh.h>
#include <cast.h>
*uam_pwd = pgppwd;
return AFP_OK;
}
-#endif AFS
+#endif /* AFS */
rbuf[PASSWDLEN] = '\0';
p = crypt( rbuf, pgppwd->pw_passwd );
uam_setup, uam_cleanup
};
-#endif
+#endif /* UAM_PGP */
/*
- * $Id: uams_randnum.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_randnum.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <fcntl.h>
#include <ctype.h>
#include <pwd.h>
#ifdef USE_CRACKLIB
#include <crack.h>
-#endif
+#endif /* USE_CRACKLIB */
#ifndef __inline__
#define __inline__
-#endif
+#endif /* __inline__ */
#define PASSWDLEN 8
#ifdef USE_CRACKLIB
else if (FascistCheck(ibuf + PASSWDLEN, _PATH_CRACKLIB))
err = AFPERR_PWDPOLCY;
-#endif
+#endif /* USE_CRACKLIB */
if (!err)
err = randpass(pwd, passwdfile, ibuf + PASSWDLEN, sizeof(seskey), 1);