Fix conflicts.

This commit is contained in:
David E. O'Brien 1999-09-15 05:45:17 +00:00
parent 77dec3a0c7
commit ce802deb8d
24 changed files with 233 additions and 182 deletions

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1989 Jan-Simon Pendry
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1989 The Regents of the University of California.
@ -38,7 +38,8 @@
.\"
.\" %W% (Berkeley) %G%
.\"
.\" $Id: amd.8,v 1.2 1998/09/05 05:52:24 obrien Exp $
.\" $Id: amd.8,v 1.2 1999/01/10 21:53:40 ezk Exp $
.\" $FreeBSD$
.\"
.Dd April 19, 1994
.Dt AMD 8

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: amd.c,v 1.3 1998/11/14 03:13:19 obrien Exp $
* $Id: amd.c,v 1.5 1999/02/04 07:24:14 ezk Exp $
* $FreeBSD$
*
*/
@ -55,13 +56,7 @@
struct amu_global_options gopt; /* where global options are stored */
char pid_fsname[16 + MAXHOSTNAMELEN]; /* "kiska.southseas.nz:(pid%d)" */
#if 0
char *progname; /* "amd" */
#endif
char *hostdomain = "unknown.domain";
#if 0
char hostname[MAXHOSTNAMELEN + 1] = "localhost"; /* Hostname */
#endif
char hostd[2 * MAXHOSTNAMELEN + 1]; /* Host+domain */
char *endian = ARCH_ENDIAN; /* Big or Little endian */
char *cpu = HOST_CPU; /* CPU type */
@ -73,11 +68,6 @@ int orig_umask = 022;
int select_intr_valid;
jmp_buf select_intr;
#if 0
pid_t mypid; /* Current process id */
serv_state amd_state;
int foreground = 1; /* This is the top-level server */
#endif
struct amd_stats amd_stats; /* Server statistics */
struct in_addr myipaddr; /* (An) IP address of this host */
time_t do_mapc_reload = 0; /* mapc_reload() call required? */
@ -490,7 +480,7 @@ main(int argc, char *argv[])
* can mount the automounter.
*/
amu_get_myaddress(&myipaddr);
plog(XLOG_INFO, "My ip addr is 0x%x", htonl(myipaddr.s_addr));
plog(XLOG_INFO, "My ip addr is %s", inet_ntoa(myipaddr));
/* avoid hanging on other NFS servers if started elsewhere */
if (chdir("/") < 0)
@ -500,7 +490,7 @@ main(int argc, char *argv[])
* Now check we are root.
*/
if (geteuid() != 0) {
plog(XLOG_FATAL, "Must be root to mount filesystems (euid = %d)", geteuid());
plog(XLOG_FATAL, "Must be root to mount filesystems (euid = %ld)", (long) geteuid());
going_down(1);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: amq_subr.c,v 1.3 1999/01/13 20:03:54 obrien Exp $
* $Id: amq_subr.c,v 1.5 1999/08/24 21:31:06 ezk Exp $
* $FreeBSD$
*
*/
/*
@ -187,7 +188,7 @@ ok_security(struct svc_req *rqstp)
return(0); /* assume security is therefore not OK */
}
if (ntohs(sin->sin_port) >= 1024 ||
if (ntohs(sin->sin_port) >= IPPORT_RESERVED ||
!(sin->sin_addr.s_addr == htonl(0x7f000001) ||
sin->sin_addr.s_addr == myipaddr.s_addr)) {
char dq[20];
@ -253,21 +254,7 @@ amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp)
return 0;
return &rc;
}
#else /* not ENABLE_AMQ_MOUNT */
int *
amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp)
{
static int rc;
char *s = *(amq_string *) argp;
plog(XLOG_ERROR, "amq requested mount of %s, but code is disabled", s);
rc = EINVAL;
return &rc;
}
#endif /* not ENABLE_AMQ_MOUNT */
#endif /* ENABLE_AMQ_MOUNT */
amq_string *

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: get_args.c,v 1.2 1998/09/05 06:06:00 obrien Exp $
* $Id: get_args.c,v 1.3 1999/01/10 21:53:45 ezk Exp $
* $FreeBSD$
*
*/
@ -85,7 +86,7 @@ get_version_string(void)
vers = xmalloc(2048 + wire_buf_len);
sprintf(vers, "%s\n%s\n%s\n%s\n",
"Copyright (c) 1997-1998 Erez Zadok",
"Copyright (c) 1997-1999 Erez Zadok",
"Copyright (c) 1990 Jan-Simon Pendry",
"Copyright (c) 1990 Imperial College of Science, Technology & Medicine",
"Copyright (c) 1990 The Regents of the University of California.");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: srvr_nfs.c,v 1.2 1998/09/14 08:20:37 obrien Exp $
* $Id: srvr_nfs.c,v 1.5 1999/09/08 23:36:39 ezk Exp $
* $FreeBSD$
*
*/
@ -136,7 +137,7 @@ start_ping(u_long nfs_version)
nfs_version = NFS_VERSION;
plog(XLOG_WARNING, "start_ping: nfs_version = 0 fixed");
}
plog(XLOG_INFO, "start_ping: nfs_version: %d", nfs_version);
plog(XLOG_INFO, "start_ping: nfs_version: %d", (int) nfs_version);
rpc_msg_init(&ping_msg, NFS_PROGRAM, nfs_version, NFSPROC_NULL);
@ -187,7 +188,7 @@ got_portmap(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia
if (!error && port) {
#ifdef DEBUG
dlog("got port (%d) for mountd on %s", port, fs->fs_host);
dlog("got port (%d) for mountd on %s", (int) port, fs->fs_host);
#endif /* DEBUG */
/*
* Grab the port number. Portmap sends back
@ -201,7 +202,7 @@ got_portmap(voidp pkt, int len, struct sockaddr_in * sa, struct sockaddr_in * ia
} else {
#ifdef DEBUG
dlog("Error fetching port for mountd on %s", fs->fs_host);
dlog("\t error=%d, port=%d", error, port);
dlog("\t error=%d, port=%d", error, (int) port);
#endif /* DEBUG */
/*
* Almost certainly no mountd running on remote host
@ -282,7 +283,7 @@ recompute_portmap(fserver *fs)
if (fs->fs_version == 0)
plog(XLOG_WARNING, "recompute_portmap: nfs_version = 0 fixed");
plog(XLOG_INFO, "recompute_portmap: NFS version %d", fs->fs_version);
plog(XLOG_INFO, "recompute_portmap: NFS version %d", (int) fs->fs_version);
#ifdef HAVE_FS_NFS3
if (fs->fs_version == NFS_VERSION3)
mnt_version = MOUNTVERS3;
@ -290,7 +291,7 @@ recompute_portmap(fserver *fs)
#endif /* HAVE_FS_NFS3 */
mnt_version = MOUNTVERS;
plog(XLOG_INFO, "Using MOUNT version: %d", mnt_version);
plog(XLOG_INFO, "Using MOUNT version: %d", (int) mnt_version);
call_portmap(fs, nfs_auth, MOUNTPROG, mnt_version, (u_long) IPPROTO_UDP);
}
@ -667,7 +668,7 @@ find_nfs_srvr(mntfs *mf)
/* allow overriding if nfsv2 option is specified in mount options */
if (hasmntopt(&mnt, "nfsv2")) {
nfs_version = (u_long) 2; /* nullify any ``vers=X'' statements */
nfs_proto = "udp"; /* nullify any ``proto=tcp'' stmts */
nfs_proto = "udp"; /* nullify any ``proto=tcp'' statements */
plog(XLOG_WARNING, "found compatiblity option \"nfsv2\": set options vers=2, proto=udp for host %s", host);
}
#endif /* HAVE_NFS_NFSV2_H */
@ -725,7 +726,7 @@ find_nfs_srvr(mntfs *mf)
int proto_nfs_version;
char **p;
for (p = protocols; *p; p ++) {
for (p = protocols; *p; p++) {
proto_nfs_version = get_nfs_version(host, ip, nfs_version, *p);
if (proto_nfs_version > best_nfs_version) {
@ -756,7 +757,7 @@ find_nfs_srvr(mntfs *mf)
nfs_proto = "udp";
plog(XLOG_INFO, "Using NFS version %d, protocol %s on host %s",
nfs_version, nfs_proto, host);
(int) nfs_version, nfs_proto, host);
/*
* Try to find an existing fs server structure for this host.

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
.\"
.\" %W% (Berkeley) %G%
.\"
.\" $Id: amq.8,v 1.3 1998/09/12 04:04:57 obrien Exp $
.\" $Id: amq.8,v 1.2 1999/01/10 21:53:58 ezk Exp $
.\" $FreeBSD$
.\"
.Dd March 16, 1991
.Dt AMQ 8

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: amq.c,v 1.3 1999/01/13 20:03:56 obrien Exp $
* $Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $
* $FreeBSD$
*
*/
@ -48,13 +49,13 @@
#ifndef lint
char copyright[] = "\
@(#)Copyright (c) 1997-1998 Erez Zadok\n\
@(#)Copyright (c) 1997-1999 Erez Zadok\n\
@(#)Copyright (c) 1990 Jan-Simon Pendry\n\
@(#)Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n\
@(#)Copyright (c) 1990 The Regents of the University of California.\n\
@(#)All rights reserved.\n";
#if __GNUC__ < 2
static char rcsid[] = "$Id: amq.c,v 1.3 1999/01/13 20:03:56 obrien Exp $";
static char rcsid[] = "$Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $";
static char sccsid[] = "%W% (Berkeley) %G%";
#endif /* __GNUC__ < 2 */
#endif /* not lint */
@ -66,9 +67,6 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include <amq.h>
/* locals */
#if 0
char *progname;
#endif
static int flush_flag;
static int minfo_flag;
static int getpid_flag;
@ -96,15 +94,6 @@ static int amq_bind_resv_port(int td, u_short *pp);
static int privsock(int ty);
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
/* dummy variables */
#if 0
char hostname[MAXHOSTNAMELEN];
pid_t mypid;
serv_state amd_state;
int foreground, orig_umask;
int debug_flags;
#endif
/* structures */
enum show_opt {
Full, Stats, Calc, Short, ShowDone
@ -247,7 +236,11 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twi
if (mi->mi_error > 0) {
extern int sys_nerr;
if (mi->mi_error < sys_nerr)
#ifdef HAVE_STRERROR
printf(" (%s)", strerror(mi->mi_error));
#else /* not HAVE_STRERROR */
printf(" (%s)", sys_errlist[mi->mi_error]);
#endif /* not HAVE_STRERROR */
else
printf(" (Error %d)", mi->mi_error);
} else if (mi->mi_error < 0) {
@ -339,9 +332,9 @@ main(int argc, char *argv[])
*/
#ifdef ENABLE_AMQ_MOUNT
while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != -1)
#else
#else /* not ENABLE_AMQ_MOUNT */
while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:pP:TU")) != -1)
#endif
#endif /* not ENABLE_AMQ_MOUNT */
switch (opt_ch) {
case 'f':
flush_flag = 1;
@ -392,10 +385,12 @@ main(int argc, char *argv[])
nodefault = 1;
break;
#ifdef ENABLE_AMQ_MOUNT
case 'M':
mount_map = optarg;
nodefault = 1;
break;
#endif /* ENABLE_AMQ_MOUNT */
case 'P':
amd_program_number = atoi(optarg);
@ -422,11 +417,20 @@ main(int argc, char *argv[])
show_usage:
fprintf(stderr, "\
Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\
\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts] [-M mapent]\n\
\t[-P prognum] [-T] [-U]\n", am_get_progname());
\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts]%s\n\
\t[-P prognum] [-T] [-U]\n",
am_get_progname(),
#ifdef ENABLE_AMQ_MOUNT
" [-M mapent]"
#else /* not ENABLE_AMQ_MOUNT */
""
#endif /* not ENABLE_AMQ_MOUNT */
);
exit(1);
}
/* set use_udp and use_tcp flags both to on if none are defined */
if (!use_tcp_flag && !use_udp_flag)
use_tcp_flag = use_udp_flag = 1;

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
.\" %W% (Berkeley) %G%
.\"
.\" $Id: pawd.1,v 1.2 1998/09/05 06:56:36 obrien Exp $
.\" $FreeBSD$
.\"
.Dd January 6, 1998
.Dt PAWD 1

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: nfs_prot_freebsd2.h,v 1.2 1998/08/27 07:33:23 obrien Exp $
* $Id: nfs_prot_freebsd2.h,v 1.2 1999/01/10 21:54:14 ezk Exp $
* $FreeBSD$
*
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: nfs_prot_freebsd3.h,v 1.5 1999/01/13 20:03:57 obrien Exp $
* $Id: nfs_prot_freebsd3.h,v 1.4 1999/03/30 17:22:54 ezk Exp $
* $FreeBSD$
*
*/
@ -66,6 +67,9 @@ struct nfs_fh3;
#ifdef HAVE_NFS_NFS_H
# include <nfs/nfs.h>
#endif /* HAVE_NFS_NFS_H */
#ifdef HAVE_UFS_UFS_UFSMOUNT_H
# include <ufs/ufs/ufsmount.h>
#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
/*
* MACROS:

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
.\"
.\" %W% (Berkeley) %G%
.\"
.\" $Id: fixmount.8,v 1.3 1998/09/12 04:04:58 obrien Exp $
.\" $Id: fixmount.8,v 1.2 1999/01/10 21:54:26 ezk Exp $
.\" $FreeBSD$
.\"
.Dd February 26, 1993
.Dt FIXMOUNT 8

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: fixmount.c,v 1.3 1998/11/14 03:13:31 obrien Exp $
* $Id: fixmount.c,v 1.4 1999/02/04 07:24:42 ezk Exp $
* $FreeBSD$
*
*/
@ -86,15 +87,6 @@ void fix_rmtab(CLIENT *, char *, mountlist, int, int);
void print_dump(mountlist);
void usage(void);
/* dummy variables */
#if 0
char *progname;
char hostname[MAXHOSTNAMELEN];
pid_t mypid;
serv_state amd_state;
int foreground, orig_umask;
int debug_flags;
#endif
void
usage(void)

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1993 Jan-Simon Pendry.
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@ -33,7 +33,8 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93
.\" $Id: fsinfo.8,v 1.2 1998/09/12 04:04:58 obrien Exp $
.\" $Id: fsinfo.8,v 1.2 1999/01/10 21:54:28 ezk Exp $
.\" $FreeBSD$
.\"
.Dd June 26, 1999
.Dt FSINFO 8

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: fsinfo.c,v 1.2 1998/08/23 22:52:08 obrien Exp $
* $Id: fsinfo.c,v 1.4 1999/02/04 07:24:44 ezk Exp $
* $FreeBSD$
*
*/
@ -79,14 +80,6 @@ char *exportfs_pref;
char *fstab_pref;
char *mount_pref;
/* dummy variables */
#if 0
pid_t mypid;
serv_state amd_state;
int foreground, orig_umask;
int debug_flags;
#endif
/*
* Argument cracking...

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1989 Jan-Simon Pendry
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1989 The Regents of the University of California.
@ -36,7 +36,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: hlfsd.8,v 1.3 1998/09/12 04:04:58 obrien Exp $
.\" $Id: hlfsd.8,v 1.2 1999/01/10 21:54:32 ezk Exp $
.\" $FreeBSD$
.\"
.\" HLFSD was written at Columbia University Computer Science Department, by
.\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: hlfsd.c,v 1.3 1998/11/14 03:13:31 obrien Exp $
* $Id: hlfsd.c,v 1.5 1999/09/08 23:36:51 ezk Exp $
* $FreeBSD$
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@ -83,10 +84,6 @@ char *alt_spooldir = ALT_SPOOLDIR;
char *home_subdir = HOME_SUBDIR;
char *logfile = DEFAULT_LOGFILE;
char *passwdfile = NULL; /* alternate passwd file to use */
#if 0
char *progname;
int foreground = 1; /* This is the top-level server */
#endif
char *slinkname = 0;
char hostname[MAXHOSTNAMELEN + 1] = "localhost";
int cache_interval = DEFAULT_CACHE_INTERVAL;
@ -96,10 +93,6 @@ int noverify = 0;
int orig_umask = 022;
int serverpid = 0;
nfstime startup;
#if 0
pid_t mypid; /* Current process id */
#endif
serv_state amd_state;
u_short nfs_port;
/* symbol must be available always */
@ -109,12 +102,6 @@ char *mnttab_file_name = MNTTAB_FILE_NAME;
char *mnttab_file_name = NULL;
#endif /* not MOUNT_TABLE_ON_FILE */
#if 0
#ifdef DEBUG
int debug_flags = 0;
#endif /* DEBUG */
#endif
/* forward declarations */
void hlfsd_going_down(int rc);
@ -949,8 +936,13 @@ fatal(char *mess)
lessmess[messlen - 4] = '\0';
if (errno < sys_nerr)
fprintf(stderr, "%s: %s: %s\n", am_get_progname(),
lessmess, sys_errlist[errno]);
fprintf(stderr, "%s: %s: %s\n", am_get_progname(), lessmess,
#ifdef HAVE_STRERROR
strerror(errno)
#else /* not HAVE_STRERROR */
sys_errlist[errno]
#endif /* not HAVE_STRERROR */
);
else
fprintf(stderr, "%s: %s: Error %d\n",
am_get_progname(), lessmess, errno);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: homedir.c,v 1.2 1998/08/23 22:52:09 obrien Exp $
* $Id: homedir.c,v 1.4 1999/01/13 23:31:19 ezk Exp $
* $FreeBSD$
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@ -159,8 +160,8 @@ homedir(int userid)
if (found->child) { /* PARENT */
#ifdef DEBUG
if (lastchild)
plog(XLOG_INFO, "cache spill uid = %d, pid = %d, home = %s",
lastchild->uid, lastchild->child,
plog(XLOG_INFO, "cache spill uid = %ld, pid = %ld, home = %s",
(long) lastchild->uid, (long) lastchild->child,
lastchild->home);
#endif /* DEBUG */
lastchild = found;
@ -270,7 +271,7 @@ delay(uid2home_t *found, int secs)
#ifdef DEBUG
if (found)
dlog("delaying on child %d for %d seconds", found->child, secs);
dlog("delaying on child %ld for %d seconds", (long) found->child, secs);
#endif /* DEBUG */
tv.tv_usec = 0;
@ -536,8 +537,8 @@ hlfsd_getpwent(void)
/* the rest of the fields are unimportant and not being considered */
plog(XLOG_USER, "hlfsd_getpwent: name=%s, uid=%d, dir=%s",
passwd_ent.pw_name, passwd_ent.pw_uid, passwd_ent.pw_dir);
plog(XLOG_USER, "hlfsd_getpwent: name=%s, uid=%ld, dir=%s",
passwd_ent.pw_name, (long) passwd_ent.pw_uid, passwd_ent.pw_dir);
return &passwd_ent;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: am_defs.h,v 1.4 1999/01/13 20:03:59 obrien Exp $
* $Id: am_defs.h,v 1.10 1999/08/22 05:12:54 ezk Exp $
* $FreeBSD$
*
*/
@ -69,6 +70,24 @@
char *strchr(), *strrchr(), *strdup();
#endif /* not STDC_HEADERS */
/*
* Handle gcc __attribute__ if available.
*/
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif /* __GNUC__ < 2 ... */
/*
* The __-protected variants of `format' and `printf' attributes
* are accepted by gcc versions 2.6.4 (effectively 2.7) and later.
*/
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif /* __GNUC__ < 2 ... */
#endif /* not __attribute__ */
/*
* How to handle signals of any type
*/
@ -303,7 +322,7 @@ extern int errno;
#endif /* HAVE_SYS_MNTENT_H */
/*
* Actions to take if <ndbm.h> exists.
* Actions to take if <ndbm.h> or <db1/ndbm.h> exist.
* Should be included before <rpcsvc/yp_prot.h> because on some systems
* like Linux, it also defines "struct datum".
*/
@ -314,6 +333,13 @@ extern int errno;
# define DATUM
# endif /* not DATUM */
#endif /* HAVE_NDBM_H */
#ifdef HAVE_DB1_NDBM_H
# include <db1/ndbm.h>
# ifndef DATUM
/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
# define DATUM
# endif /* not DATUM */
#endif /* HAVE_DB1_NDBM_H */
/*
* Actions to take if <net/errno.h> exists.
@ -323,19 +349,19 @@ extern int errno;
#endif /* HAVE_NET_ERRNO_H */
/*
* Actions to take if <net/if.h> exists.
* Actions to take if <net/route.h> exists.
*/
#ifdef HAVE_NET_ROUTE_H
# include <net/route.h>
#endif /* HAVE_NET_ROUTE_H */
/*
* Actions to take if <net/if.h> exists.
* Actions to take if <sys/mbuf.h> exists.
*/
#ifdef HAVE_SYS_MBUF_H
# include <sys/mbuf.h>
/*
* OSF4 (DU-4.0) defines m_next and m_data also in <sys/mount> so I must
* OSF4 (DU-4.0) defines m_next and m_data also in <sys/mount.h> so I must
# undefine them here to avoid conflicts.
*/
# ifdef m_next
@ -345,7 +371,7 @@ extern int errno;
# undef m_data
# endif /* m_data */
/*
* AIX 3 defines MFREE and m_flags also in <sys/mount>.
* AIX 3 defines MFREE and m_flags also in <sys/mount.h>.
*/
# ifdef m_flags
# undef m_flags
@ -470,8 +496,8 @@ struct ypall_callback;
*/
#ifdef HAVE_LINUX_FS_H
/*
* There's a conflict of definitions on redhat alpha linux between
* <netinet/in.h> and <linux/fs.h>.
* There are various conflicts in definitions between RedHat Linux, newer
* 2.2 kernels, and <netinet/in.h> and <linux/fs.h>.
*/
# ifdef HAVE_SOCKETBITS_H
/* conflicts with <socketbits.h> */
@ -485,23 +511,54 @@ struct ypall_callback;
# undef BLKRRPART
# undef MS_MGC_VAL
# undef MS_RMT_MASK
# if defined(__GLIBC__) && __GLIBC__ >= 2
/* conflicts with <waitflags.h> */
# undef WNOHANG
# undef WUNTRACED
# undef WNOHANG
# undef WUNTRACED
# endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
/* conflicts with <statfsbuf.h> */
# define _SYS_STATFS_H
# endif /* HAVE_SOCKETBITS_H */
# ifdef _SYS_WAIT_H
# if defined(__GLIBC__) && __GLIBC__ >= 2
/* conflicts with <bits/waitflags.h> (RedHat/Linux 6.0 and kernels 2.2 */
# undef WNOHANG
# undef WUNTRACED
# endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
# endif /* _SYS_WAIT_H */
# ifdef HAVE_LINUX_POSIX_TYPES_H
# include <linux/posix_types.h>
# endif /* HAVE_LINUX_POSIX_TYPES_H */
# ifndef _LINUX_BYTEORDER_GENERIC_H
# define _LINUX_BYTEORDER_GENERIC_H
# endif /* _LINUX_BYTEORDER_GENERIC_H */
/* conflicts with <sys/mount.h> in 2.1 kernels */
/* conflicts with <sys/mount.h> in 2.[12] kernels */
# ifdef _SYS_MOUNT_H
# ifdef BLOCK_SIZE
# undef BLOCK_SIZE
# endif /* BLOCK_SIZE */
# undef BLKFLSBUF
# undef BLKGETSIZE
# undef BLKRAGET
# undef BLKRASET
# undef BLKROGET
# undef BLKROSET
# undef BLKRRPART
# undef BLOCK_SIZE
# undef MS_MANDLOCK
# undef MS_MGC_VAL
# undef MS_NOATIME
# undef MS_NODEV
# undef MS_NODIRATIME
# undef MS_NOEXEC
# undef MS_NOSUID
# undef MS_RDONLY
# undef MS_REMOUNT
# undef MS_RMT_MASK
# undef MS_SYNCHRONOUS
# undef S_APPEND
# undef S_IMMUTABLE
/* conflicts with <statfsbuf.h> */
# define _SYS_STATFS_H
# endif /* _SYS_MOUNT_H */
# include <linux/fs.h>
#endif /* HAVE_LINUX_FS_H */
@ -576,7 +633,7 @@ struct ypall_callback;
# include <nfs/mount.h>
#endif /* HAVE_NFS_MOUNT_H */
#ifdef HAVE_NFS_NFS_MOUNT_H_off
/* broken on netxtep3 (includes non-existing headers) */
/* broken on nexttep3 (includes non-existing headers) */
# include <nfs/nfs_mount.h>
#endif /* HAVE_NFS_NFS_MOUNT_H */
#ifdef HAVE_NFS_PATHCONF_H
@ -701,6 +758,12 @@ struct sockaddr_dl;
#ifdef HAVE_SYS_FS_UFS_MOUNT_H
# include <sys/fs/ufs_mount.h>
#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
#ifdef HAVE_UFS_UFS_UFSMOUNT_H_off
# error do not include this file here because on netbsd/openbsd it
# error causes errors with other header files. Instead, add it to the
# error specific conf/nfs_prot_*.h file.
# include <ufs/ufs/ufsmount.h>
#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
/*
* Actions to take if <sys/fs/efs_clnt.h> exists.
@ -1224,6 +1287,10 @@ extern char *optarg;
extern int optind;
#endif /* not HAVE_EXTERN_OPTARG */
#if defined(HAVE_CLNT_SPCREATEERROR) && !defined(HAVE_EXTERN_CLNT_SPCREATEERROR)
extern char *clnt_spcreateerror(const char *s);
#endif /* defined(HAVE_CLNT_SPCREATEERROR) && !defined(HAVE_EXTERN_CLNT_SPCREATEERROR) */
#if defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO)
extern char *clnt_sperrno(const enum clnt_stat num);
#endif /* defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO) */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: mount_fs.c,v 1.1.1.2 1999/01/13 19:20:28 obrien Exp $
* $Id: mount_fs.c,v 1.7 1999/08/22 21:12:33 ezk Exp $
* $FreeBSD$
*
*/
@ -109,6 +110,7 @@ struct opt_tab mnt_flags[] =
};
/* compute generic mount flags */
int
compute_mount_flags(mntent_t *mntp)
{
@ -146,6 +148,20 @@ compute_mount_flags(mntent_t *mntp)
}
/* compute generic mount flags for automounter mounts */
int
compute_automounter_mount_flags(mntent_t *mntp)
{
int flags = 0;
#ifdef MNT2_GEN_OPT_IGNORE
flags |= MNT2_GEN_OPT_IGNORE;
#endif /* not MNT2_GEN_OPT_IGNORE */
return flags;
}
int
mount_fs(mntent_t *mnt, int flags, caddr_t mnt_data, int retry, MTYPE_TYPE type, u_long nfs_version, const char *nfs_proto, const char *mnttabname)
{
@ -754,6 +770,13 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp)
nap->flags |= MNT2_NFS_OPT_ACDIRMIN | MNT2_NFS_OPT_ACDIRMAX;
# endif /* defined(MNT2_NFS_OPT_ACDIRMIN) && defined(MNT2_NFS_OPT_ACDIRMAX) */
#endif /* not MNT2_NFS_OPT_NOAC */
/*
* Provide a slight bit more security by requiring the kernel to use
* reserved ports.
*/
#ifdef MNT2_NFS_OPT_RESVPORT
nap->flags |= MNT2_NFS_OPT_RESVPORT;
#endif /* MNT2_NFS_OPT_RESVPORT */
}
@ -816,7 +839,7 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version)
nbp = nap->syncaddr;
plog(XLOG_DEBUG, "NA->syncaddr {netbuf} 0x%x", (int) nbp);
kncp = nap->knconf;
plog(XLOG_DEBUG, "NA->knconf->semantics %lu", kncp->knc_semantics);
plog(XLOG_DEBUG, "NA->knconf->semantics %lu", (unsigned long) kncp->knc_semantics);
plog(XLOG_DEBUG, "NA->knconf->protofmly \"%s\"", kncp->knc_protofmly);
plog(XLOG_DEBUG, "NA->knconf->proto \"%s\"", kncp->knc_proto);
plog(XLOG_DEBUG, "NA->knconf->rdev %lu", kncp->knc_rdev);
@ -824,9 +847,9 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version)
#else /* not HAVE_TRANSPORT_TYPE_TLI */
sap = (struct sockaddr_in *) &nap->addr;
plog(XLOG_DEBUG, "NA->addr {sockaddr_in} (len=%d) = \"%s\"",
sizeof(struct sockaddr_in),
(int) sizeof(struct sockaddr_in),
get_hex_string(sizeof(struct sockaddr_in), (const char *)sap));
#ifdef HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN_off
#ifdef HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN
plog(XLOG_DEBUG, "NA->addr.sin_len = \"%d\"", sap->sin_len);
#endif /* HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN */
plog(XLOG_DEBUG, "NA->addr.sin_family = \"%d\"", sap->sin_family);
@ -836,6 +859,10 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version)
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
plog(XLOG_DEBUG, "NA->hostname = \"%s\"", nap->hostname ? nap->hostname : "null");
#ifdef HAVE_FIELD_NFS_ARGS_T_NAMLEN
plog(XLOG_DEBUG, "NA->namlen = %d", nap->namlen);
#endif /* HAVE_FIELD_NFS_ARGS_T_NAMLEN */
#ifdef MNT2_NFS_OPT_FSNAME
plog(XLOG_DEBUG, "NA->fsname = \"%s\"", nap->fsname ? nap->fsname : "null");
#endif /* MNT2_NFS_OPT_FSNAME */
@ -872,6 +899,9 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version)
plog(XLOG_DEBUG, "NA->rsize = %d", nap->rsize);
plog(XLOG_DEBUG, "NA->wsize = %d", nap->wsize);
#ifdef HAVE_FIELD_NFS_ARGS_T_BSIZE
plog(XLOG_DEBUG, "NA->bsize = %d", nap->bsize);
#endif /* HAVE_FIELD_NFS_ARGS_T_BSIZE */
plog(XLOG_DEBUG, "NA->timeo = %d", nap->timeo);
plog(XLOG_DEBUG, "NA->retrans = %d", nap->retrans);

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1993 Jan-Simon Pendry
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@ -33,7 +33,8 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)mk-amd-map.8 8.1 (Berkeley) 6/28/93
.\" $Id: mk-amd-map.8,v 1.1.1.1 1998/08/23 22:07:21 obrien Exp $
.\" $Id: mk-amd-map.8,v 1.2 1999/01/10 21:54:41 ezk Exp $
.\" $FreeBSD$
.\"
.Dd June 28, 1993
.Dt MK-AMD-MAP 8

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: mk-amd-map.c,v 1.5 1998/11/14 03:13:32 obrien Exp $
* $Id: mk-amd-map.c,v 1.4 1999/02/04 07:24:50 ezk Exp $
* $FreeBSD$
*/
/*
@ -50,16 +51,6 @@
#endif /* HAVE_CONFIG_H */
#include <am_defs.h>
/* dummy variables */
#if 0
char *progname;
pid_t mypid;
serv_state amd_state;
int foreground, orig_umask;
int debug_flags;
#endif
char hostname[MAXHOSTNAMELEN];
/* (libdb version 2) uses .db extensions but an old dbm API */
/* check for libgdbm to distinguish it from linux systems */
#if defined(DBM_SUFFIX) && !defined(HAVE_LIBGDBM)

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
.\"
.\" %W% (Berkeley) %G%
.\"
.\" $Id: amd.conf.5,v 1.7 1999/08/14 21:37:28 chris Exp $
.\" $Id: amd.conf.5,v 1.3 1999/03/30 17:23:08 ezk Exp $
.\" $FreeBSD$
.\"
.Dd April 7, 1997
.Dt AMD.CONF 5
@ -588,7 +589,7 @@ runs.
.Po This is accomplished by returning non-zero values to the
.Xr statfs 2
.Pc system call .
.It Nm unmount_on_exist (boolean, default=no)
.It Nm unmount_on_exit (boolean, default=no)
If
.Dq yes ,
then

