Bug 1156518 - The kwalldetd5 tries to open not exising device with an error instead of asking the passphrase
Summary: The kwalldetd5 tries to open not exising device with an error instead of aski...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: KDE Applications (show other bugs)
Version: Current
Hardware: All openSUSE Factory
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Fabian Vogt
QA Contact: E-mail List
URL:
Whiteboard:
Keywords: dogfood
Depends on:
Blocks:
 
Reported: 2019-11-12 09:40 UTC by Dr. Werner Fink
Modified: 2019-11-13 17:14 UTC (History)
4 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
fvogt: needinfo? (werner)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Werner Fink 2019-11-12 09:40:39 UTC
The kwalletd5 tries to open a not exising device which it should not do!
How to fix this?  Is there any workaround to be able to use osc again?

+++ This bug was initially created as a clone of Bug #1156501 +++

Latest Tumbleweed cause that osc triggers the start of kwalletd5 and this leads to an error

| Error when attempting to decrypt the wallet kdewallet using GPG. If you're 
| using a SmartCard, please ensure it's inserted then try again.
|
| GPG error was Inappropriate ioctl for device

That is I can not set my passphrase anymore.  I'm not using KDE, I'm a fvwm2+lsxession user.

Without passphrase I can not work on my Tumblweed workstation anymore hence this is critical
Comment 1 Dr. Werner Fink 2019-11-12 13:23:59 UTC
Why does kwallted5 try to open a device which does not exist?  Waht have to be done to avoid this.  There exists no manual page at all.
Comment 2 Neil Rickert 2019-11-12 15:26:39 UTC
I get exactly that error (on Tumbleweed) when I am logged into Plasma Wayland and I do something that requires kwallet.

However:  I only see that if I am using "lightdm" to start the Plasma session.  I so not see that with either "sddm" or "gdm".  I am suspecting a "lightdm" bug of some kind.

I'll add: all is fine in either Plasma Wayland or Plasma Full Wayland if I use "sddm" or "gdm".  With "lightdm" I am unable to get into Plasma Full Wayland (see bug 1156232 ).  With Plasma X11, all is fine even with "lightdm" to login.
Comment 3 Dr. Werner Fink 2019-11-13 06:48:56 UTC
The problem seems to be that gmone-keyring (what I'm using) is incompatible with the wallet format used by kwalletd5.  I'd really like to ask why this is so?  Nevertheless the problem with osc was (now this seems to be fixed) that the gnome-keyring method was not triggered by the python code which then leads to the remaining keyring provided by kwalletd5.
Comment 4 Fabian Vogt 2019-11-13 07:51:23 UTC
(In reply to Dr. Werner Fink from comment #3)
> The problem seems to be that gmone-keyring (what I'm using) is incompatible
> with the wallet format used by kwalletd5.  I'd really like to ask why this
> is so?

Those are entirely different projects and also entirely independent formats. Why should they be incompatible? It makes no sense to have both installed.

Back to the original issue: It appears like you set up a GPG kwallet some time ago, but GnuPG is unable to open that meanwhile.

I assume you're not interested in debugging this issue further now, as you're not actually using kwallet?
Comment 5 Fabian Vogt 2019-11-13 07:59:11 UTC
Typo, that should be:

> Those are entirely different projects and also entirely independent formats.
> Why should they be compatible? It makes no sense to have both installed.
Comment 6 Dr. Werner Fink 2019-11-13 08:08:23 UTC
(In reply to Fabian Vogt from comment #4)
> (In reply to Dr. Werner Fink from comment #3)
> > The problem seems to be that gmone-keyring (what I'm using) is incompatible
> > with the wallet format used by kwalletd5.  I'd really like to ask why this
> > is so?
> 
> Those are entirely different projects and also entirely independent formats.
> Why should they be incompatible? It makes no sense to have both installed.
> 
> Back to the original issue: It appears like you set up a GPG kwallet some
> time ago, but GnuPG is unable to open that meanwhile.
> 
> I assume you're not interested in debugging this issue further now, as
> you're not actually using kwallet?

Ohmmm ... up to yesterday I never ever used kwalletd<x=4,5> at all.  This program becomes installed automagic.  And also up to yesterdaxy I never installed pam_kwallet due to the caused error message about a missed SmartCard at login[1]

Now I've created for a test an empty wallet ~/.local/share/kwalletd/Passwords.kwl with its ~/.local/share/kwalletd/Passwords.salt but found no way to store the keyring from gnome-keyring therein.

IMHO even if different projects and also entirely independent formats there should be a way to switch from kwallet format to gnome-keyring and also back on the fly.  Simply to be able to e.g. switch the desktop on the fly.

[1] Beside this I'd like to see that pam_kwallet + kwalletd5 do not cause an 
error message about missed SmartCard.  If there is no SmartCard then do not trigger an ioctl and be silent at all!  This would help a lot in mixed environments where user A used KDE/plasma and an other user B uses GNOME tools or a GNOME desktop (just like at home where my dauther as well as my wife uses plasma and I use fvwm2+lxsession+gnome tools)
Comment 7 Neil Rickert 2019-11-13 13:56:49 UTC
Responding to comment #4
>Back to the original issue: It appears like you set up a GPG kwallet 
>some time ago, but GnuPG is unable to open that meanwhile.

I can reproduce that problem.  It occurs when I use "lightdm" for display-manager and I login to a Plasma Wayland session.  It seems more likely to be a "lightdm" bug than a Plasma bug.
Comment 8 Dr. Werner Fink 2019-11-13 14:02:54 UTC
(In reply to Neil Rickert from comment #7)
> Responding to comment #4
> >Back to the original issue: It appears like you set up a GPG kwallet 
> >some time ago, but GnuPG is unable to open that meanwhile.
> 
> I can reproduce that problem.  It occurs when I use "lightdm" for
> display-manager and I login to a Plasma Wayland session.  It seems more
> likely to be a "lightdm" bug than a Plasma bug.

I'm using sddm and standard Xorg server, no wayland.  And IMHO this is a bug of kwalletd5 (or pam_kwallet module if installed) as an ioctl on an none exisintg device is IMHO a bug.  With pam_kwallet the error happens at login, without pam_kwallet the error happens at start of kwalletd5.
Comment 9 Neil Rickert 2019-11-13 17:14:04 UTC
I am pretty sure that this is a "gpg" problem, rather than a "kwallet" problem.  When you try to open "kwallet", it is just reporting the error it gets from "gpg".

In the situation where I can repeat this issue (using "lightdm" with Plasma Wayland), I get the same error if I try to decrypt a file with "gpg" at the command line (in an "xterm").  And that does not involve "kwallet" at all.

I notice that "lightdm" is starting "gpg-agent".  Neither "sddm" nor "gdm" does that when using Plasma Wayland.  So  I suppressed that.  I renamed ".gnupg" to ".gnupg.old" on a command line login (tty1).  I then did a GUI login, and "gpg-agent" was not started (as expected).  I now renamed ".gnupg.old" back to ".gnupg".  And, after that, kwallet opens normally.  So it looks as if "lightdm" is starting "gpg-agent" in a way that is incompatible with Wayland.

Maybe you are starting "gpg-agent" in a shell startup script.  Check how you are doing that.  Perhaps it is attempting to use a version of "pinentry" which is incompatible with your session.