summaryrefslogtreecommitdiff
path: root/lib/libutil/pw_util.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-10-29 13:58:42 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-10-29 13:58:42 +0000
commit6dcfea0f37d7b8252a906f89c085d1780ca0cdc0 (patch)
treec5558655f4c88e1b71388e24332ec34907edf3f0 /lib/libutil/pw_util.c
parent710076a6d4ae4b9118e0bdaa18fecd78ccf96038 (diff)
Notes
Diffstat (limited to 'lib/libutil/pw_util.c')
-rw-r--r--lib/libutil/pw_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
index 444140dd613b..d2199176c15d 100644
--- a/lib/libutil/pw_util.c
+++ b/lib/libutil/pw_util.c
@@ -496,7 +496,8 @@ pw_copy(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw)
/* if we got here, we have a new entry */
len = strlen(line);
- if (write(tfd, line, len) != len)
+ if (write(tfd, line, len) != len ||
+ write(tfd, "\n", 1) != 1)
goto err;
done:
free(line);