Skip to content

Release 0.6.3#1486

Open
adombeck wants to merge 10 commits intostablefrom
release-0.6.3
Open

Release 0.6.3#1486
adombeck wants to merge 10 commits intostablefrom
release-0.6.3

Conversation

@adombeck
Copy link
Copy Markdown
Contributor

@adombeck adombeck commented Apr 23, 2026

  * Fix primary group ID reset to UID during login
  * Fix login failures due to unstable network connection
  * Fix TTY and CLI login failing after a 120 second timeout.
  * Fix Ctrl-D not working in text enries by pam_authd
  * Fix int overflow in test on 32-bit architectures

nooreldeenmansour and others added 9 commits April 23, 2026 13:49
`UpdateUser` unconditionally reset the user record's primary GID to the user's UID on every login, silently reverting GID changes made via `authctl group set-gid`. The group record itself kept the correct GID, causing `getent passwd` and `getent group` to diverge.
We've seen cases in e2e-tests where device auth took longer than 2
minutes to complete. When it finally succeeds, the login fails because
the subsequent SetData(authenticationBrokerIDKey, ...) call fails:

  failed to call com.ubuntu.authd.pam.SetData: dbus: connection closed by user
  LOGIN: exiting with error System error: dbus: connection closed by user

We don't to enforce a timeout for the login procedure here. If there
should be a timeout, it should be the caller who enforces it - similar
to the behavior of `login`which is configured via LOGIN_TIMEOUT in
/etc/login.defs.
Currently, Ctrl-D has no effect when authd-pam is used.

Usually, when typing Ctrl-D in a terminal, the input buffer to the
reading process is flushed, and, if the buffer is empty, EOF is sent.
With sudo the expected behavior is that it doesn't ask for a password
again if an empty password was submitted via Ctrl-D.

This commit implements that behavior.
On 32-bit architectures, math.MaxInt32 + 1 is larger than the int type,
so it causes the test to fail with

  cmd/authctl/group/set-gid_test.go:52:65: cannot use math.MaxInt32 + 1 (untyped int constant 2147483648) as int value in argument to strconv.Itoa (overflows)

The fix is to use an int64 instead.

refs: https://bugs.launchpad.net/ubuntu/+source/authd/+bug/2148363
@adombeck adombeck changed the base branch from main to stable April 23, 2026 11:56
@adombeck adombeck marked this pull request as ready for review April 23, 2026 11:57
@adombeck adombeck requested a review from denisonbarbosa April 23, 2026 11:57
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.61%. Comparing base (ca1a1cb) to head (83ae7c5).
⚠️ Report is 1 commits behind head on stable.

Files with missing lines Patch % Lines
authd-oidc-brokers/internal/broker/broker.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           stable    #1486      +/-   ##
==========================================
+ Coverage   85.56%   85.61%   +0.05%     
==========================================
  Files         119      119              
  Lines        7674     7681       +7     
  Branches      111      111              
==========================================
+ Hits         6566     6576      +10     
+ Misses       1052     1049       -3     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants