lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241016143521.3735-1-olaf@aepfle.de>
Date: Wed, 16 Oct 2024 16:35:10 +0200
From: Olaf Hering <olaf@...fle.de>
To: Wei Liu <wei.liu@...nel.org>,
	Shradha Gupta <shradhagupta@...ux.microsoft.com>,
	Ani Sinha <anisinha@...hat.com>,
	Saurabh Sengar <ssengar@...ux.microsoft.com>,
	linux-hyperv@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	Dexuan Cui <decui@...rosoft.com>
Subject: [PATCH v1] 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: 42999c90 ("Support for keyfile based connection profile")

Signed-off-by: Olaf Hering <olaf@...fle.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##*/}"
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