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.12 from trunk (requested...



details:   https://anonhg.NetBSD.org/src/rev/94444557d396
branches:  netbsd-1-4
changeset: 469431:94444557d396
user:      cgd <cgd%NetBSD.org@localhost>
date:      Tue Sep 21 04:55:25 1999 +0000

description:
pull up rev 1.12 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/map.c  |   6 +++---
 usr.sbin/amd/amd/mapc.c |  11 +++++------
 2 files changed, 8 insertions(+), 9 deletions(-)

diffs (67 lines):

diff -r 8d164c66b077 -r 94444557d396 usr.sbin/amd/amd/map.c
--- a/usr.sbin/amd/amd/map.c    Tue Sep 21 04:55:20 1999 +0000
+++ b/usr.sbin/amd/amd/map.c    Tue Sep 21 04:55:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: map.c,v 1.11 1999/02/01 19:05:10 christos Exp $        */
+/*     $NetBSD: map.c,v 1.11.2.1 1999/09/21 04:55:25 cgd Exp $ */
 
 /*
  * Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * Id: map.c,v 1.4 1999/01/13 23:30:59 ezk Exp 
+ * Id: map.c,v 1.5 1999/08/22 05:12:51 ezk Exp 
  *
  */
 
@@ -915,7 +915,7 @@
 #endif /* DEBUG */
     amd_stats.d_uerr++;
   } else if (rc) {
-    if (rc == EBUSY) {
+    if (mf->mf_ops == &amfs_program_ops || rc == EBUSY) {
       plog(XLOG_STATS, "\"%s\" on %s still active", mp->am_path, mf->mf_mount);
     } else {
       errno = rc;              /* XXX */
diff -r 8d164c66b077 -r 94444557d396 usr.sbin/amd/amd/mapc.c
--- a/usr.sbin/amd/amd/mapc.c   Tue Sep 21 04:55:20 1999 +0000
+++ b/usr.sbin/amd/amd/mapc.c   Tue Sep 21 04:55:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mapc.c,v 1.11 1999/02/01 19:05:10 christos Exp $       */
+/*     $NetBSD: mapc.c,v 1.11.2.1 1999/09/21 04:55:29 cgd Exp $        */
 
 /*
  * Copyright (c) 1997-1999 Erez Zadok
@@ -40,7 +40,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * Id: mapc.c,v 1.3 1999/01/13 23:30:59 ezk Exp 
+ * Id: mapc.c,v 1.4 1999/08/09 06:09:44 ezk Exp 
  *
  */
 
@@ -1054,7 +1054,7 @@
 nfsentry *
 make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable)
 {
-  static u_int last_cookie = ~(u_int) 0 - 1;
+  static u_int last_cookie = (u_int) 2;        /* monotonically increasing */
   static nfsentry chain[MAX_CHAIN];
   static int max_entries = MAX_CHAIN;
   char *key;
@@ -1126,10 +1126,9 @@
       }
 
       /* we have space.  put entry in next cell */
-      --last_cookie;
+      ++last_cookie;
       chain[num_entries].ne_fileid = (u_int) last_cookie;
-      *(u_int *) chain[num_entries].ne_cookie =
-       (u_int) last_cookie;
+      *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie;
       chain[num_entries].ne_name = key;
       if (num_entries < max_entries - 1) {     /* link to next one */
        chain[num_entries].ne_nextentry = &chain[num_entries + 1];



Home | Main Index | Thread Index | Old Index