Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools: hv: change permissions of NetworkManager configuration file

Align permissions of the resulting .nmconnection file, instead of
the input file from hv_kvp_daemon. To avoid the tiny time frame
where the output file is world-readable, use umask instead of chmod.

Fixes: 42999c904612 ("hv/hv_kvp_daemon:Support for keyfile based connection profile")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Link: https://lore.kernel.org/r/20241016143521.3735-1-olaf@aepfle.de
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20241016143521.3735-1-olaf@aepfle.de>

authored by

Olaf Hering and committed by
Wei Liu
91ae69c7 bcc80dec

+1 -1
+1 -1
tools/hv/hv_set_ifconfig.sh
··· 81 81 82 82 cp $1 /etc/sysconfig/network-scripts/ 83 83 84 - chmod 600 $2 84 + umask 0177 85 85 interface=$(echo $2 | awk -F - '{ print $2 }') 86 86 filename="${2##*/}" 87 87