-í žL @csƒdZdkZdkZdkZdkZdkZdkZd„Zd„Ze e d„Z e djoe 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 NcstGH|GHtidƒdS(Ni(s__doc__smsgssyssexit(smsg((s5/usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pysusage*scsźy+ti|dddddgƒ\} }Wn"tij o} t| ƒnXt}d} t}d}t}x | D]\}} |djp |d joOtiitiitiƒd ƒ} ti| ƒ}ti|| ƒ\}}n|d jp |d jo d } n|djp |djo | }n|djp |djo | }n|djp |djo | }nquW|tj oD|p|otdƒn|ii}|ii}|ii}n|o| otdƒnt}| oE| otdƒn"t|ƒd jotdƒn|d}ne| otdƒnOt|ƒdjotdƒn.t|ƒd jo|d}n |\}}|||| ||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 st|ƒ\}}}} }}|tjot dƒn|djodk l }n=|djodk l}n|o |}ntd|‚|tjot dƒn|||ƒ}| o|i|ƒn1|tjotidƒ}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