Username is case sensitive when applying policies on login
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adsys (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
When logging in (either via login or ssh) to an AD account using different case combinations, adsysd uses the specified account name instead of the lowercase one reported by getent/whoami to apply the GPOs. I believe this comes from the pam_get_item call here: https:/
This works but has the unintended side effect of producing multiple dconf profile files for each variant of the username, and caching policies as well:
root@ubuntu2204:~# ls /etc/dconf/profile/ | grep -i administrator
<email address hidden>
<email address hidden>
<email address hidden>
root@ubuntu2204:~# ls /var/cache/
<email address hidden>
<email address hidden>
<email address hidden>
Of course this all stems from the username retrieved by PAM so there might be more unintended side-effects, the dconf one being the easiest to observe.
To ensure an unified experience, when a target name is normalized from e.g. DOMAIN\User to User@DOMAIN, it will also be lowercased.
[Test Plan]
Reproduction:
* With adsys set up, log in on the Ubuntu client using an AD account, alternating cases
* Observe multiple files created at /var/cache/
With the fix applied, remove *all* cached policies at /var/cache/
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
As root, check the contents of /var/cache/
[Where problems could occur]
Target name normalization is exercised by the code that dumps policies applied for a given user, and by the code that updates or creates a policy for a given user. If this happens to cause a bug, it will render the core part of adsys unusable.
We believe this is highly unlikely given that in some cases, adsys already used the lowercase variant of the username to apply and display policies.
[Other Info]
This issue was initially reported on GitHub at https:/
description: | updated |
This bug was fixed in the package adsys - 0.9.2
---------------
adsys (0.9.2) kinetic; urgency=medium
* Update generators to fix FTBFS com/golangci/ golangci- lint golang. org/protobuf
- shell out to mkdir instead of go's os.Mkdir which can bypass fakeroot's
filesystem hijacking and cause unexpected behavior
* Update dependencies to latest:
- github.
- google.
-- Gabriel Nagy <email address hidden> Wed, 03 Aug 2022 11:00:39 +0300