-í
žL@c       sŞ     d  Z    " d k Z # d k Z $ d k Z % d k Z ' d k Z ( d k Z * d   Z / d   Z h e	 e	 d  Z
  e d j o  e
 e i d  n d S(   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
Nc    s'   * + t  GH, |  GH- t i d  d  S(   Ni   (   s   __doc__s   msgs   syss   exit(   s   msg(    (    s5   /usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pys   usage* s   c    sO  / 0 1 y. 2 t  i  |  d d d d d g  \ } }  Wn( 6 t  i j
 o }
 7 t |
  n X8 t } 9 d } : t } ; d } < t } = x7| D= ],\ } }	 > | d j p
 | d	 j o[ ? t i i t i i t i  @ d
  } A t i |  } B t i | |	  \ } } n C | d j p
 | d j o D d } n E | d j p
 | d j o F |	 } n G | d j p
 | d j o H |	 } n I | d j p
 | d j o J |	 } n q WL | t j	 oS M | p | o N t d  n O | i i } P | i i } Q | i i } n$ R | o | o S t d  n U t } V | oT W |  o X t d  n( Y t |   d j o Z t d  n [ |  d } nz ] |  o ^ t d  n^ _ t |   d j o ` t d  n7 a t |   d j o b |  d } n d |  \ } } f | | | | | | f Sd S(   s>   Password-specific options loaded from regular ZEO config file.s	   dr:p:f:C:s
   configure=s	   protocol=s	   filename=s   realmi    s    s   -Cs   --configures
   schema.xmls   -ds   --deletei   s   -ps
   --protocols   -fs
   --filenames   -rs   --realms8   Error: Conflicting options; use either -C *or* -p and -fs@   Error: Must specifiy configuration file or protocol and databases(   Error: Must specify a username to deletes   Error: Too many argumentss   Error: Must specify a usernamei   N(!   s   getopts   argss   optss   errors   msgs   usages   Nones   configs   deletes   auth_protocols   auth_dbs
   auth_realms   ks   vs   oss   paths   joins   dirnames   ZEOs   __file__s
   schemafiles   ZConfigs
   loadSchemas   schemas
   loadConfigs   nils   zeos   authentication_protocols   authentication_databases   authentication_realms   passwords   lens   username(   s   argss   usernames   nils
   auth_realms   auth_dbs   passwords   auth_protocols   configs   ks   vs   msgs   deletes
   schemafiles   optss   schema(    (    s5   /usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pys   options/ s`   .					
 	
c 
   sO  h i t  |   \ } } } }	 } } j | t j o k t	 d  n l | d j o m d k
 l } nL n | d j o o d k l } n( p | o r | } n t t d |  u | t j o v t	 d  n w | | |  } x |	 o y | i |  n: { | t j o | t i d  } n } | i | |  ~ | i   d  S(	   Ns3   Error: configuration does not specify auth protocols   digest(   s   DigestDatabases   srp(   s   SRPDatabases   Unknown database type %rs3   Error: configuration does not specify auth databases   Enter password: (   s   optionss   argss   ps   auth_dbs
   auth_realms   deletes   usernames   passwords   Nones   usages   ZEO.auth.auth_digests   DigestDatabases   Databases   ZEO.auth.auth_srps   SRPDatabases   dbclasss
   ValueErrors   dbs   del_users   getpasss   add_users   save(
   s   argss   dbclasss   usernames   Databases
   auth_realms   dbs   auth_dbs   ps   passwords   delete(    (    s5   /usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pys   mainh s&   !

s   __main__i   (   s   __doc__s   getopts   getpasss   syss   oss   ZConfigs   ZEOs   usages   optionss   Nones   mains   __name__s   argv(	   s   syss   ZEOs   ZConfigs   getpasss   getopts   usages   mains   oss   options(    (    s5   /usr/pkg/lib/python2.2/site-packages/ZEO/zeopasswd.pys   ?  s   9