Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/amd Import the latest to deal with security problem...



details:   https://anonhg.NetBSD.org/src/rev/07b67e389e55
branches:  trunk
changeset: 476051:07b67e389e55
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 04 22:24:52 1999 +0000

description:
Import the latest to deal with security problems related to amq RPC.

diffstat:

 usr.sbin/amd/AUTHORS             |    37 +-
 usr.sbin/amd/amd/amfs_auto.c     |    42 +-
 usr.sbin/amd/amd/amfs_program.c  |     6 +-
 usr.sbin/amd/amd/amfs_toplvl.c   |     8 +-
 usr.sbin/amd/amd/info_hesiod.c   |     5 +-
 usr.sbin/amd/doc/am-utils.info-7 |   684 ++
 usr.sbin/amd/doc/am-utils.ps     |  9684 ++++++++++++++++++++++++++++++++++++++
 usr.sbin/amd/doc/am-utils.texi   |   164 +-
 usr.sbin/amd/doc/hlfsd.ps        |     2 +-
 usr.sbin/amd/doc/version.texi    |     8 +-
 usr.sbin/amd/include/am_compat.h |    12 +-
 usr.sbin/amd/libamu/mkconf       |    31 +-
 usr.sbin/amd/libamu/mount_fs.c   |    32 +-
 usr.sbin/amd/libamu/tranputil.c  |    25 +-
 usr.sbin/amd/libamu/wire.c       |   501 +-
 usr.sbin/amd/pawd/pawd.c         |    14 +-
 16 files changed, 10947 insertions(+), 308 deletions(-)

diffs (truncated from 11824 to 300 lines):

diff -r c4b01391f533 -r 07b67e389e55 usr.sbin/amd/AUTHORS
--- a/usr.sbin/amd/AUTHORS      Sat Sep 04 22:12:15 1999 +0000
+++ b/usr.sbin/amd/AUTHORS      Sat Sep 04 22:24:52 1999 +0000
@@ -1,4 +1,4 @@
-$NetBSD: AUTHORS,v 1.1.1.6 1999/02/01 18:45:37 christos Exp $
+$NetBSD: AUTHORS,v 1.1.1.7 1999/09/04 22:24:52 christos Exp $
 # -*- text -*-
 PRIMARY AUTHORS AND MAJOR CONTRIBUTORS TO AM_UTILS:
 
@@ -33,6 +33,8 @@
 
 August 8, 1998: add detection support for NFS V.3 for NetBSD 1.3F.
 
+February 1, 1998: fixes for NetBSD to better detect its features.
+
 * Hannes Reinecke <hare%MathI.UNI-Heidelberg.DE@localhost>
 
 Back in 1995, contributed code for linux.  A new parser for file system
@@ -119,6 +121,9 @@
 Remove obsolete or unnecessary files/macros.  Don't report disabled file
 systems.  More misc fixes.
 
+February 3, 1998: don't start autofs listener unless autofs maps were in
+use.
+
 * Jason Thorpe <thorpej%nas.nasa.gov@localhost>
 
 August 25, 1997: make amd work when talking to NIS+ servers in NIS
@@ -224,3 +229,33 @@
 * Douglas K. Rand" <rand%aero.und.edu@localhost>
 
 December 3, 1998: case insensitive host name match for nfsl.
+
+* David Wolfskill <dhw%whistle.com@localhost>
+January 28, 1999: don't turn on/off noconn option if it was already in that
+state.
+
+* Jeffrey C Honig <jch%BSDI.COM@localhost>
+March 14, 1999: clean up more autogenerated files upon "make distclean".
+
+March 15, 1999: avoid overly verbose NIS warning even on systems that don't
+run NIS.  On BSD systems, wire.c uses getifaddrs(), sysctl(), IRS routines,
+and more fixes.  Numerous IP packet security fixes.
+
+March 16, 1999: documentation typos. new cdfs options. ufs structure
+detection for bsdi4.
+
+* Paul Balyoz <pbalyoz%sedona.ch.intel.com@localhost>
+March 26, 1999: ensure lostaltmail displays Y2K compliant dates.
+
+* Jon Peatfield <J.S.Peatfield%damtp.cam.ac.uk@localhost>
+March 30, 1999: turn off incomplete NFS V.3 support in HPUX 10.20.
+
+* Peter Breitenlohner <peb%mppmu.mpg.de@localhost>
+July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and
+nis_isup mis-logic fixes.
+
+* Dale Talcott <aeh%quest.cc.purdue.edu@localhost>
+July 26, 1999: added NFS3 support for AIX mounting.
+
+* Christophe Kalt <Christophe-Kalt%deshaw.com@localhost>
+July 14, 1999: add netgrpd() syntax function which uses FQHN.
diff -r c4b01391f533 -r 07b67e389e55 usr.sbin/amd/amd/amfs_auto.c
--- a/usr.sbin/amd/amd/amfs_auto.c      Sat Sep 04 22:12:15 1999 +0000
+++ b/usr.sbin/amd/amd/amfs_auto.c      Sat Sep 04 22:24:52 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amfs_auto.c,v 1.1.1.2 1999/02/01 18:45:57 christos Exp $       */
+/*     $NetBSD: amfs_auto.c,v 1.1.1.3 1999/09/04 22:25:05 christos Exp $       */
 
 /*
  * Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * Id: amfs_auto.c,v 1.3 1999/01/13 23:30:57 ezk Exp 
+ * Id: amfs_auto.c,v 1.4 1999/08/09 06:09:43 ezk Exp 
  *
  */
 
