Skip to content

ECI: gpg: Pass the passphrase to the gpg2 tool using a pipe#3475

Merged
estesp merged 2 commits intocontainerd:masterfrom
stefanberger:gpg2-passphrase-via-file
Aug 2, 2019
Merged

ECI: gpg: Pass the passphrase to the gpg2 tool using a pipe#3475
estesp merged 2 commits intocontainerd:masterfrom
stefanberger:gpg2-passphrase-via-file

Conversation

@stefanberger
Copy link
Copy Markdown
Contributor

Rather than passing the passphrase via command line write it into
a temp. file and pass the name of the file using passphrase-file option.

Signed-off-by: Stefan Berger [email protected]

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 31, 2019

Build succeeded.

@stefanberger stefanberger force-pushed the gpg2-passphrase-via-file branch from 0f8f9ae to 80cad67 Compare July 31, 2019 20:07
Rather than passing the passphrase via command line write it into
a temp. file and pass the name of the file using passphrase-file option.

Signed-off-by: Stefan Berger <[email protected]>
Use a Pipe() rather than a file to pass the passphrase to the command
line tool. Pass the file descriptor to read the passphrase from as fd '3'.

Signed-off-by: Stefan Berger <[email protected]>
@stefanberger stefanberger force-pushed the gpg2-passphrase-via-file branch from 80cad67 to 5cf7991 Compare July 31, 2019 20:07
@stefanberger
Copy link
Copy Markdown
Contributor Author

Ah, first file descriptor needs to be passed as '3' in golang. Now doing this via pipe() works.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 31, 2019

Build succeeded.

@stefanberger stefanberger changed the title gpg: Pass the passphrase to the gpg2 tool using a file ECI: gpg: Pass the passphrase to the gpg2 tool using a file Aug 1, 2019
@stefanberger stefanberger changed the title ECI: gpg: Pass the passphrase to the gpg2 tool using a file ECI: gpg: Pass the passphrase to the gpg2 tool using a pipe Aug 1, 2019
Copy link
Copy Markdown
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

I still have some reservations on the use of the passphrase, but that discussion is separate from whether this PR is better than what is there before. Let's get this merged in.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit f082134 into containerd:master Aug 2, 2019
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.

3 participants