A fork of Gnome-control-center with some tweaks
Currently we get MAXNAMELEN from glibc's LOGIN_NAME_MAX, if available, and sysconf otherwise. But the maximum username length supported by glibc and the kernel is actually way larger than the maximum length that actually works in practice. On Linux, anything larger than 32 characters is not going to fit into utmp, and will therefore be rejected by useradd. Then gnome-control-center will spit out a confusing error message dialog. Let's spare our users from that. useradd (in shadow-utils) gets its max name size from the following magic: /* Maximum length of usernames */ #ifdef HAVE_UTMPX_H # include <utmpx.h> # define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user)) #else # include <utmp.h> # ifdef HAVE_STRUCT_UTMP_UT_USER # define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user)) # else # ifdef HAVE_STRUCT_UTMP_UT_NAME # define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_name)) # else # define USER_NAME_MAX_LENGTH 32 # endif # endif #endif It's more work than necessary. utmpx is standardized by POSIX (it's actually an XSI extension), whereas utmp is not, so let's just use utmpx. This ought to work on at least FreeBSD as well. And if any free operating systems that care about GNOME don't have utmpx yet, no doubt they'll send patches. https://bugzilla.gnome.org/show_bug.cgi?id=724193 |
||
---|---|---|
data/icons | ||
gettext/its | ||
man | ||
panels | ||
po | ||
search-provider | ||
shell | ||
subprojects | ||
.gitmodules | ||
AUTHORS | ||
ChangeLog | ||
COPYING | ||
gnome-control-center.doap | ||
MAINTAINERS | ||
meson.build | ||
meson_options.txt | ||
meson_post_install.py | ||
NEWS | ||
README | ||
update-from-gsd.in | ||
update-from-gsd.sh | ||
update-from-nma.in |
GNOME Control Center ==================== About - The control center is GNOME's main interface for configuration of various aspects of your desktop. Installation - See the file 'INSTALL' How to report bugs - Bugs should be reported to the GNOME bug tracking system under the product gnome-control-center. It is available at http://bugzilla.gnome.org. In the report please include the following information - Operating system and version For Linux, version of the C library How to reproduce the bug if possible If the bug was a crash, include the exact text that was printed out A stacktrace where possible [see below] How to get a stack trace - If the crash is reproducible, it is possible to get a stack trace and attach it to the bug report. The following steps are used to obtain a stack trace - Run the program in gdb [the GNU debugger] or any other debugger ie. gdb gnome-keyboard-properties Start the program ie. (gdb) run Reproduce the crash and the program will exit to the gdb prompt Get the back trace ie. (gdb) bt full Once you have the backtrace, copy and paste this either into the 'Comments' field or attach a file with it included. Patches - Patches should be submitted to bugzilla.gnome.org or emailed to the gnomecc-list@gnome.org list. If using bugzilla, attach the patch to a new bug report [or preferably, check to see if there is already a bug report that corresponds to your patch]. Bug reports containing patches should include the 'PATCH' keyword. See https://wiki.gnome.org/Newcomers/CodeContributionWorkflow for how to create patches.