@@ -62,12 +62,13 @@
 /* DEVELOPERS: turn this on for special debugging of readdir code */
 #undef DEBUG_READDIR
 
+#define DOT_DOT_COOKIE (u_int) 1
+
 /****************************************************************************
  *** STRUCTURES                                                           ***
  ****************************************************************************/
 
 
-
 /****************************************************************************
  *** FORWARD DEFINITIONS                                                  ***
  ****************************************************************************/
@@ -1323,7 +1324,7 @@
      * fairly unbelievable) then tough.
      */
 #ifdef DEBUG
-    dlog("default search");
+    dlog("amfs_auto_readdir: default search");
 #endif /* DEBUG */
     /*
      * Check for enough room.  This is extremely approximate but is more
@@ -1352,8 +1353,7 @@
       ep[1].ne_fileid = mp->am_gen;
     ep[1].ne_name = "..";
     ep[1].ne_nextentry = 0;
-    *(u_int *) ep[1].ne_cookie =
-      xp ? xp->am_gen : ~(u_int) 0;
+    *(u_int *) ep[1].ne_cookie = (xp ? xp->am_gen : DOT_DOT_COOKIE);
 
     if (!xp)
       dp->dl_eof = TRUE;       /* by default assume readdir done */
@@ -1361,12 +1361,12 @@
     return 0;
   }
 #ifdef DEBUG
-  dlog("real child");
+  dlog("amfs_auto_readdir: real child");
 #endif /* DEBUG */
 
