bin/96248: vipw fail on RO /etc
Maxim Konovalov
maxim at macomnet.ru
Mon Apr 24 08:30:22 UTC 2006
The following reply was made to PR bin/96248; it has been noted by GNATS.
From: Maxim Konovalov <maxim at macomnet.ru>
To: Alex Kozlov <spam at rm-rf.kiev.ua>
Cc: bug-followup at freebsd.org
Subject: Re: bin/96248: vipw fail on RO /etc
Date: Mon, 24 Apr 2006 12:24:29 +0400 (MSD)
On Mon, 24 Apr 2006, 11:07+0300, Alex Kozlov wrote:
> 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 ?
Perhaps they are, I don't know. I don't think changing passwd temp
files location is a good idea. What is the problem you are trying to
solve?
--
Maxim Konovalov
More information about the freebsd-bugs
mailing list