The existing setfscreatecon() at the beginning of copy_file() is the secure
method for setting the context of new files, but it doesn't apply to
existing files. Change the setfilecon() to only run on preexisting files.
Signed-off-by: Chris PeBenito
---
libbb/copy_file.c | 25
Hi Chris,
Thanks for the contribution.
Just one comment: please use bb_simple_perror_msg() instead of
bb_perror_msg() for single parameter uses (see commit:
https://git.busybox.net/busybox/commit/?id=0c97c9d43707)
Cheers,
> The existing setfscreatecon() at the beginning of copy_file() is the