-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pth] Hack pth to avoid segfault in pth_sigmask. #1
base: master
Are you sure you want to change the base?
Conversation
The pth_current seems to be ill-defined in gpg-agent, resulting in a segfault.
Uh... seems tricky. Good thing is that pth seems to be used only by dirmngr and gnupg2 so any breakage is at least restricted. Bad thing is that the patch removes half of what the function was doing and thus might cause other problems. For the actual bug, set=0x3cc doesn't look good indeed. At least the pth_current doesn't get assigned in many places so could hope there's some chance on finding the real problem. |
Actually, I tried to see where The best way to go would be update to We have two choices here to solve the high level issue of email signing being broken :
The first one was suggested by @Thaodan and is cleaner in my opinion, and closer to how it is working on desktop. In fact modern GnuPG (when allowed) is putting its sockets in the /run/user directory in a subdir, and supervised by systemd out of the box. The second avoids patching What do you think ? |
Personally I would prefer first since all the arguments you have been already bringing up and separation is cleaner in the first approach since the process should be separated from gnupg especially when you consider that more apps could take to GNUPG at the same time. |
To get the latest GnuPG, we need to upgrade pth to npth. I've packages it in https://github.com/dcaliste/npth. I don't know who can create a new repo in sailfishos. @Thaodan and @pvuorela, any idea ? |
The pth_current seems to be ill-defined in gpg-agent, resulting in a segfault.
@Thaodan and @pvuorela , this is a very ugly fix to a segfault appearing in GnuPG agent. Let me detail:
gpg-agent
when run in daemon mode (which was suggested by @Thaodan in [sailfish-secrets] Put the P2P DBus socket in a sub-directory of /run. Contributes to JB#56300 sailfish-secrets#178) is segfaulting on start-up. To reproduce, just run in a consolegpg-agent --daemon --verbose
. It will print the socket address for communication, but the child process actually segfault, as visible withgdb
:pth
library, but I didn't find the root cause of the problem. My best guess is thatpth_current
is not properly initialised.Now, looking at how they solved this in more modern versions of GnuPG brings me nowhere since GnuPG moved from this
pth
library to a new onenpth
with a different API.pth
library 2.0.7 is the last one that exists and seems discontinued.I've no idea if the following patch would break something actually. But at least the
gpg-agent
is now running, can be contacted from inside a jail and can open a lipstick system window asking for a password.What do you think ?