Date: Mon, 24 Apr 2006 08:30:22 GMT From: Maxim Konovalov <maxim@macomnet.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/96248: vipw fail on RO /etc Message-ID: <200604240830.k3O8UMfI021866@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: Maxim Konovalov <maxim@macomnet.ru> To: Alex Kozlov <spam@rm-rf.kiev.ua> Cc: bug-followup@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604240830.k3O8UMfI021866>