bin/96248: vipw fail on RO /etc

Alex Kozlov spam at rm-rf.kiev.ua
Mon Apr 24 08:10:25 UTC 2006


The following reply was made to PR bin/96248; it has been noted by GNATS.

From: Alex Kozlov <spam at rm-rf.kiev.ua>
To: Maxim Konovalov <maxim at macomnet.ru>
Cc: bug-followup at freebsd.org
Subject: Re: bin/96248: vipw fail on RO /etc
Date: Mon, 24 Apr 2006 11:07:54 +0300

 On Mon, Apr 24, 2006 at 11:17:08AM +0400, Maxim Konovalov wrote:
 > [...]
 > > if rootfs mount as read-only, vipw fall to execute witch vipw:
 > > pw_tmp(): Read-only file system error.
 > > >How-To-Repeat:
 > > #mount |grep -w /
 > > /dev/da0s1 on / (ufs, local, read-only)
 > >
 > > #vipw
 > > vipw: pw_tmp(): Read-only file system
 > > >Fix:
 > > Change temporary file patch in pw_tmp() from
 > >
 > > if (snprintf(tempname, sizeof(tempname), "%.*spw.XXXXXX",
 > >         (int)(p - masterpasswd), masterpasswd) >= (int)sizeof(tempname)) {
 > >
 > > to more appropriate?
 > 
 > And what is more appropriate?
 Quite good solution may be to add fallback mechanism in case if masterpasswd
 directory not writable.
 
 There are any (security?) reasons, which to prevent the storing of pw_tmp file
 in /tmp ?
 
 --
 Adios


More information about the freebsd-bugs mailing list