Subject: Small mountd patch
To: None <tech-userlevel@netbsd.org>
From: Allen Briggs <briggs@netbsd.org>
List: tech-userlevel
Date: 03/14/2005 15:48:21
--ieNMXl1Fr3cevapt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

When I was trying to track down a problem with mountd not working as
I expected, I lost a bit of time because it was dumping information to
syslog that it wasn't dumping to the screen when started with '-d'.

Does anyone see a problem with the attached patch to simply add
LOG_PERROR when '-d' is specified on the command line?

[  My problem was specifying -netmask instead of -mask on the exports
   line.  Does anyone have an opinion about accepting that as a synonym
   for -mask or -m (we currently accept either -mask or -m)?  ]

-allen

-- 
                  Use NetBSD!  http://www.netbsd.org/

--ieNMXl1Fr3cevapt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mountd.diff"

Index: mountd.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/mountd/mountd.c,v
retrieving revision 1.92
diff -u -r1.92 mountd.c
--- mountd.c	17 Jan 2005 15:20:35 -0000	1.92
+++ mountd.c	14 Mar 2005 20:33:51 -0000
@@ -337,7 +337,7 @@
 		exname = *argv;
 	else
 		exname = _PATH_EXPORTS;
-	openlog("mountd", LOG_PID, LOG_DAEMON);
+	openlog("mountd", LOG_PID | (debug ? LOG_PERROR : 0), LOG_DAEMON);
 
 	s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
 	if (s < 0)

--ieNMXl1Fr3cevapt--