Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/amd/amq pull up rev 1.13 from trunk (requested...
details: https://anonhg.NetBSD.org/src/rev/49f1a4e761a9
branches: netbsd-1-4
changeset: 469436:49f1a4e761a9
user: cgd <cgd%NetBSD.org@localhost>
date: Tue Sep 21 04:56:00 1999 +0000
description:
pull up rev 1.13 from trunk (requested by christos):
Upgrade amd(8) and related software to fix expoitable stack overflows
in amq(8), as reported in BUGTRAQ and elsewhere.
diffstat:
usr.sbin/amd/amq/amq.c | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diffs (105 lines):
diff -r 8f8219bb663b -r 49f1a4e761a9 usr.sbin/amd/amq/amq.c
--- a/usr.sbin/amd/amq/amq.c Tue Sep 21 04:55:55 1999 +0000
+++ b/usr.sbin/amd/amq/amq.c Tue Sep 21 04:56:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amq.c,v 1.12 1999/02/01 19:05:11 christos Exp $ */
+/* $NetBSD: amq.c,v 1.12.2.1 1999/09/21 04:56:00 cgd Exp $ */
/*
* Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
*
* %W% (Berkeley) %G%
*
- * Id: amq.c,v 1.3 1999/01/10 21:53:58 ezk Exp
+ * Id: amq.c,v 1.5 1999/08/24 21:31:07 ezk Exp
*
*/
@@ -57,10 +57,10 @@
@(#)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/10 21:53:58 ezk Exp ";
+static char rcsid[] = "Id: amq.c,v 1.5 1999/08/24 21:31:07 ezk Exp ";
static char sccsid[] = "%W% (Berkeley) %G%";
#else
-__RCSID("$NetBSD: amq.c,v 1.12 1999/02/01 19:05:11 christos Exp $");
+__RCSID("$NetBSD: amq.c,v 1.12.2.1 1999/09/21 04:56:00 cgd Exp $");
#endif
#endif /* not lint */
@@ -71,9 +71,6 @@
#include <amq.h>
/* locals */
-#if 0
-char *progname;
-#endif
static int flush_flag;
static int minfo_flag;
static int getpid_flag;
@@ -101,15 +98,6 @@
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
@@ -346,7 +334,11 @@
/*
* Parse arguments
*/
+#ifdef ENABLE_AMQ_MOUNT
while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != -1)
+#else /* not ENABLE_AMQ_MOUNT */
+ while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:pP:TU")) != -1)
+#endif /* not ENABLE_AMQ_MOUNT */
switch (opt_ch) {
case 'f':
flush_flag = 1;
@@ -397,10 +389,12 @@
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);
@@ -427,11 +421,20 @@
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;
Home |
Main Index |
Thread Index |
Old Index