summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/chpass/edit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c
index d4ab02416f7..43ee7ab6deb 100644
--- a/usr.bin/chpass/edit.c
+++ b/usr.bin/chpass/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.16 1999/08/06 20:41:06 deraadt Exp $ */
+/* $OpenBSD: edit.c,v 1.17 1999/11/28 13:08:17 ho Exp $ */
/* $NetBSD: edit.c,v 1.6 1996/05/15 21:50:45 jtc Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: edit.c,v 1.16 1999/08/06 20:41:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: edit.c,v 1.17 1999/11/28 13:08:17 ho Exp $";
#endif
#endif /* not lint */
@@ -71,7 +71,8 @@ edit(tempname, pw)
pw_edit(1, tempname);
if (lstat(tempname, &end) == -1 || S_ISLNK(end.st_mode))
pw_error(tempname, 1, 1);
- if (begin.st_mtime == end.st_mtime) {
+ if (begin.st_mtime == end.st_mtime &&
+ begin.st_size == end.st_size) {
warnx("no changes made");
unlink(tempname);
pw_error(NULL, 0, 0);