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/amd pull up rev 1.9 from trunk (requested ...
details: https://anonhg.NetBSD.org/src/rev/8f8219bb663b
branches: netbsd-1-4
changeset: 469435:8f8219bb663b
user: cgd <cgd%NetBSD.org@localhost>
date: Tue Sep 21 04:55:55 1999 +0000
description:
pull up rev 1.9 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/amd/opts.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diffs (73 lines):
diff -r 7eb1d15f391f -r 8f8219bb663b usr.sbin/amd/amd/opts.c
--- a/usr.sbin/amd/amd/opts.c Tue Sep 21 04:55:45 1999 +0000
+++ b/usr.sbin/amd/amd/opts.c Tue Sep 21 04:55:55 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opts.c,v 1.8 1999/02/01 19:05:11 christos Exp $ */
+/* $NetBSD: opts.c,v 1.8.2.1 1999/09/21 04:55:55 cgd Exp $ */
/*
* Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
*
* %W% (Berkeley) %G%
*
- * Id: opts.c,v 1.3 1999/01/10 21:53:52 ezk Exp
+ * Id: opts.c,v 1.5 1999/08/16 01:16:23 ezk Exp
*
*/
@@ -97,6 +97,7 @@
*/
static int f_in_network(char *);
static int f_netgrp(char *);
+static int f_netgrpd(char *);
static int f_exists(char *);
static int f_false(char *);
static int f_true(char *);
@@ -220,6 +221,7 @@
static struct functable functable[] = {
{ "in_network", f_in_network },
{ "netgrp", f_netgrp },
+ { "netgrpd", f_netgrpd },
{ "exists", f_exists },
{ "false", f_false },
{ "true", f_true },
@@ -496,7 +498,7 @@
continue;
} else if (NSTREQ(f, "!", 1) && (func = functable_lookup(&f[1]))) {
/* then this is a negated prefixed function such as "!exists" */
- plog(XLOG_USER, "executing negated function %s", &f[1]);
+ plog(XLOG_INFO, "executing negated function %s", &f[1]);
if ((*func) (arg)) {
return (0);
}
@@ -732,7 +734,7 @@
}
-/* test if this host is in netgroup (arg) */
+/* test if this host (short hostname form) is in netgroup (arg) */
static int
f_netgrp(char *arg)
{
@@ -746,6 +748,20 @@
}
+/* test if this host (fully-qualified name) is in netgroup (arg) */
+static int
+f_netgrpd(char *arg)
+{
+ int status;
+
+ status = innetgr(arg, opt_hostd, NULL, NULL);
+#ifdef DEBUG
+ plog(XLOG_USER, "netgrp = %s status = %d hostd = %s", arg, status, opt_hostd);
+#endif /* DEBUG */
+ return status;
+}
+
+
/* test if file (arg) exists via lstat */
static int
f_exists(char *arg)
Home |
Main Index |
Thread Index |
Old Index