Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/am-utils pull up christos's amd patches that didn't mak...
details: https://anonhg.NetBSD.org/src/rev/6c4a2085bf7a
branches: trunk
changeset: 487970:6c4a2085bf7a
user: dogcow <dogcow%NetBSD.org@localhost>
date: Fri Jun 16 02:10:12 2000 +0000
description:
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)
diffstat:
dist/am-utils/amd/amq_subr.c | 25 +++++++++++++++++++++++--
dist/am-utils/amd/srvr_nfs.c | 12 ++++++++++--
dist/am-utils/fsinfo/fsinfo.c | 6 +++---
dist/am-utils/include/amq_defs.h | 4 ++--
dist/am-utils/libamu/wire.c | 7 ++++---
5 files changed, 42 insertions(+), 12 deletions(-)
diffs (145 lines):
diff -r 8df2cb795081 -r 6c4a2085bf7a dist/am-utils/amd/amq_subr.c
--- a/dist/am-utils/amd/amq_subr.c Fri Jun 16 02:08:40 2000 +0000
+++ b/dist/am-utils/amd/amq_subr.c Fri Jun 16 02:10:12 2000 +0000
@@ -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 @@
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 *
diff -r 8df2cb795081 -r 6c4a2085bf7a dist/am-utils/amd/srvr_nfs.c
--- a/dist/am-utils/amd/srvr_nfs.c Fri Jun 16 02:08:40 2000 +0000
+++ b/dist/am-utils/amd/srvr_nfs.c Fri Jun 16 02:10:12 2000 +0000
@@ -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 @@
#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 @@
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);
diff -r 8df2cb795081 -r 6c4a2085bf7a dist/am-utils/fsinfo/fsinfo.c
--- a/dist/am-utils/fsinfo/fsinfo.c Fri Jun 16 02:08:40 2000 +0000
+++ b/dist/am-utils/fsinfo/fsinfo.c Fri Jun 16 02:10:12 2000 +0000
@@ -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 @@
static char *
find_username(void)
{
- char *u = getlogin();
+ const char *u = getlogin();
if (!u) {
struct passwd *pw = getpwuid(getuid());
@@ -234,7 +234,7 @@
perror("gethostname");
exit(1);
}
-
+ hostname[sizeof(hostname) - 1] = '\0';
/*
* Get the username
*/
diff -r 8df2cb795081 -r 6c4a2085bf7a dist/am-utils/include/amq_defs.h
--- a/dist/am-utils/include/amq_defs.h Fri Jun 16 02:08:40 2000 +0000
+++ b/dist/am-utils/include/amq_defs.h Fri Jun 16 02:10:12 2000 +0000
@@ -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)
diff -r 8df2cb795081 -r 6c4a2085bf7a dist/am-utils/libamu/wire.c
--- a/dist/am-utils/libamu/wire.c Fri Jun 16 02:08:40 2000 +0000
+++ b/dist/am-utils/libamu/wire.c Fri Jun 16 02:10:12 2000 +0000
@@ -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 @@
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 @@
* 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)
Home |
Main Index |
Thread Index |
Old Index