View File

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 1997-1998 Erez Zadok
.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
.\"
.\" %W% (Berkeley) %G%
.\"
.\" $Id: wire-test.8,v 1.1.1.1 1998/08/23 22:07:21 obrien Exp $
.\" $Id: wire-test.8,v 1.2 1999/01/10 21:54:44 ezk Exp $
.\" $FreeBSD$
.\"
.Dd February 26, 1993
.Dt WIRE-TEST 8

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1998 Erez Zadok
* Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@ -38,7 +38,8 @@
*
* %W% (Berkeley) %G%
*
* $Id: wire-test.c,v 1.3 1998/11/14 03:13:33 obrien Exp $
* $Id: wire-test.c,v 1.4 1999/02/04 07:24:54 ezk Exp $
* $FreeBSD$
*
*/
@ -49,15 +50,6 @@
#define STRMAX 100
/* dummy variables */
#if 0
char *progname;
pid_t mypid;
serv_state amd_state;
int foreground, orig_umask;
int debug_flags;
#endif
char hostname[MAXHOSTNAMELEN + 1];
@ -72,10 +64,6 @@ main(int argc, char **argv)
struct hostent *hp = 0;
am_set_progname(argv[0]);
#if 0
mypid = getpid();
orig_umask = umask(0);
#endif
if (gethostname(hostname, sizeof(hostname)) < 0) {
perror(argv[0]);