diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-10-29 13:58:42 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-10-29 13:58:42 +0000 |
| commit | 6dcfea0f37d7b8252a906f89c085d1780ca0cdc0 (patch) | |
| tree | c5558655f4c88e1b71388e24332ec34907edf3f0 /lib/libutil/pw_util.c | |
| parent | 710076a6d4ae4b9118e0bdaa18fecd78ccf96038 (diff) | |
Notes
Diffstat (limited to 'lib/libutil/pw_util.c')
| -rw-r--r-- | lib/libutil/pw_util.c | 3 |
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); |
