From patchwork Fri Apr 5 12:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 7707 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V9z9R2t7Lz3wZV for ; Fri, 5 Apr 2024 13:00:11 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V9z9D71QCz5Zg; Fri, 5 Apr 2024 13:00:00 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V9z9B21qRz30VJ; Fri, 5 Apr 2024 12:59:58 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V9z914Lwrz32lj for ; Fri, 5 Apr 2024 12:59:49 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "michael.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V9z905w9xz5TS; Fri, 5 Apr 2024 12:59:48 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4V9z8x4cWZzTwMM; Fri, 5 Apr 2024 12:59:45 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 11/13] installer: Pass correct length of hostname to sethostname() Date: Fri, 5 Apr 2024 12:59:40 +0000 Message-Id: <20240405125942.1803058-11-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240405125942.1803058-1-michael.tremer@ipfire.org> References: <20240405125942.1803058-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: AQIZBJCJWAYLZQ56XGHFE3GE4RWJWF4U X-Message-ID-Hash: AQIZBJCJWAYLZQ56XGHFE3GE4RWJWF4U X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Michael Tremer --- src/installer/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/installer/main.c b/src/installer/main.c index ecfcff2ec..6253df550 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -377,7 +377,7 @@ int main(int argc, char *argv[]) { FILE *copying; setlocale(LC_ALL, ""); - sethostname(DISTRO_SNAME, 10); + sethostname(DISTRO_SNAME, strlen(DISTRO_SNAME)); /* Log file/terminal stuff. */ if (argc >= 2) {