Message ID | 875zn2vh9f.fsf@oldenburg2.str.redhat.com |
---|---|
State | Committed |
Headers |
Received: (qmail 97401 invoked by alias); 12 Aug 2019 09:56:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 97393 invoked by uid 89); 12 Aug 2019 09:56:48 -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=locks X-HELO: mx1.redhat.com From: Florian Weimer <fweimer@redhat.com> To: libc-alpha@sourceware.org Subject: [PATCH] login: Use struct flock64 in utmp [BZ #24880] Date: Mon, 12 Aug 2019 11:56:44 +0200 Message-ID: <875zn2vh9f.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain |
Commit Message
Florian Weimer
Aug. 12, 2019, 9:56 a.m. UTC
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. 2019-08-05 Florian Weimer <fweimer@redhat.com> [BZ #24880] * login/utmp_file.c (file_locking_failed): Use struct flock64. (file_locking_unlock): Likewise.
Comments
On 12/08/2019 06:56, Florian Weimer wrote: > 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. > > 2019-08-05 Florian Weimer <fweimer@redhat.com> > > [BZ #24880] > * login/utmp_file.c (file_locking_failed): Use struct flock64. > (file_locking_unlock): Likewise. LGTM, with a nit below. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > > diff --git a/login/utmp_file.c b/login/utmp_file.c > index 9c64ebf63c..a3e9af1fa3 100644 > --- a/login/utmp_file.c > +++ b/login/utmp_file.c > @@ -76,7 +76,7 @@ file_locking_failed (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 @@ file_locking_failed (int fd, int type) > static void > file_locking_unlock (int fd) > { > - struct flock fl = > + struct flock64 fl = > { > .l_type = F_UNLCK, > }; >
* Adhemerval Zanella: > On 12/08/2019 06:56, Florian Weimer wrote: >> 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. >> >> 2019-08-05 Florian Weimer <fweimer@redhat.com> >> >> [BZ #24880] >> * login/utmp_file.c (file_locking_failed): Use struct flock64. >> (file_locking_unlock): Likewise. > > LGTM, with a nit below. > > Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > >> >> diff --git a/login/utmp_file.c b/login/utmp_file.c >> index 9c64ebf63c..a3e9af1fa3 100644 >> --- a/login/utmp_file.c >> +++ b/login/utmp_file.c >> @@ -76,7 +76,7 @@ file_locking_failed (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 @@ file_locking_failed (int fd, int type) >> static void >> file_locking_unlock (int fd) >> { >> - struct flock fl = >> + struct flock64 fl = >> { >> .l_type = F_UNLCK, >> }; >> What's the nit? Thanks, Florian
On 12/08/2019 16:53, Florian Weimer wrote: > * Adhemerval Zanella: > >> On 12/08/2019 06:56, Florian Weimer wrote: >>> 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. >>> >>> 2019-08-05 Florian Weimer <fweimer@redhat.com> >>> >>> [BZ #24880] >>> * login/utmp_file.c (file_locking_failed): Use struct flock64. >>> (file_locking_unlock): Likewise. >> >> LGTM, with a nit below. It should be only 'LGTM', sorry for the noise. >> >> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> >> >>> >>> diff --git a/login/utmp_file.c b/login/utmp_file.c >>> index 9c64ebf63c..a3e9af1fa3 100644 >>> --- a/login/utmp_file.c >>> +++ b/login/utmp_file.c >>> @@ -76,7 +76,7 @@ file_locking_failed (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 @@ file_locking_failed (int fd, int type) >>> static void >>> file_locking_unlock (int fd) >>> { >>> - struct flock fl = >>> + struct flock64 fl = >>> { >>> .l_type = F_UNLCK, >>> }; >>> > > What's the nit? > > Thanks, > Florian >
diff --git a/login/utmp_file.c b/login/utmp_file.c index 9c64ebf63c..a3e9af1fa3 100644 --- a/login/utmp_file.c +++ b/login/utmp_file.c @@ -76,7 +76,7 @@ file_locking_failed (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 @@ file_locking_failed (int fd, int type) static void file_locking_unlock (int fd) { - struct flock fl = + struct flock64 fl = { .l_type = F_UNLCK, };