From 6796969bcdc947c7f550c13713d5daf5765268c7 Mon Sep 17 00:00:00 2001 From: tigro Date: Sun, 11 Feb 2024 00:25:09 +0300 Subject: [PATCH] Change chpasswd to passwd to support PAM crypto algorithms --- ...to-passwd-to-support-PAM-crypto-algo.patch | 27 +++++++++++++++++++ SPECS/cockpit.spec | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0009-Change-chpasswd-to-passwd-to-support-PAM-crypto-algo.patch diff --git a/SOURCES/0009-Change-chpasswd-to-passwd-to-support-PAM-crypto-algo.patch b/SOURCES/0009-Change-chpasswd-to-passwd-to-support-PAM-crypto-algo.patch new file mode 100644 index 0000000..8e3247b --- /dev/null +++ b/SOURCES/0009-Change-chpasswd-to-passwd-to-support-PAM-crypto-algo.patch @@ -0,0 +1,27 @@ +From c0f6c3e6c1a8abc1dff900669e1743f78f2543b4 Mon Sep 17 00:00:00 2001 +From: tigro +Date: Sat, 10 Feb 2024 23:55:52 +0300 +Subject: [PATCH] Change chpasswd to passwd to support PAM crypto algorithms + +--- + pkg/users/password-dialogs.js | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pkg/users/password-dialogs.js b/pkg/users/password-dialogs.js +index 089abac41..5589e79f0 100644 +--- a/pkg/users/password-dialogs.js ++++ b/pkg/users/password-dialogs.js +@@ -111,8 +111,8 @@ function passwd_self(old_pass, new_pass) { + + export function passwd_change(user, new_pass) { + return new Promise((resolve, reject) => { +- cockpit.spawn(["chpasswd"], { superuser: "require", err: "out" }) +- .input(user + ":" + new_pass) ++ cockpit.spawn(["passwd", user, "--stdin"], { superuser: "require", err: "out" }) ++ .input(new_pass) + .done(function() { + resolve(); + }) +-- +2.43.0 + diff --git a/SPECS/cockpit.spec b/SPECS/cockpit.spec index 4d86981..3e3e807 100644 --- a/SPECS/cockpit.spec +++ b/SPECS/cockpit.spec @@ -50,7 +50,7 @@ License: LGPL-2.1-or-later URL: https://cockpit-project.org/ Version: 300.3 -Release: 2%{?dist}.inferit.3 +Release: 2%{?dist}.inferit.4 # We need to patch official source (000* patches in SOURCE) and # repack tarball to recompile javascript. # Use script cockpit-inferit-patch.sh to create @@ -797,6 +797,9 @@ via PackageKit. # The changelog is automatically generated and merged %changelog +* Sat Feb 10 2024 Arkady L. Shane - 300.3-2.inferit.4 +- Change chpasswd to passwd to support PAM crypto algorithms + * Sat Feb 10 2024 Alexey Berezhok - 300.3-2.inferit.3 - Added support GOST and PAM-GOST profiles for crypto-policies in the UI interface