Subject: bin/36506: /etc/rc.d/amd prohibits reboot if amd owns /home
To: None <,>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 06/17/2007 19:00:01
>Number:         36506
>Category:       bin
>Synopsis:       /etc/rc.d/amd prohibits reboot if amd owns /home
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 17 19:00:01 +0000 2007
>Originator:     Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>Release:        NetBSD 4.0_BETA2
Falling Raindrops
System: NetBSD 4.0_BETA2 NetBSD 4.0_BETA2 (PIZZA) #0: Fri Jun 8 16:55:31 CEST 2007 hf@Hochstuhl:/var/obj/netbsd-builds/4/sparc/sys/arch/sparc/compile/PIZZA sparc
Architecture: sparc
Machine: sparc

The am-utils start script /etc/rc.d/amd was recently changed to
gracefully shut down amd during a reboot. What sounds like a good idea
ends up blocking a reboot if

(1) amd manages nfs mounts under /home, and 

(2) a shutdown -r is issued by a non-root member of group operator
with a home directory managed by amd..

In that case, amd tries infinitely to unmount the home directory of
the user who has just issued the shutdown command, and obviously
never succeeds.


Set up amd(8) to manage nfs mounted home directories under /home.

Issue a "shutdown -r now" as a non-root user and member of group
"operator" who has her home under /home.  

Find that the attempt to shut down amd loops infinitely, and "now"
never comes.


Implement a timeout for the unmount attempt (10..15 sec should be
acceptable), make gracefully shutting down amd an option (default
off), or just back out the change. Note that this change has trickled
down to one or more release branches.