ubuntu / aad-auth

Azure AD authentication module for Ubuntu
GNU Lesser General Public License v3.0
141 stars 22 forks source link

Add `min_uid` and `max_uid` configuration values. #498

Open JOT85 opened 7 months ago

JOT85 commented 7 months ago

aad-auth assigns users to UIDs which are too large for some common software.

There are many reports of this problem, notably relating to xdg-desktop-portal-gnome not working:

Adding a min_uid and max_uid configuration option allows the user to specify the range in which UIDs should be generated, thereby enabling admins to cap the UIDs at a range which works with most software.

To prevent existing installations from changing their behaviour, the default values, when the parameters aren't specified in the configuration file, remain at 100000 and math.MaxUint32, however the config template now explicitly sets the values to values which play nicely with xdg-desktop-portal-gnome, in an attempt to give new users a better experience.

Also, when a collision is found, instead of only incrementing the UID, which may overflow and end up as UID 0 (root!!!), we instead wrap around only within the specified range.

github-actions[bot] commented 7 months ago
Hey! JOT85 has not signed the Canonical CLA which is required to get this contribution merged on this project. Please head over to https://ubuntu.com/legal/contributors to read more about it.