[PATCH 1/1] copy_file(): Revise completion of SELinux security context preserve/set.

2020-03-25 Thread Chris PeBenito
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

Re: [PATCH 1/1] copy_file(): Revise completion of SELinux security context preserve/set.

2020-03-25 Thread Xabier Oneca -- xOneca
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