-í
ž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 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|  GHt 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    sź  y+ t  i  |  d d d d d g  \ } }  Wn" t  i j
 o }
 t |
  n Xt } d } t } d } t } x| D]\ } }	 | d j p
 | d	 j oO t i i t i i t i  d
  } t i |  } t i | |	  \ } } n | d j p
 | d j o
 d } n | d j p
 | d j o
 |	 } n | d j p
 | d j o
 |	 } n | d j p
 | d j o
 |	 } n qu W| t j	 oD | p | o t d  n | i i } | i i } | i i } n | o | o t d  n t } | oE |  o t d  n" t |   d j o t d  n |  d } ne |  o t d  nO t |   d j o t d  n. t |   d j o |  d } n |  \ } } | | | | | | 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 
   s  t  |   \ } } } }	 } } | t j o t	 d  n | d j o d k
 l } n= | d j o d k l } n | o
 | } n t d |  | t j o t	 d  n | | |  } |	 o | i |  n1 | 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