Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upmake Qubes split-gpg compatible with reprepro / libgpgme #3326
Comments
andrewdavidwong
added
C: other
enhancement
labels
Nov 22, 2017
andrewdavidwong
added this to the Release 4.0 milestone
Nov 22, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adrelanos
Dec 1, 2017
Member
reprepro uses libgpgme, so it is quite limited in what it can do in that regard. Especially that seems to do some complicated magic like first looking for a gpgconf program and parsing that output. (And from the
comments in the code seems to assume that without that it is gpg1 instead of gpg2). It seems to have some function to change defaults but no real documentation about what it exactly expects there (and if that can even be used to choose a different gpg client).
As I understand it, everything that should be changed with those settings should also be possible by adding some directory in front of the PATH you call reprepro with that contains a gpgconf binary that outputs the correct things. (Though I have no idea what "correct" means there).
Bernhard R. Link
F8AC 04D5 0B9B 064B 3383 C3DA AFFC 96D1 151D FFDC
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Dec 1, 2017
Member
--enable-special-filenames
This should be possible to handle, but not trivial. Perhaps with a help from qubes-gpg-client-wrapper. Like replacing "special filenames" (-&n according to manual), with /proc/self/fd/n.
--no-sk-comments --exit-on-status-write-error
Those can be easily included in the whitelist.
--ttyname --ttytype
What those options do? I don't see them in gpg2 manual. If I'm guessing correctly, it would be tricky to correctly implement them - backend (intentionally) have no access to frontend console. But it might work if you ignore those options in qubes-gpg-client-wrapper.
This should be possible to handle, but not trivial. Perhaps with a help from
Those can be easily included in the whitelist.
What those options do? I don't see them in gpg2 manual. If I'm guessing correctly, it would be tricky to correctly implement them - backend (intentionally) have no access to frontend console. But it might work if you ignore those options in |
adrelanos
changed the title from
make Qubes split-gpg compatible with reprepro
to
make Qubes split-gpg compatible with reprepro / libgpgme
Dec 1, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
grote
Dec 13, 2017
kmail is also using libgpgme and it is trying to call gpg like this:
--enable-special-filenames --batch --no-sk-comments --status-fd 52 --no-tty --charset utf8 --enable-progress-filter --exit-on-status-write-error --display :0 --ttyname /dev/pts/0 --ttytype xterm-256color --decrypt --output - -- -&54
grote
commented
Dec 13, 2017
|
kmail is also using libgpgme and it is trying to call gpg like this:
|
adrelanos commentedNov 21, 2017
reprepro (which is using libgpgme) is using the following gpg command line options which are currently rejected by Qubes split-gpg.
--enable-special-filenames--no-sk-comments--exit-on-status-write-error--ttyname--ttytype[1] [2]
Simply white listing these in
/usr/bin/qubes-gpg-client-wrapperwon't do the trick.A full example command that reprepro is using.
[1] (I learned about these by adding to
/usr/bin/qubes-gpg-client-wrapper.)[2] I haven't found an option in reprepro to configure which gpg binary to use so I replaced
/usr/bin/gpgwith/usr/bin/qubes-gpg-client-wrapper. (Of course after creating a backup of/usr/bin/gpgso I can revert it. - Or no backup - since TemplateBased AppVMs root image is conveniently reset every reboot anyhow. :) Asked the author of reprepro if such a feature exist of if he could kindly add this feature.Related:
//cc @HW42 (reprepro looks like an excellent stress test for complex uses of gpg for #474.)