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

Bug#729746: MAXLOGNAME increased (17 -> 32)



I believe we can raise MAXLOGNAME, together with revisisting
getlogin/getlogin_r/setlogin and dropping support for glibc
compiled with "--enable-compatible-utmp" (the Debian one is compiled with
--disable-compatible-utmp anyway).

The problem might be with <sys/proc.h>, but this header is
problematic-all-time, due to expose of kernel internals.

I can't see a way around it: either we break new code or we break old
code. Am I missing something?

Under ususal usage, the login name will be allowed on given system,
so I do not expect longer names on older kernels.

In fact, we are currently a little bit inconsistent, as we have

<bits/utmp.h>	#define UT_NAMESIZE	32
<bits/utmpx.h>	#define UT_NAMESIZE	32
<sys/param.h>	#define MAXLOGNAME	17

But the ususal constraint is

MAXLOGNAME should be == UT_NAMESIZE+1

Petr


Reply to: