pull up christos's amd patches that didn't make it into 6.0.3

(derived from diff'ing am-utils 6.0.1s10 and basesrc/usr.sbin/amd)
This commit is contained in:
dogcow 2000-06-16 02:10:12 +00:00
parent ff5f8a8828
commit 17fd16762b
5 changed files with 42 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: amq_subr.c,v 1.1.1.1 2000/06/07 00:52:22 dogcow Exp $ */
/* $NetBSD: amq_subr.c,v 1.2 2000/06/16 02:10:12 dogcow Exp $ */
/*
* Copyright (c) 1997-2000 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
@ -254,7 +254,28 @@ amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp)
return 0;
return &rc;
}
#endif /* ENABLE_AMQ_MOUNT */
#else /* not ENABLE_AMQ_MOUNT */
int *
amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp)
{
static int rc = EINVAL;
char *s = *(amq_string *) argp;
char dq[20];
struct sockaddr_in *sin;
if ((sin = amu_svc_getcaller(rqstp->rq_xprt)) == NULL) {
plog(XLOG_ERROR, "amu_svc_getcaller returned NULL");
return &rc;
}
plog(XLOG_ERROR,
"amq requested mount of %s from %s.%d, but code is disabled",
s, inet_dquad(dq, sin->sin_addr.s_addr),
ntohs(sin->sin_port));
return &rc;
}
#endif /* not ENABLE_AMQ_MOUNT */
amq_string *

View File

@ -1,4 +1,4 @@
/* $NetBSD: srvr_nfs.c,v 1.1.1.1 2000/06/07 00:52:22 dogcow Exp $ */
/* $NetBSD: srvr_nfs.c,v 1.2 2000/06/16 02:10:12 dogcow Exp $ */
/*
* Copyright (c) 1997-2000 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
@ -95,7 +95,7 @@ static char ping_buf[sizeof(struct rpc_msg) + 32];
#if defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3)
/* protocols we know about, in order of preference */
static char *protocols[] = { "tcp", "udp", NULL };
static char *protocols[] = { "udp", "tcp", NULL };
#endif /* defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) */
/* forward definitions */
@ -756,6 +756,14 @@ find_nfs_srvr(mntfs *mf)
if (!nfs_proto)
nfs_proto = "udp";
if (ip) {
/*
* XXX RPC or SunOS 4.1.4 bug ? the last call to nfs_get_version() must
* be done with the used version and proto
*/
(void)get_nfs_version(host, ip, nfs_version, nfs_proto);
}
plog(XLOG_INFO, "Using NFS version %d, protocol %s on host %s",
(int) nfs_version, nfs_proto, host);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsinfo.c,v 1.1.1.1 2000/06/07 00:52:23 dogcow Exp $ */
/* $NetBSD: fsinfo.c,v 1.2 2000/06/16 02:10:13 dogcow Exp $ */
/*
* Copyright (c) 1997-2000 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
@ -197,7 +197,7 @@ Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\
static char *
find_username(void)
{
char *u = getlogin();
const char *u = getlogin();
if (!u) {
struct passwd *pw = getpwuid(getuid());
@ -234,7 +234,7 @@ main(int argc, char *argv[])
perror("gethostname");
exit(1);
}
hostname[sizeof(hostname) - 1] = '\0';
/*
* Get the username
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: amq_defs.h,v 1.1.1.1 2000/06/07 00:52:21 dogcow Exp $ */
/* $NetBSD: amq_defs.h,v 1.2 2000/06/16 02:10:13 dogcow Exp $ */
/*
* Copyright (c) 1997-2000 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
@ -52,7 +52,7 @@
#ifndef AMQ_SIZE
# define AMQ_SIZE 16384
#endif /* not AMQ_SIZE */
#define AMQ_STRLEN 2048
#define AMQ_STRLEN 10240
#define AMQ_PROGRAM ((u_long)300019)
#define AMQ_VERSION ((u_long)1)
#define AMQPROC_NULL ((u_long)0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: wire.c,v 1.1.1.1 2000/06/07 00:52:22 dogcow Exp $ */
/* $NetBSD: wire.c,v 1.2 2000/06/16 02:10:13 dogcow Exp $ */
/*
* Copyright (c) 1997-2000 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
@ -377,7 +377,7 @@ void
getwire(char **name1, char **number1)
{
struct ifconf ifc;
struct ifreq *ifr;
struct ifreq *ifr, ifrpool;
caddr_t cp, cplim;
int fd = -1;
u_long address;
@ -432,7 +432,8 @@ getwire(char **name1, char **number1)
* Scan the list looking for a suitable interface
*/
for (cp = buf; cp < cplim; /* increment in the loop body */) {
ifr = (struct ifreq *) cp;
memcpy(&ifrpool, cp, sizeof(ifrpool));
ifr = &ifrpool;
cp += SIZE(ifr);
if (ifr->ifr_addr.sa_family != AF_INET)