Closed GoogleCodeExporter closed 8 years ago
Thanks and nice find! That limit has been in there since 2003 and before that
I think it was 8 or 9!
I'm surprised nobody has ran into this before.
Original comment by mark.gro...@gmail.com
on 27 Apr 2011 at 1:55
Unfortunately, __UT_NAMESIZE doesn't appear to be portable. For example, AIX
has utmpx.h but __UT_NAMESIZE is not defined (they appear to hardcode to
256). I'm also a bit uncomfortable using double-underscore preprocessor defines
as that ~usually~ means 'reserved for internal use'.
Instead, let's make opt->ruser and opt->luser dynamically allocated at program
startup based on the value of sysconf(_SC_LOGIN_NAME_MAX) if available,
otherwise
fall back to the old value.
See
http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html
Could you try the attached patch and verify that it still solves your problem
Original comment by mark.gro...@gmail.com
on 27 Apr 2011 at 5:28
Attachments:
Even better to do it at runtime, this is what they made
sysconf() for...
Double underscore looked funny but I thought it would
be hidden by protection of checking for utmpx.h instead
of utmp.h.
Builds and work perfect for me. Thanks!
Original comment by scott.m....@gmail.com
on 27 Apr 2011 at 6:25
This issue was closed by revision r1326.
Original comment by mark.gro...@gmail.com
on 28 Apr 2011 at 2:33
Original issue reported on code.google.com by
scott.m....@gmail.com
on 27 Apr 2011 at 12:44Attachments: