Date: Mon, 24 Apr 2006 08:10:21 GMT From: Alex Kozlov <spam@rm-rf.kiev.ua> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/96248: vipw fail on RO /etc Message-ID: <200604240810.k3O8ALIl021005@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/96248; it has been noted by GNATS.
From: Alex Kozlov <spam@rm-rf.kiev.ua>
To: Maxim Konovalov <maxim@macomnet.ru>
Cc: bug-followup@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604240810.k3O8ALIl021005>