-  if (gen == ~(u_int) 0) {
+  if (gen == DOT_DOT_COOKIE) {
 #ifdef DEBUG
-    dlog("End of readdir in %s", mp->am_path);
+    dlog("amfs_auto_readdir: End of readdir in %s", mp->am_path);
 #endif /* DEBUG */
     dp->dl_eof = TRUE;
     dp->dl_entries = 0;
@@ -1381,6 +1381,7 @@
   if (xp) {
     int nbytes = count / 2;    /* conservative */
     int todo = MAX_READDIR_ENTRIES;
+
     dp->dl_entries = ep;
     do {
       am_node *xp_next = next_nonerror_node(xp->am_osib);
@@ -1388,7 +1389,7 @@
       if (xp_next) {
        *(u_int *) ep->ne_cookie = xp_next->am_gen;
       } else {
-       *(u_int *) ep->ne_cookie = ~(u_int) 0;
+       *(u_int *) ep->ne_cookie = DOT_DOT_COOKIE;
        dp->dl_eof = TRUE;
       }
 
@@ -1446,7 +1447,7 @@
      * fairly unbelievable) then tough.
      */
 #ifdef DEBUG
-    dlog("default search");
+    dlog("amfs_auto_readdir_browsable: default search");
 #endif /* DEBUG */
     /*
      * Check for enough room.  This is extremely approximate but is more
@@ -1486,7 +1487,7 @@
       ep[1].ne_fileid = mp->am_gen;
     ep[1].ne_name = "..";
     ep[1].ne_nextentry = 0;
-    *(u_int *) ep[1].ne_cookie = ~(u_int) 0;
+    *(u_int *) ep[1].ne_cookie = DOT_DOT_COOKIE;
 
     /*
      * If map is browsable, call a function make_entry_chain() to construct
@@ -1498,8 +1499,7 @@
     if (!te)
       return 0;
 #ifdef DEBUG_READDIR
-    j = 0;
-    for (ne=te; ne; ne=ne->ne_nextentry)
+    for (j=0,ne=te; ne; ne=ne->ne_nextentry)
       plog(XLOG_INFO, "gen1 key %4d \"%s\"", j++, ne->ne_name);
 #endif /* DEBUG_READDIR */
 
@@ -1520,19 +1520,23 @@
     }
     ep[1].ne_nextentry = te;   /* append this chunk of "te" chain */
 #ifdef DEBUG_READDIR
-    for (ne=te; ne; ne=ne->ne_nextentry)
+    for (j=0,ne=te; ne; ne=ne->ne_nextentry)
       plog(XLOG_INFO, "gen2 key %4d \"%s\"", j++, ne->ne_name);
+    for (j=0,ne=ep; ne; ne=ne->ne_nextentry)
+      plog(XLOG_INFO, "gen2+ key %4d \"%s\" fi=%d ck=%d",
+          j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie);
+    plog(XLOG_INFO, "EOF is %d", dp->dl_eof);
 #endif /* DEBUG_READDIR */
     return 0;
   } /* end of "if (gen == 0)" statement */
 
 #ifdef DEBUG
-  dlog("real child");
+  dlog("amfs_auto_readdir_browsable: real child");
 #endif /* DEBUG */
 
-  if (gen == ~(u_int) 0) {
+  if (gen == DOT_DOT_COOKIE) {
 #ifdef DEBUG
-    dlog("End of readdir in %s", mp->am_path);
+    dlog("amfs_auto_readdir_browsable: End of readdir in %s", mp->am_path);
 #endif /* DEBUG */
     dp->dl_eof = TRUE;
     dp->dl_entries = 0;
@@ -1574,7 +1578,7 @@
   dp->dl_entries = ep;
 #ifdef DEBUG_READDIR
   plog(XLOG_INFO, "dl_entries=0x%x, te_next=0x%x, dl_eof=%d",
-       dp->dl_entries, te_next, dp->dl_eof);
+       (int) dp->dl_entries, (int) te_next, dp->dl_eof);
   for (ne=te; ne; ne=ne->ne_nextentry)
     plog(XLOG_INFO, "gen3 key %4d \"%s\"", j++, ne->ne_name);
 #endif /* DEBUG_READDIR */
diff -r c4b01391f533 -r 07b67e389e55 usr.sbin/amd/amd/amfs_program.c
--- a/usr.sbin/amd/amd/amfs_program.c   Sat Sep 04 22:12:15 1999 +0000
+++ b/usr.sbin/amd/amd/amfs_program.c   Sat Sep 04 22:24:52 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amfs_program.c,v 1.1.1.2 1999/02/01 18:46:03 christos Exp $    */
+/*     $NetBSD: amfs_program.c,v 1.1.1.3 1999/09/04 22:25:07 christos Exp $    */
 
 /*
  * Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * Id: amfs_program.c,v 1.3 1999/01/13 23:30:58 ezk Exp 
+ * Id: amfs_program.c,v 1.4 1999/06/24 06:15:55 ezk Exp 
  *
  */
 
@@ -133,6 +133,8 @@
    * Put stdout to stderr
    */
   (void) fclose(stdout);
+  if (!logfp)
+    logfp = stderr;            /* initialize before possible first use */
   (void) dup(fileno(logfp));
   if (fileno(logfp) != fileno(stderr)) {
     (void) fclose(stderr);
diff -r c4b01391f533 -r 07b67e389e55 usr.sbin/amd/amd/amfs_toplvl.c
--- a/usr.sbin/amd/amd/amfs_toplvl.c    Sat Sep 04 22:12:15 1999 +0000
+++ b/usr.sbin/amd/amd/amfs_toplvl.c    Sat Sep 04 22:24:52 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amfs_toplvl.c,v 1.1.1.2 1999/02/01 18:46:04 christos Exp $     */
+/*     $NetBSD: amfs_toplvl.c,v 1.1.1.3 1999/09/04 22:25:08 christos Exp $     */
 
 /*
  * Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * Id: amfs_toplvl.c,v 1.3 1999/01/10 21:53:43 ezk Exp 
+ * Id: amfs_toplvl.c,v 1.5 1999/02/04 07:24:14 ezk Exp 
  *
  */
 
@@ -229,8 +229,10 @@
 
   /* This is it!  Here we try to mount amd on its mount points */
 #ifdef DEBUG
-  amuDebug(D_TRACE)
+  amuDebug(D_TRACE) {
     print_nfs_args(&nfs_args, 0);
+    plog(XLOG_DEBUG, "Generic mount flags 0x%x", genflags);
+  }
 #endif /* DEBUG */
   error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type,
                   0, NULL, mnttab_file_name);
diff -r c4b01391f533 -r 07b67e389e55 usr.sbin/amd/amd/info_hesiod.c
--- a/usr.sbin/amd/amd/info_hesiod.c    Sat Sep 04 22:12:15 1999 +0000
+++ b/usr.sbin/amd/amd/info_hesiod.c    Sat Sep 04 22:24:52 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: info_hesiod.c,v 1.1.1.1 1999/02/01 18:46:09 christos Exp $     */
+/*     $NetBSD: info_hesiod.c,v 1.1.1.2 1999/09/04 22:25:13 christos Exp $     */
 
 /*
  * Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * Id: info_hesiod.c,v 1.4 1999/01/13 23:30:58 ezk Exp 
+ * Id: info_hesiod.c,v 1.5 1999/02/04 07:24:15 ezk Exp 
  *
  */
 
@@ -64,6 +64,7 @@
 static voidp hesiod_context;
 #endif /* HAVE_HESIOD_INIT */
 
+/* forward declarations */
 int amu_hesiod_init(mnt_map *m, char *map, time_t *tp);
 int hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp);
 int hesiod_isup(mnt_map *m, char *map);
diff -r c4b01391f533 -r 07b67e389e55 usr.sbin/amd/doc/am-utils.info-7
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/amd/doc/am-utils.info-7  Sat Sep 04 22:24:52 1999 +0000
@@ -0,0 +1,684 @@
+$NetBSD: am-utils.info-7,v 1.1.1.1 1999/09/04 22:25:45 christos Exp $



Home | Main Index | Thread Index | Old Index