For new tickets please use the main OpenSC Trac (direct link)

Ticket #29 (closed defect: fixed)

Opened 18 months ago

Last modified 18 months ago

pam_pkcs11 argument parsing is wrong

Reported by: halfline Owned by: somebody
Priority: normal Milestone:
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

There was a change made to the argument parsing here:

http://www.opensc-project.org/pam_pkcs11/changeset/301/trunk/src/pam_pkcs11/pam_config.c

that means the first argument given to pam_pkcs11 will always be ignored.

I will attach a better fix.

Attachments

pam_pkcs11-0.6.2-fix-arg-parsing.patch Download (1.4 KB) - added by halfline 18 months ago.
Don't skip first argument to pam module, do skip first argument to pkcs11_inspect
pam_pkcs11-0.6.2-fix-arg-parsing.2.patch Download (2.9 KB) - added by halfline 18 months ago.
Fix pklogin_finder and ls

Change History

Changed 18 months ago by halfline

Don't skip first argument to pam module, do skip first argument to pkcs11_inspect

comment:1 follow-up: ↓ 2 Changed 18 months ago by ludovic

Does your patch solve a problem?

Or is it just a better version of the same algorithm?

comment:2 in reply to: ↑ 1 Changed 18 months ago by halfline

Replying to ludovic:

Does your patch solve a problem?

Yes, without my patch the first argument passwed to pam_pkcs11 is ignored. This breaks login, if login depends on that argument getting passed to pam_pkcs11.

Or is it just a better version of the same algorithm?

The original patch was trying to fix pkcs11_inspect. It did this by breaking pam_pkcs11. My patch fixes pkcs11_inspect and keeps pam_pkcs11 working.

Changed 18 months ago by halfline

Fix pklogin_finder and ls

comment:3 Changed 18 months ago by halfline

the latest attachment was supposed to say "fix pklogin_finder and pkcs11_listcerts as well" but I hit enter on accident.

comment:4 Changed 18 months ago by ludovic

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in revision r441 Thanks for the patch.

Note: See TracTickets for help on using tickets.