Re: [gdm-list] GDM utmp support



On 10/16/07, Brian Cameron <Brian Cameron sun com> wrote:
>
> Jon:
>
> Attached please find a patch which fixes the utmp/wtmp processing quite
> a bit.  When you forked D-Bus, this code was still under a lot of
> development and it took quite some time to get it right.  The stable
> GDM code has been reworked so it better supports how utmp/wtmp works
> on a variety of platforms.
>
> In summary, the following changes are in the patch:
>
> + configure.ac wasn't properly setting HAVE_GETUTXENT, etc. because it
>    was using AC_CHECK_FUNC instead of AC_CHECK_FUNCS.  With this change
>    it works properly.  Also, need to check for logwtmp for FreeBSD
>    support.
>
> + The previous code was only doing wtmp/btmp processing.  This patch
>    adds utmp proccessing.  Also, now utmpx.h is used in preference
>    to utmp.h if found on the system, so systems using extended utmp
>    are better supported.
>
> + This code uses #if checks to better ensure that the code compiles
>    across all platforms.  For example, will use UT_NAME instead of
>    UT_USER if UT_USER isn't present on the system.  Also added back
>    login(), logout(), and logwtmp() #ifdef's needed by FreeBSD.
>
> + Support ut_tv or ut_time, based on what is supported on the system.
>    Also support setting ut_syslen if supported on the system.
>
> + ut_type should be set to DEAD_PROCESS on logout.  The previous code
>    was always setting it to USER_PROCESS.
>
> + ut_id is now set to x11_display_name and ut_host is now set to
>    hostname and x11_display_name or just x11_display_name if hostname
>    is not set.  This matches what is in stable GDM.  Unless there is
>    a good reason, I think we should probably try to stay consistent
>    with what people are currently using with GDM 2.20.
>
>    If we think we should set ut_host or ut_id differently, then we
>    should discuss if this should impact the GDM 2.20 code, I guess.

Cool.  Thanks for doing this.  I've applied this as is.  We can tweak
it as necessary.

Thanks,
Jon


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]