Re: How to find out which process is accessing the card?
Ludovic Rousseau <[email protected]> Tue, 24 Oct 2017 13:32:34 +0200
| Newsgroups | gmane.comp.lib.muscle |
|---|---|
| Message-ID | <CAGstE8DzGnG_9eQ4Jr22E7tmbmmT_ZoR_wG+8e=wghk_bGSfCg@mail.gmail.com> |
--===============4923792273234200421== Content-Type: multipart/alternative; boundary="001a11c022648dbf7b055c494cd3" --001a11c022648dbf7b055c494cd3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-10-24 10:28 GMT+02:00 Franti=C5=A1ek =C5=98ez=C3=A1=C4=8D <frantisek.r= [email protected]>: > I was surprised by your solution based on proc/maps, I expected something > more specific to the pcsc stack, but I gave it a try and I think I have > found what I'm looking for. But it wasn't straightforward so I'm sending > some notes back. > > Most importantly I was surprised how many processes are running with pcsc > lib all the time. For example I definitely wasn't expecting wpasupplicant= . > wpasupplicant has support of EAP-SIM authentication scheme. To read the SIM card it needs to use PC/SC. Those processes however were not accessing smart card at all so I had to > conduct a better analysis looking at those processes found by your tool f= or > a longer time and I found a behavior pattern which pointed to the final > offender (gdm-session-worker). So although it wasn't as simple as I would > like, your tool helped a lot, thanks. > libpcsclite can be loaded by a chain of library. My tool [1] will only give you the name of the process. I don't think it it possible to tell which library loaded libpcsclite.so.1 just at looking at the /proc/*/maps files. I am happy my (simple) tool helped you. Bye [1] https://github.com/LudovicRousseau/contrib/blob/master/list_pcsc_applicatio= ns.sh --=20 Dr. Ludovic Rousseau --001a11c022648dbf7b055c494cd3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">2017= -10-24 10:28 GMT+02:00 Franti=C5=A1ek =C5=98ez=C3=A1=C4=8D <span dir=3D"ltr= "><<a href=3D"mailto:[email protected]" target=3D"_blank">fr= [email protected]</a>></span>:<br><blockquote class=3D"gmail_q= uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2= 04);padding-left:1ex"><div dir=3D"ltr">I was surprised by your solution bas= ed on proc/maps, I expected something more specific to the pcsc stack, but = I gave it a try and I think I have found what I'm looking for. But it w= asn't straightforward so I'm sending some notes back.<div><br></div= ><div>Most importantly I was surprised how many processes are running with = pcsc lib all the time. For example I definitely wasn't expecting wpasup= plicant. </div></div></blockquote><div><br></div><div>wpasupplicant has sup= port of EAP-SIM authentication scheme. To read the SIM card it needs to use= PC/SC.<br></div><div><br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex"><div dir=3D"ltr"><div>Those processes however were not accessing sma= rt card at all so I had to conduct a better analysis looking at those proce= sses found by your tool for a longer time and I found a behavior pattern wh= ich pointed to the final offender (gdm-session-worker). So although it wasn= 't as simple as I would like, your tool helped a lot, thanks.</div></di= v></blockquote><div><br></div>libpcsclite can be loaded by a chain of libra= ry. My tool [1] will only give you the name of the process.</div><div class= =3D"gmail_quote">I don't think it it possible to tell which library loa= ded libpcsclite.so.1 just at looking at the /proc/*/maps files.<br></div></= div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">I am ha= ppy my (simple) tool helped you.</div><div class=3D"gmail_extra"><br></div>= <div class=3D"gmail_extra">Bye</div><br>[1] <a href=3D"https://github.com/L= udovicRousseau/contrib/blob/master/list_pcsc_applications.sh">https://githu= b.com/LudovicRousseau/contrib/blob/master/list_pcsc_applications.sh</a><br>= <br>-- <br><div class=3D"gmail_extra"><div class=3D"gmail_signature">=C2=A0= Dr. Ludovic Rousseau</div> </div></div> --001a11c022648dbf7b055c494cd3-- --===============4923792273234200421== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pcsclite-muscle mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle --===============4923792273234200421==--