unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>,
	Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Alistair Francis <alistair.francis@wdc.com>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
Date: Thu, 30 Jul 2020 18:46:32 -0300	[thread overview]
Message-ID: <0391514d-3355-03d4-da8a-4be1c97f2b01@linaro.org> (raw)
In-Reply-To: <874kppgem1.fsf@oldenburg2.str.redhat.com>



On 30/07/2020 13:19, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> On 29/07/2020 18:14, Andreas Schwab wrote:
>>> On Jul 29 2020, Adhemerval Zanella via Libc-alpha wrote:
>>>
>>>> It is not used directly on any symbol, so there is no need to add
>>>> compat ones.
>>>
>>> struct lastlog is an external type, describing the format of
>>> /var/log/lastlog.
>>>
>>
>> Right, so which would be best way to handle this transition?  My idea
>> would to be approach to consumers, shadow-utils developers for instance,
>> and state the desirable to make glibc y2038 proof and why this interfaces
>> need to be changed.
> 
> Sounds reasonable.  We also have a security bug that is related to
> direct access to these files:
> 
>   <https://sourceware.org/bugzilla/show_bug.cgi?id=24492>
> 
> If we need to mediate access for format translation, maybe this can be
> addressed at the same time?

I think BZ#24492 is another issue and one that is not easily fixed
without some changes on the utmp-file.c internals.  The utmp/utmpx files 
are read by the ut{x} functions and used on programs such as 'who', and
to fully avoid possible F_SETLKW deadlocks the write must synchronize
using a file not accessible by normal users.

The alarm trick mitigates the deadlock issue, but it does not help
with the fact the log entry is not generated.  The bug report suggestion
of using a extra file to act as the lock for write synchronization might
be a better option.  Another possibility is to move to use a daemon broker 
to actually operate on utmp/utmpx, but I also think it is out of the scope.

I am inclined of using the extra lock file, thoughts?

  parent reply	other threads:[~2020-07-30 21:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
2020-10-22  8:15   ` Lukasz Majewski
2020-10-22  9:16   ` Andreas Schwab
2020-07-29 20:51 ` [PATCH 3/5] login: Add 64-bit time support Adhemerval Zanella via Libc-alpha
2020-07-29 21:17   ` Joseph Myers
2020-07-30 12:34     ` Adhemerval Zanella via Libc-alpha
2020-08-02 19:02       ` Maciej W. Rozycki via Libc-alpha
2020-08-02 22:05         ` Adhemerval Zanella via Libc-alpha
2020-10-22  9:16   ` Lukasz Majewski
2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
2020-07-29 21:04   ` Andreas Schwab
2020-07-29 21:14   ` Andreas Schwab
2020-07-30 12:39     ` Adhemerval Zanella via Libc-alpha
2020-07-30 16:19       ` Florian Weimer via Libc-alpha
2020-07-30 18:54         ` Joseph Myers
2020-07-30 21:53           ` Adhemerval Zanella via Libc-alpha
2020-07-31  0:31             ` Joseph Myers
2020-07-30 21:46         ` Adhemerval Zanella via Libc-alpha [this message]
2020-10-22  9:25   ` Lukasz Majewski
2020-07-29 20:51 ` [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32 Adhemerval Zanella via Libc-alpha
2020-10-22  9:31   ` Lukasz Majewski
2020-07-29 21:08 ` [PATCH 1/5] login: Consolidate utmp and utmpx headers Joseph Myers
2020-07-30 12:36   ` Adhemerval Zanella via Libc-alpha
2020-10-22  8:06 ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0391514d-3355-03d4-da8a-4be1c97f2b01@linaro.org \
    --to=libc-alpha@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=fweimer@redhat.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).