nfs is left to an inconsistent state when /etc/default/nfs-* parameters have options without quotes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
New
|
Low
|
Unassigned |
Bug Description
When a space+option is left without quotes in NEED_IDMAPD it leaves nfs to an inconsistent state upon start.
Steps to reproduce
1. in /etc/default/
NEED_IDMAPD= yes
2. stop idmapd, start idmapd
This is probably caused by /etc/init/idmapd that runs the following code.
env DEFAULTFILE=
if [ -f "$DEFAULTFILE" ]; then
. "$DEFAULTFILE"
fi
In this case NEED_IDMAPD is empty which causes issues when starting the service.
PS: in my tests since /etc/init/
I know having spaces in variable assignment must not happen without quotes though we should find a way of enforcing or sanitize variables.
Leonardo
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nfs-common 1:1.2.2-4ubuntu5.1
Uname: Linux 2.6.39-
Architecture: i386
Date: Fri Oct 28 15:33:08 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110426)
ProcEnviron:
LANGUAGE=en_CA:en
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: nfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)
> I know having spaces in variable assignment must not happen without
> quotes though we should find a way of enforcing or sanitize variables.
I don't agree. We should instead make it unnecessary to ever edit this file.
(BTW, NEED_IDMAPD= is no longer supported as of the latest nfs-utils upload to precise; idmapd is always started.)