On 01/03/2023 01:03:04+0100, Yoann Congal wrote:
> From: Pavel Modilaynen <[email protected]>
> 
> Use close-on-exec (O_CLOEXEC) flag when open log file to
> make sure its file descriptor is not leaked to parent
> process on fork/exec.
> 
> Fixes [YOCTO #13311]
> 

This is missing the author's SoB

> Signed-off-by: Mingli Yu <[email protected]>
> Signed-off-by: Yoann Congal <[email protected]>
> ---
>  pseudo_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pseudo_util.c b/pseudo_util.c
> index 64636b7..b58036f 100644
> --- a/pseudo_util.c
> +++ b/pseudo_util.c
> @@ -1611,7 +1611,7 @@ pseudo_logfile(char *filename, char *defname, int 
> prefer_fd) {
>               }
>               free(filename);
>       }       
> -     fd = open(pseudo_path, O_WRONLY | O_APPEND | O_CREAT, 0644);
> +     fd = open(pseudo_path, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0644);
>       if (fd == -1) {
>               pseudo_diag("help: can't open log file %s: %s\n", pseudo_path, 
> strerror(errno));
>       } else {
> -- 
> 2.30.2
> 

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177875): 
https://lists.openembedded.org/g/openembedded-core/message/177875
Mute This Topic: https://lists.openembedded.org/mt/97303652/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to