* [PATCH v1] tools: hv: change permissions of NetworkManager configuration file
@ 2024-10-16 14:35 Olaf Hering
2024-10-22 7:53 ` Shradha Gupta
2024-12-07 7:49 ` Wei Liu
0 siblings, 2 replies; 3+ messages in thread
From: Olaf Hering @ 2024-10-16 14:35 UTC (permalink / raw)
To: Wei Liu, Shradha Gupta, Ani Sinha, Saurabh Sengar, linux-hyperv,
linux-kernel
Cc: K. Y. Srinivasan, Haiyang Zhang, Dexuan Cui
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: 42999c90 ("Support for keyfile based connection profile")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/hv/hv_set_ifconfig.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hv/hv_set_ifconfig.sh b/tools/hv/hv_set_ifconfig.sh
index 440a91b35823..2f8baed2b8f7 100755
--- a/tools/hv/hv_set_ifconfig.sh
+++ b/tools/hv/hv_set_ifconfig.sh
@@ -81,7 +81,7 @@ echo "ONBOOT=yes" >> $1
cp $1 /etc/sysconfig/network-scripts/
-chmod 600 $2
+umask 0177
interface=$(echo $2 | awk -F - '{ print $2 }')
filename="${2##*/}"
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] tools: hv: change permissions of NetworkManager configuration file
2024-10-16 14:35 [PATCH v1] tools: hv: change permissions of NetworkManager configuration file Olaf Hering
@ 2024-10-22 7:53 ` Shradha Gupta
2024-12-07 7:49 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Shradha Gupta @ 2024-10-22 7:53 UTC (permalink / raw)
To: Olaf Hering
Cc: Wei Liu, Ani Sinha, Saurabh Sengar, linux-hyperv, linux-kernel,
K. Y. Srinivasan, Haiyang Zhang, Dexuan Cui
On Wed, Oct 16, 2024 at 04:35:10PM +0200, Olaf Hering wrote:
> 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: 42999c90 ("Support for keyfile based connection profile")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
> tools/hv/hv_set_ifconfig.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/hv/hv_set_ifconfig.sh b/tools/hv/hv_set_ifconfig.sh
> index 440a91b35823..2f8baed2b8f7 100755
> --- a/tools/hv/hv_set_ifconfig.sh
> +++ b/tools/hv/hv_set_ifconfig.sh
> @@ -81,7 +81,7 @@ echo "ONBOOT=yes" >> $1
>
> cp $1 /etc/sysconfig/network-scripts/
>
> -chmod 600 $2
> +umask 0177
> interface=$(echo $2 | awk -F - '{ print $2 }')
> filename="${2##*/}"
>
Thanks Olaf, the changes look good to me.
Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] tools: hv: change permissions of NetworkManager configuration file
2024-10-16 14:35 [PATCH v1] tools: hv: change permissions of NetworkManager configuration file Olaf Hering
2024-10-22 7:53 ` Shradha Gupta
@ 2024-12-07 7:49 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2024-12-07 7:49 UTC (permalink / raw)
To: Olaf Hering
Cc: Wei Liu, Shradha Gupta, Ani Sinha, Saurabh Sengar, linux-hyperv,
linux-kernel, K. Y. Srinivasan, Haiyang Zhang, Dexuan Cui
On Wed, Oct 16, 2024 at 04:35:10PM +0200, Olaf Hering wrote:
> 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: 42999c90 ("Support for keyfile based connection profile")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Applied to hyperv-fixes. Thanks.
> ---
> tools/hv/hv_set_ifconfig.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/hv/hv_set_ifconfig.sh b/tools/hv/hv_set_ifconfig.sh
> index 440a91b35823..2f8baed2b8f7 100755
> --- a/tools/hv/hv_set_ifconfig.sh
> +++ b/tools/hv/hv_set_ifconfig.sh
> @@ -81,7 +81,7 @@ echo "ONBOOT=yes" >> $1
>
> cp $1 /etc/sysconfig/network-scripts/
>
> -chmod 600 $2
> +umask 0177
> interface=$(echo $2 | awk -F - '{ print $2 }')
> filename="${2##*/}"
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-07 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 14:35 [PATCH v1] tools: hv: change permissions of NetworkManager configuration file Olaf Hering
2024-10-22 7:53 ` Shradha Gupta
2024-12-07 7:49 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox