diff options
Diffstat (limited to 'lib/libutil')
-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 444140d..d219917 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); |