@@ -22,8 +22,8 @@ func luksFormat(devicePath string, passphrase string) error {
2222 "--hash" , defaultLuksHash , // hash algorithm
2323 "--cipher" , defaultLuksCipher , // the cipher used
2424 "--key-size" , defaultLuksKeyize , // the size of the encryption key
25- devicePath , // device to encrypt
26- "--key-file" , "/dev/stdin " , // read the passphrase from stdin
25+ devicePath , // device to encrypt
26+ "--key-file" , "- " , // read the passphrase from stdin
2727 }
2828
2929 luksFormatCmd := exec .Command (cryptsetupCmd , args ... )
@@ -38,10 +38,10 @@ func luksFormat(devicePath string, passphrase string) error {
3838
3939func luksOpen (devicePath string , mapperFile string , passphrase string ) error {
4040 args := []string {
41- "luksOpen" , // open
42- devicePath , // device to open
43- mapperFile , // mapper file in which to open the device
44- "--key-file" , "/dev/stdin " , // read the passphrase from stdin
41+ "luksOpen" , // open
42+ devicePath , // device to open
43+ mapperFile , // mapper file in which to open the device
44+ "--key-file" , "- " , // read the passphrase from stdin
4545 }
4646
4747 luksOpenCmd := exec .Command (cryptsetupCmd , args ... )
@@ -71,9 +71,9 @@ func luksClose(mapperFile string) error {
7171
7272func luksResize (mapperFile , passphrase string ) error {
7373 args := []string {
74- "resize" , // resize
75- mapperFile , // mapper file to resize
76- "--key-file" , "/dev/stdin " , // read the passphrase from stdin
74+ "resize" , // resize
75+ mapperFile , // mapper file to resize
76+ "--key-file" , "- " , // read the passphrase from stdin
7777 }
7878
7979 luksResizeCmd := exec .Command (cryptsetupCmd , args ... )
0 commit comments