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
We assume that we only generate valid usernames, so make sure they're
short enough to be used, else we'll display a dialog with a meaningless
error message when useradd fails.
Note that this commit doesn't completely fix the bug, as our definition
of MAXNAMELEN is different from useradd's.
https://bugzilla.gnome.org/show_bug.cgi?id=766401
Wacom's new "Pro Pen 3D" stylus is declared as a new stylus type within
libwacom: WSTYLUS_3D. Now that the Wacom panel supports arbitrary three-
button styli, we can add specific support for this new stylus type to
suppress the warning message that is generated.
https://bugzilla.gnome.org/show_bug.cgi?id=790028
Both 'remove_buttons' and 'remove_button' perform the same general task and
can be unified into a single function. This makes supporting an arbitrary
number of stylus buttons more straightforward.
https://bugzilla.gnome.org/show_bug.cgi?id=790028
Although the Wacom panel doesn't have explicit support for styli with more
than two buttons, it tries to at least allow configuration of the upper and
lower buttons. This commit fixes an incorrect conditional which prevents
the panel from setting the combo box for the upper switch to the current
setting.
https://bugzilla.gnome.org/show_bug.cgi?id=790028
The dance we do to fetch event nodes from devices seems a bit superfluous
now, and even wrong if multiple X11 devices boil down to the same event
node.
Fixes the wacom panel not showing the "Map buttons..." action on older
kernels and wacom.ko modules, because the pad device shares the event node
with the stylus. Pad device lookups in order to enable the action obtain
the stylus device, thus the action is not shown.
https://bugzilla.gnome.org/show_bug.cgi?id=793029
The night light schedule dialog stores the time as a single floating
point value, which is then converted into hours and minutes for the
time selection fields.
Previously, the minutes were calculated using the remainder of the
stored value and the hours. This caused undesired behaviour when the
hour field was set to zero, as fmod(value, 0) returns NaN. As a result,
the user was not able to set the time between 00:00 and 00:59.
This patch rewrites the time retrieval logic using modf.
https://bugzilla.gnome.org/show_bug.cgi?id=792944
Doing:
typedef struct _NMClient NMClient;
when there's no NMClient available barely makes the code more readable,
and doesn't clear show when it would be used.
https://bugzilla.gnome.org/show_bug.cgi?id=737362
NetworkManager supports toggling the periodic network check,
a check that by itself can be a security threat since it leaks
information about the host.
This patch adds a periodic network check toggle to the Privacy
panel. This is only enabled when a recent enough NetworkManager
is supported.
https://bugzilla.gnome.org/show_bug.cgi?id=737362
As changing the time can have security implications, such as expiring
passwords, while changing the timezone doesn't, it's not unusual to
have a setup where org.freedesktop.timedate1.set-timezone is allowed
while other time-related actions aren't.
Therefore, if org.freedesktop.timedate1.set-timezone is allowed, there's
no reason to require that the user unlocks the panel to enable them to
change the timezone.
https://bugzilla.gnome.org/show_bug.cgi?id=646185
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.
https://bugzilla.gnome.org/show_bug.cgi?id=787588
The timezone panel uses translations for the existing timezone
names. This was using a set of predefined languages inside the
meson's build file.
This set of languages has been moved to the LINGUAS file.
https://bugzilla.gnome.org/show_bug.cgi?id=787588
The bluetooh, network and wacom panels should not be optional
on linux, except on s390 systems which lack USB support. It
should also not be built at all on other systems.
This patch makes these panels mandatory on linux.
https://bugzilla.gnome.org/show_bug.cgi?id=792641
If mutter requires the same scale on all logical monitors we must
propagate a scale set on one monitor to the remaining ones or we'll
fail validation leaving users wondering why it doesn't work.
https://bugzilla.gnome.org/show_bug.cgi?id=790809
NetworkManager supports marking a connection as metered, meaning
that connection is e.g. charged by its usage or extremely limited.
When a network is metered, background network usage must cease
and the behavior of the various OS pieces must be adjusted.
This patch adds a switch to set a connection as metered or not.
The property is imediately propagated to NetworkManager.
https://bugzilla.gnome.org/show_bug.cgi?id=792608
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).
https://bugzilla.gnome.org/show_bug.cgi?id=792629