From george@m5p.com  Fri Jan 30 02:04:53 2009
Return-Path: <george@m5p.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75C8F106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Jan 2009 02:04:53 +0000 (UTC)
	(envelope-from george@m5p.com)
Received: from mailhost.m5p.com (unknown [IPv6:2001:418:3fd::3])
	by mx1.freebsd.org (Postfix) with ESMTP id 2159B8FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Jan 2009 02:04:52 +0000 (UTC)
	(envelope-from george@m5p.com)
Received: from m5p.com (parkstreet.m5p.com [IPv6:2001:418:3fd::1])
	by mailhost.m5p.com (8.14.3/8.14.3) with ESMTP id n0U24kqt039659
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jan 2009 21:04:51 -0500 (EST)
	(envelope-from george@m5p.com)
Received: (from george@localhost)
	by m5p.com (8.14.2/8.13.7/Submit) id n0U24jjH010554;
	Thu, 29 Jan 2009 21:04:45 -0500 (EST)
Message-Id: <200901300204.n0U24jjH010554@m5p.com>
Date: Thu, 29 Jan 2009 21:04:45 -0500 (EST)
From: George Mitchell <george@m5p.com>
Reply-To: George Mitchell <george@m5p.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: amd causes annoying "embedded slash in map name" message
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         131143
>Category:       bin
>Synopsis:       [patch] amd(8) causes annoying "embedded slash in map name" message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 30 02:10:02 UTC 2009
>Closed-Date:    
>Last-Modified:  Fri Jan 30 04:01:12 UTC 2009
>Originator:     George Mitchell
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD parkstreet.m5p.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
An out-of-the-box FreeBSD installation with amd enabled will generate two
system log messages of the form "embedded slash in map name "/etc/amd.map"
-- possible spoof attempt from nn.nn.nn.nn:773".
>How-To-Repeat:
Install FreeBSD 6.x or 7.x.  Add the line "amd_enable="YES"" to /etc/rc.conf.
>Fix:
The default flags specify a map of /etc/amd.map for /host and /net.  With
no further configuration options, amd will try to interpret /etc/amd.map
as an NIS map name before trying to interpret it as a plain file name.  To
fix the problem, patch /usr/src/contrib/amd/amd/mapc.c to move the "file"
map type entry in maptypes before the NIS+ and NIS map type entries:


--- contrib/amd/amd/mapc.c.orig	2008-01-29 22:18:49.000000000 -0500
+++ contrib/amd/amd/mapc.c	2009-01-29 20:54:07.000000000 -0500
@@ -224,6 +224,17 @@
     error_mtime,
     MAPC_ROOT
   },
+#ifdef HAVE_MAP_FILE
+  {
+    "file",
+    file_init_or_mtime,
+    file_reload,
+    NULL,			/* isup function */
+    file_search,
+    file_init_or_mtime,
+    MAPC_ALL
+  },
+#endif /* HAVE_MAP_FILE */
 #ifdef HAVE_MAP_PASSWD
   {
     "passwd",
@@ -301,17 +312,6 @@
     MAPC_INC
   },
 #endif /* HAVE_MAP_NDBM */
-#ifdef HAVE_MAP_FILE
-  {
-    "file",
-    file_init_or_mtime,
-    file_reload,
-    NULL,			/* isup function */
-    file_search,
-    file_init_or_mtime,
-    MAPC_ALL
-  },
-#endif /* HAVE_MAP_FILE */
 #ifdef HAVE_MAP_EXEC
   {
     "exec",
>Release-Note:
>Audit-Trail:
>Unformatted:
