Skip to content

passwd: - #1796

Merged
alejandro-colomar merged 2 commits into
shadow-maint:masterfrom
alexey-tikhonov:passwd-stdin
Nov 11, 2026
Merged

passwd:#1796
alejandro-colomar merged 2 commits into
shadow-maint:masterfrom
alexey-tikhonov:passwd-stdin

Conversation

@alexey-tikhonov

Copy link
Copy Markdown
Contributor
  • print confirmation with '--stdin' option
  • handle failure of do_pam_passwd_non_interactive()

Comment thread src/passwd.c Resolved
@alexey-tikhonov
alexey-tikhonov marked this pull request as ready for review November 9, 2026 18:53
Comment thread src/passwd.c Resolved
Comment thread src/passwd.c Resolved
Comment thread src/passwd.c Resolved
@alexey-tikhonov

Copy link
Copy Markdown
Contributor Author

codeql failed with:

  dpkg: error processing archive /tmp/apt-dpkg-install-fZjyNy/0-firefox_1%3a1snap1-0ubuntu9.1_amd64v3.deb (--unpack):
   new firefox package preinst maintainer script subprocess failed with exit status 1

to match behavior of `do_pam_passwd()`.

Note that change is intentionally done outside of
`do_pam_passwd_non_interactive()` because this function is used in
other places as well, where logging is undesirde.
With `--stdin`, a failing PAM password change was ignored and
`passwd` exited with 0. Changed to exit with `E_PAM_ERR` in this
case instead

Note: this is potentially breaking for scripts using `passwd --stdin`
that assumed a 0 exit status unconditionally.

@alejandro-colomar alejandro-colomar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@alejandro-colomar
alejandro-colomar merged commit 01d6341 into shadow-maint:master Nov 11, 2026
11 of 15 checks passed
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.

2 participants