From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91757 invoked by alias); 17 Jan 2020 14:04:48 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 91745 invoked by uid 89); 17 Jan 2020 14:04:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-18.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Jan 2020 14:04:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579269876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YveCF0evtjk4GyJqmWOrLhf9saF/VLoBkdu46Tc/9U=; b=OMNUzHA0NdLUxza3YpYMiHlRwVD+dpl1ntReGwyGR5D+v6IH7f9lYwR07Tyxghm8hbxgj8 6xUT5Z1KFJJxR64u6+NRoU23yyDnD8tv3WjH9UzfRRQVcU0ownez3eg9+uUbJwzGH2HBYH kIyEF6+BsjSIZbrJYRNtmukGm3zfwb4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-1ZpcuaPKOuCZvNizkGJm-A-1; Fri, 17 Jan 2020 09:04:34 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F309C18AAFA2 for ; Fri, 17 Jan 2020 14:04:33 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-117-165.ams2.redhat.com [10.36.117.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB7745DA32 for ; Fri, 17 Jan 2020 14:04:33 +0000 (UTC) Received: by oldenburg2.str.redhat.com (Postfix, from userid 1000) id 46B898299EE2; Fri, 17 Jan 2020 15:04:32 +0100 (CET) Date: Wed, 01 Jan 2020 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.30 COMMITTED] login: Use struct flock64 in utmp [BZ #24880] User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20200117140432.46B898299EE2@oldenburg2.str.redhat.com> From: Florian Weimer X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 1ZpcuaPKOuCZvNizkGJm-A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00003.txt.bz2 Commit 06ab719d30b01da401150068054d3b8ea93dd12f ("Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)") introduced the use of fcntl64 into the utmp implementation. However, the lock file structure was not updated to struct flock64 at that point. (cherry picked from commit 0d5b2917530ccaf8ad312dfbb7bce69d569c23ad) 2019-08-15 Florian Weimer [BZ #24880] * login/utmp_file.c (file_locking_failed): Use struct flock64. (file_locking_unlock): Likewise. diff --git a/NEWS b/NEWS index 96458cf0b9..8952a8a77d 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ The following bugs are resolved with this release: 7408-2005 [24867] malloc: Remove unwanted leading whitespace in malloc_info [24879] login: Disarm timer after utmp lock acquisition + [24880] login: Use struct flock64 in utmp [24986] alpha: new getegid, geteuid and getppid syscalls used unconditionally [25189] Don't use a custom wrapper macro around __has_include diff --git a/login/utmp_file.c b/login/utmp_file.c index f3c528384f..94753e0404 100644 --- a/login/utmp_file.c +++ b/login/utmp_file.c @@ -76,7 +76,7 @@ try_file_lock (int fd, int type) alarm (TIMEOUT); /* Try to get the lock. */ - struct flock fl = + struct flock64 fl = { .l_type = type, fl.l_whence = SEEK_SET, @@ -103,7 +103,7 @@ try_file_lock (int fd, int type) static void file_unlock (int fd) { - struct flock fl = + struct flock64 fl = { .l_type = F_UNLCK, };