From owner-freebsd-bugs Wed Aug 6 23:30:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA21965 for bugs-outgoing; Wed, 6 Aug 1997 23:30:03 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA21958; Wed, 6 Aug 1997 23:30:01 -0700 (PDT) Date: Wed, 6 Aug 1997 23:30:01 -0700 (PDT) Message-Id: <199708070630.XAA21958@hub.freebsd.org> To: freebsd-bugs Cc: From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: bin/4238: chpass only occasionally works in conjunction with ed Reply-To: j@uriah.heep.sax.de (J Wunsch) Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/4238; it has been noted by GNATS. From: j@uriah.heep.sax.de (J Wunsch) To: schweikh@noc.dfn.de Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/4238: chpass only occasionally works in conjunction with ed Date: Thu, 7 Aug 1997 08:18:36 +0200 As schweikh@noc.dfn.de wrote: > When I try to change the home directory of user 'toor' from > /root to whatever using the editor ed (see below) and chpass > then chpass only accepts the changes occasionally. UTSL. You could have easily found the reason yourself: if (begin.st_mtime == end.st_mtime) { warnx("no changes made"); pw_error(NULL, 0, 0); } That is, the editing process needs to last for at least one second right now, in order for chpass(1) to notice the modification on the file since it's only done using the file modification timestamp. Fix: include st_mtimensec into the consideration. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)