Bug 999297 - Username/Password not stored with smbspool backend
Username/Password not stored with smbspool backend
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: system-config-printer (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 02:12 EDT by Marcus Moeller
Modified: 2014-03-30 02:03 EDT (History)
6 users (show)

See Also:
Fixed In Version: system-config-printer-1.4.4-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-30 02:03:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix to actually request authentication information. (1.05 KB, patch)
2013-10-22 06:50 EDT, Andre Heinecke
no flags Details | Diff
Fix to retrive items from the keyring (1.18 KB, patch)
2013-10-22 06:51 EDT, Andre Heinecke
no flags Details | Diff
Adapt usage of new API (3.47 KB, patch)
2013-10-22 06:56 EDT, Andre Heinecke
no flags Details | Diff
0001-Factor-out-username-password-lookup-for-reuse (11.07 KB, patch)
2013-11-29 04:03 EST, Andre Heinecke
no flags Details | Diff
0002-Add-show_dialog-option-to-get_authentication (2.10 KB, patch)
2013-11-29 04:04 EST, Andre Heinecke
no flags Details | Diff
0003-Use-keyring-authentication-also-from-menu (2.03 KB, patch)
2013-11-29 04:05 EST, Andre Heinecke
no flags Details | Diff

  None (edit)
Description Marcus Moeller 2013-08-21 02:12:52 EDT
Description of problem:
I have set up a smb connected printer using system-config-printer. During setup, I was asked to choose between storing the password or prompting for it during printing. I have selected to prompt for it, as when you select store, it will we stored plaintext in /etc/cups/printers.conf.

Afterwards I have printed a file and authenticated. Within this dialog I have selected the option 'remember password'. As from what I can see in:

/usr/share/system-config-printer/jobviewer.py

this should use gnome-keyring for storing the credentials (which would be great).

Sadly, no gnome-keyring entry is created, and I am prompted for username/password again, everytime I am trying to print.


Version-Release number of selected component (if applicable):
1.4.1
Comment 1 Andre Heinecke 2013-10-22 06:50:53 EDT
Created attachment 814931 [details]
Fix to actually request authentication information.

Currently the Gnome Keyring is only used to store / retrive authentication information if the jobviewer is run as an applet and not if it is run directory from system-config-printer. The explicit "Authenticate Job" menu entry also ignores the keyring.

Additionally the support gnome keyring integration in applet mode is not working since the GIR conversion (68a307f) as there were slight API changes and the actual call to add credentials to the keyring still used the old module name which is no longer imported.

This was probably not noticed because the check if authentication should be requested used the wrong key and thus never asked for authentication.

I'm attaching patches to fix the usage of gnome-keyring in applet mode. The next step to improve this issue would then be to also use gnome keyring when running standalone and when "Authenticate Job" is requested from the menu.
Comment 2 Andre Heinecke 2013-10-22 06:51:48 EDT
Created attachment 814932 [details]
Fix to retrive items from the keyring
Comment 3 Andre Heinecke 2013-10-22 06:56:42 EDT
Created attachment 814934 [details]
Adapt usage of new API

This is the last patch in this series.

Tested on a Fedora 19 System

Please let me know if you prefer another form of the patches.
Comment 4 Tim Waugh 2013-10-22 07:59:23 EDT
Thanks very much! Applied.
Comment 5 Fedora Update System 2013-10-22 12:55:10 EDT
system-config-printer-1.4.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/system-config-printer-1.4.3-1.fc20
Comment 6 Fedora Update System 2013-10-22 12:57:25 EDT
system-config-printer-1.4.3-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-config-printer-1.4.3-1.fc19
Comment 7 Fedora Update System 2013-10-22 23:30:00 EDT
Package system-config-printer-1.4.3-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.4.3-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19726/system-config-printer-1.4.3-1.fc19
then log in and leave karma (feedback).
Comment 8 Marcus Moeller 2013-10-24 06:26:07 EDT
@Tim, please note that the patchset is only an initial step and a few more have to follow. Could you please add python-smbc as dependency as otherwise I got a  NameError: global name 'pysmb' is not defined
Comment 9 Tim Waugh 2013-10-24 06:39:50 EDT
Thanks, noted.

'pysmb' is part of system-config-printer-libs, so if you're seeing that error it indicates a problem within system-config-printer rather than a missing dependency. Could you please file a separate bug report if you can reproduce it? Thanks.
Comment 10 Marcus Moeller 2013-10-24 07:24:09 EDT
At least installing python-smbc solved the problem.
Comment 11 Tim Waugh 2013-10-24 08:14:17 EDT
Wonder if you're talking about the issue I just fixed upstream in commit 55c2eb5? python-smbc is deliberately not required by system-config-printer (see bug #921132).
Comment 12 Fedora Update System 2013-11-06 02:38:38 EST
system-config-printer-1.4.3-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Marcus Moeller 2013-11-06 02:40:24 EST
re-opening: As commented earlier, the patchset is only an initial step to fix the problem, I have reported.
Comment 14 Fedora Update System 2013-11-10 02:43:39 EST
system-config-printer-1.4.3-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Andre Heinecke 2013-11-29 04:01:01 EST
I've prepared patches to also fix saving the credentials when the jobviewer is not run as an applet and you manually select "authenticate" from the menu. Previously this would just show the authenticate dialog and forget the credentials even if you checked "remember password".

Patch 1 factors out the keyring lookup from update-job into its own function so that it can be reused.

Patch 2 enables update-job to silently look in the keyring (without showing the authenticate dialog) when it is not run as an applet. So that remember password works also in that mode.

Patch 3 Adds the keyring usage to authenticate job when called directly from the menu.


I think this should fix all problems mentioned in this report.
Comment 16 Andre Heinecke 2013-11-29 04:03:29 EST
Created attachment 830534 [details]
0001-Factor-out-username-password-lookup-for-reuse

This is the first patch mentioned in Comment 15
Comment 17 Andre Heinecke 2013-11-29 04:04:22 EST
Created attachment 830535 [details]
0002-Add-show_dialog-option-to-get_authentication

This is the second patch mentioned in comment 15
Comment 18 Andre Heinecke 2013-11-29 04:05:18 EST
Created attachment 830537 [details]
0003-Use-keyring-authentication-also-from-menu

This is the third and final patch mentioned in comment 15
Comment 19 Tim Waugh 2013-11-29 04:39:49 EST
Thank you very much! Applied upstream.
Comment 20 Fedora Update System 2014-03-17 05:11:00 EDT
system-config-printer-1.4.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/system-config-printer-1.4.4-1.fc20
Comment 21 Fedora Update System 2014-03-18 04:15:01 EDT
Package system-config-printer-1.4.4-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.4.4-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4014/system-config-printer-1.4.4-1.fc20
then log in and leave karma (feedback).
Comment 22 Fedora Update System 2014-03-30 02:03:24 EDT
system-config-printer-1.4.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.