diff options
-rw-r--r-- | editors/sed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/sed.c b/editors/sed.c index cc609c3f6..c1ee7502a 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1340,10 +1340,10 @@ int sed_main(int argc UNUSED_PARAM, char **argv) | |||
1340 | bb_perror_msg_and_die("can't create temp file %s", G.outname); | 1340 | bb_perror_msg_and_die("can't create temp file %s", G.outname); |
1341 | G.nonstdout = fdopen(nonstdoutfd, "w"); | 1341 | G.nonstdout = fdopen(nonstdoutfd, "w"); |
1342 | 1342 | ||
1343 | /* Set permissions of output file */ | 1343 | /* Set permissions/owner of output file */ |
1344 | |||
1345 | fstat(fileno(file), &statbuf); | 1344 | fstat(fileno(file), &statbuf); |
1346 | fchmod(nonstdoutfd, statbuf.st_mode); | 1345 | fchmod(nonstdoutfd, statbuf.st_mode); |
1346 | fchown(nonstdoutfd, statbuf.st_uid, statbuf.st_gid); | ||
1347 | add_input_file(file); | 1347 | add_input_file(file); |
1348 | process_files(); | 1348 | process_files(); |
1349 | fclose(G.nonstdout); | 1349 | fclose(G.nonstdout); |