ó [³XMc@stdZddlZddlZddlZddlZddlmZmZd„Zd„Z d„Z d„Z dS(s6 Support for asynchronously authenticating using PAM. iÿÿÿÿN(tthreadstdefercs‡fd†}t|||ƒS(NcsÁddlm}yˆ|ƒ}Wnddl}|jƒdSXtjƒ‰‡fd†}‡fd†}|j|j||ƒˆjƒˆj }|dr¦|dS|dj |dj ‚dS(Niÿÿÿÿ(treactorcsd|fˆ_ˆjƒdS(Ni(trtset(R(tev(s8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pytcbscsd|fˆ_ˆjƒdS(Ni(RR(te(R(s8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pytebsii( ttwisted.internetRt tracebackt print_exct threadingtEventtcallFromThreadt addCallbackstwaitRttypetvalue(titemsRtdR RRtdone(tconv(Rs8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pyt_convs       (t callIntoPAM(tservicetuserRR((Rs8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pytpamAuthenticateThreadscCs¯tjƒ}|j|ƒ|jtj|ƒ|jtj|ƒtjƒ}tjƒ}tj dƒtj dƒz|j ƒ|j ƒdSWdtj |ƒtj |ƒXdS(sA testing hook. iiN( tPAMtpamtstarttset_itemtPAM_USERtPAM_CONVtostgetegidtgeteuidtsetegidtseteuidt authenticatet acct_mgmt(RRRRtgidtuid((s8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pyR)s         cCsÓg}x·tt|ƒƒD]£}||\}}|dkr`tj|ƒ}|j|dfƒq|dkrŽt|ƒ}|j|dfƒq|dkr¯|GH|jd ƒqtjdƒSqWtj|ƒ}|S( Niiiiittfoo(ii(R+i(trangetlentgetpasstappendt raw_inputRtfailtsucceed(RtresptitmessagetkindtpR((s8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pytdefConv<s    cCstjt|||ƒS(N(Rt deferToThreadR(RRR((s8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pytpamAuthenticateNs( t__doc__RR/R R"R RRRRR9R;(((s8/usr/lib/python2.7/dist-packages/twisted/cred/pamauth.pyts $