-í žL @csŞdZ "dkZ#dkZ$dkZ%dkZ'dkZ(dkZ*d„Z/d„Zhe e d„Z €e djoe ei dƒndS(sŐUpdate a user's authentication tokens for a ZEO server. usage: python zeopasswd.py [options] username [password] Specify either a configuration file: -C/--configuration -- ZConfig configuration file or the individual options: -f/--filename -- authentication database filename -p/--protocol -- authentication protocol name -r/--realm -- authentication database realm Additional options: -d/--delete -- delete user instead of updating password Ncs'*+tGH,|GH-tidƒdS(Ni(s__doc__smsgssyssexit(smsg((s5/usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pysusage*scsO/01y.2ti|dddddgƒ\} }Wn(6tij o} 7t| ƒnX8t}9d} :t};d}<t}=x7| D=],\}} >|djp |d jo[?tiitiitiƒ@d ƒ} Ati| ƒ}Bti|| ƒ\}}nC|d jp |d jo Dd } nE|djp |djo F| }nG|djp |djo H| }nI|djp |djo J| }nq™WL|tj oSM|p|oNtdƒnO|ii}P|ii}Q|ii}n$R|o| oStdƒnUt}V| oTW| oXtdƒn(Yt|ƒd joZtdƒn[|d}nz]| o^tdƒn^_t|ƒdjo`tdƒn7at|ƒd job|d}nd|\}}f|||| ||fSdS(s>Password-specific options loaded from regular ZEO config file.s dr:p:f:C:s configure=s protocol=s filename=srealmiss-Cs --configures schema.xmls-ds--deleteis-ps --protocols-fs --filenames-rs--realms8Error: Conflicting options; use either -C *or* -p and -fs@Error: Must specifiy configuration file or protocol and databases(Error: Must specify a username to deletesError: Too many argumentssError: Must specify a usernameiN(!sgetoptsargssoptsserrorsmsgsusagesNonesconfigsdeletes auth_protocolsauth_dbs auth_realmsksvsosspathsjoinsdirnamesZEOs__file__s schemafilesZConfigs loadSchemasschemas loadConfigsnilszeosauthentication_protocolsauthentication_databasesauthentication_realmspasswordslensusername(sargssusernamesnils auth_realmsauth_dbspasswords auth_protocolsconfigsksvsmsgsdeletes schemafilesoptssschema((s5/usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pysoptions/s`.              c sOhit|ƒ\}}}} }}j|tjokt dƒnl|djomdk l }nLn|djoodk l}n(p|o r|}nttd|‚u|tjovt dƒnw|||ƒ}x| oy|i|ƒn:{|tjo|tidƒ}n}|i||ƒ~|iƒdS( Ns3Error: configuration does not specify auth protocolsdigest(sDigestDatabasessrp(s SRPDatabasesUnknown database type %rs3Error: configuration does not specify auth databasesEnter password: (soptionssargsspsauth_dbs auth_realmsdeletesusernamespasswordsNonesusagesZEO.auth.auth_digestsDigestDatabasesDatabasesZEO.auth.auth_srps SRPDatabasesdbclasss ValueErrorsdbsdel_usersgetpasssadd_userssave( sargssdbclasssusernamesDatabases auth_realmsdbsauth_dbspspasswordsdelete((s5/usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pysmainhs&!   s__main__i( s__doc__sgetoptsgetpassssyssossZConfigsZEOsusagesoptionssNonesmains__name__sargv( ssyssZEOsZConfigsgetpasssgetoptsusagesmainsossoptions((s5/usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pys? s         9