util: run cryptsetup with "-d -" instead of "-d /dev/stdin"

Make sure that cryptsetup runs with the correct parameters to fix issues
in some environments.

Signed-off-by: Bart Laarhoven <bartlaarhoven@users.noreply.github.com>
This commit is contained in:
Bart Laarhoven 2025-05-06 12:50:08 +02:00 committed by mergify[bot]
parent af12c6bf1b
commit fdb4002298

View File

@ -78,7 +78,7 @@ func (l *luksWrapper) Format(devicePath, passphrase string) (string, string, err
strconv.Itoa(pkdbfMemoryLimit), strconv.Itoa(pkdbfMemoryLimit),
devicePath, devicePath,
"-d", "-d",
"/dev/stdin") "-")
} }
// LuksOpen opens LUKS encrypted partition and sets up a mapping. // LuksOpen opens LUKS encrypted partition and sets up a mapping.
@ -92,7 +92,7 @@ func (l *luksWrapper) Open(devicePath, mapperFile, passphrase string) (string, s
mapperFile, mapperFile,
"--disable-keyring", "--disable-keyring",
"-d", "-d",
"/dev/stdin") "-")
} }
// LuksResize resizes LUKS encrypted partition. // LuksResize resizes LUKS encrypted partition.