public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedora-packager] epel10: fkinit: Use herestring for pass/OTP
@ 2026-06-25 13:19 Stephen Gallagher
  0 siblings, 0 replies; only message in thread
From: Stephen Gallagher @ 2026-06-25 13:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedora-packager
            Branch : epel10
            Commit : d68c55fa44a6ec7424ceaa6515d8db284277ebc0
            Author : Stephen Gallagher <sgallagh@redhat.com>
            Date   : 2025-02-06T14:39:00-05:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedora-packager/c/d68c55fa44a6ec7424ceaa6515d8db284277ebc0?branch=epel10

            Log:
            fkinit: Use herestring for pass/OTP

For added security, pass the password and OTP directly via a BASH
herestring instead of via `echo`. This will avoid putting the value into
the process table.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

---
diff --git a/fkinit b/fkinit
index 4ec0766..1d53287 100755
--- a/fkinit
+++ b/fkinit
@@ -106,7 +106,7 @@ kinit -n @$domain -c FILE:$armorcache
 F_PASSWORD=$(systemd-ask-password "FAS password:")
 F_OTP=$(systemd-ask-password "FAS OTP (leave blank if not configured):")
 
-echo -n ${F_PASSWORD}${F_OTP} | kinit -T FILE:$armorcache $_arg_user@$domain >/dev/null
+kinit -T FILE:$armorcache $_arg_user@$domain <<< "${F_PASSWORD}${F_OTP}" >/dev/null
 unset F_PASSWORD
 unset F_OTP
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 13:19 [rpms/fedora-packager] epel10: fkinit: Use herestring for pass/OTP Stephen Gallagher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox