jobcore/dhclient/0001-99-replace-hostname-with-uname-n.patch

25 lines
861 B
Diff
Raw Normal View History

2022-08-07 13:17:14 +02:00
From c8587c717eedd4841c002b3751463a070c896f87 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Thu, 4 Aug 2022 12:15:46 +0200
Subject: [PATCH 1/1] [!99] replace `hostname` with `uname -n`
The former belongs to package `inetutils`, which has some security
implications, so let's use the latter.
---
client/scripts/linux | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/scripts/linux b/client/scripts/linux
index c4e51f6d..49eff40a 100755
--- a/client/scripts/linux
+++ b/client/scripts/linux
@@ -113,7 +113,7 @@ set_hostname() {
local current_hostname
if [ -n "$new_host_name" ]; then
- current_hostname=$(hostname)
+ current_hostname=$(uname -n)
# current host name is empty, '(none)' or 'localhost' or differs from new one from DHCP
if [ -z "$current_hostname" ] ||