From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 17 16:20:06 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3687A16A41F for ; Sat, 17 Sep 2005 16:20:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8301243D4C for ; Sat, 17 Sep 2005 16:20:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8HGK5mf089027 for ; Sat, 17 Sep 2005 16:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8HGK51b089026; Sat, 17 Sep 2005 16:20:05 GMT (envelope-from gnats) Resent-Date: Sat, 17 Sep 2005 16:20:05 GMT Resent-Message-Id: <200509171620.j8HGK51b089026@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, thierry herbelot Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F09B716A41F for ; Sat, 17 Sep 2005 16:10:52 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id A437043D46 for ; Sat, 17 Sep 2005 16:10:52 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j8HGAqco050693 for ; Sat, 17 Sep 2005 16:10:52 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j8HGAq8T050692; Sat, 17 Sep 2005 16:10:52 GMT (envelope-from nobody) Message-Id: <200509171610.j8HGAq8T050692@www.freebsd.org> Date: Sat, 17 Sep 2005 16:10:52 GMT From: thierry herbelot To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: conf/86260: the weak_mountd_authentication flag from /etc/rc.conf is not taken into account X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2005 16:20:06 -0000 >Number: 86260 >Category: conf >Synopsis: the weak_mountd_authentication flag from /etc/rc.conf is not taken into account >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: Sat Sep 17 16:20:05 GMT 2005 >Closed-Date: >Last-Modified: >Originator: thierry herbelot >Release: FreeBSD 6.0-BETA4 >Organization: >Environment: FreeBSD XXX 6.0-BETA4 FreeBSD 6.0-BETA4 #3: Wed Sep 14 16:50:32 CEST 2005 YYYY@XXX:/usr/obj/usr/src/sys/GENERIC i386 >Description: I am trying to mount as a user an NFS partition exported from a 6.0-BETA4 server. the client is also running 6.0-BETA4 (GENERIC). I have set "sysctl vfs.usermount=1" on the client, but I get : % mount server:/share ~/mnt [udp] server:/share: RPCPROG_MNT: RPC: Authentication error; why = Client credential too weak on the server, /etc/rc.conf contains : nfs_reserved_port_only="NO" weak_mountd_authentication="YES" rpcbind_enable="YES" nfs_server_enable="YES" mountd_enable="YES" rpcbind_enable="YES" with these flags, mountd should be started with "-n -r", but a debug trace of "sh -x /etc/rc.d/mountd start" gives : .. + checkyesno weak_mountd_authentication + eval _value=$weak_mountd_authentication + _value=YES + debug checkyesno: weak_mountd_authentication is set to YES. + return 0 + mountd_flags=-r -n + rm -f /var/db/mountdtab + umask 022 + + return 0 + _return=0 + [ 0 -ne 0 ] + echo Starting mountd. Starting mountd. + [ -n ] + _doit=/usr/sbin/mountd -r + [ -n ] + debug run_rc_command: _doit: /usr/sbin/mountd -r + eval /usr/sbin/mountd -r + /usr/sbin/mountd -r + _return=0 + [ 0 -ne 0 ] + [ -n ] + return 0 If I understanding the startup process : in the /etc/rc.d/mountd script, mountd_precmd() correctly configures the "-n" and "-r" flags, but the subsequent call to load_rc_config() resets the flags to the default value set in /etc/defauls/rc.conf (or /etc/rc.conf) A workaround is obviously to set mountd_flags="-r -n" in /etc/rc.conf >How-To-Repeat: (as in the full description) >Fix: (perhaps set the flags after the call to load_rc_config() - but it voids the in the interest of using mountd_precmd() - I have checked with the /etc/rc.d/mountd script in NetBSD, but this is simpler : it does not use rc.conf variables to set the mountd flags) >Release-Note: >Audit-Trail: >Unformatted: