From patchwork Mon Aug 12 13:48:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1145739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-104313-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ORMk4CYp"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 466cdD3q3Wz9sDQ for ; Mon, 12 Aug 2019 23:48:48 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type; q=dns; s=default; b=XF+f7rpf0M1rYeyC m8bJSd7id+60OZZvFKU6IyQmw+Jxv9c3PsBSXEWoBftMjaCQCAO7H2b3pCdqGqRE FSJTsMpDtnOeoEuwTlP2gwlThtxN0OdZWD6L7k0f1nAXoS6egaWrvO5Q9hKkW3xE bAx0iKZyY2g6W5Lgy3S1zCRe984= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type; s=default; bh=Rn3Ru2DsDE2R2pDibuoeFy uKcFY=; b=ORMk4CYpnIgBVDdZORNwCHATMOY57HWfcPxxf7XFrjaoh7beNBEvdM Apoy/BxKup/+84CFZONLdBTCIPK7OwE+Mig9yUuW80aiG29blnieYUxfP9/WBEtU X6U2wVejg11RU4SUiAPlbjOIER2cKYFtuzswiazPMfrHmM1II6HSE= Received: (qmail 54652 invoked by alias); 12 Aug 2019 13:48:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 54642 invoked by uid 89); 12 Aug 2019 13:48:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Cc: Martin Sebor Subject: [PATCH] login: Add nonstring attributes to struct utmpx [BZ #24899] Date: Mon, 12 Aug 2019 15:48:37 +0200 Message-ID: <87sgq6o5oq.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Commit 7532837d7b03b3ca5b9a63d77a5bd81dd23f3d9c ("The -Wstringop-truncation option new in GCC 8 detects common misuses") added __attribute_nonstring__ to bits/utmp.h, but it did not update the parallel bits/utmpx.h header. 2019-08-12 Florian Weimer [BZ #24899] * sysdeps/gnu/bits/utmpx.h (struct utmpx): Add __attribute_nonstring__ to ut_line, ut_user, ut_host. Reviewed-by: Adhemerval Zanella diff --git a/sysdeps/gnu/bits/utmpx.h b/sysdeps/gnu/bits/utmpx.h index 472a7d57d3..36259dbae1 100644 --- a/sysdeps/gnu/bits/utmpx.h +++ b/sysdeps/gnu/bits/utmpx.h @@ -56,10 +56,13 @@ struct utmpx { short int ut_type; /* Type of login. */ __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ + char ut_line[__UT_LINESIZE] + __attribute_nonstring__; /* Devicename. */ char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + char ut_user[__UT_NAMESIZE] + __attribute_nonstring__; /* Username. */ + char ut_host[__UT_HOSTSIZE] + __attribute_nonstring__; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */