/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor
NameSizeModeActions
engines/-0755rm
hacks/-0755rm
account.py25460755editdlrm
account.pyc34320644editdlrm
client.py108140755editdlrm
client.pyc138220644editdlrm
config.py91670755editdlrm
config.pyc86650644editdlrm
digest.py58790755editdlrm
digest.pyc68260644editdlrm
forwarder.py25680755editdlrm
forwarder.pyc31150644editdlrm
message.py40230755editdlrm
message.pyc96410644editdlrm
server.py157770755editdlrm
server.pyc173190644editdlrm
__init__.py14100755editdlrm
__init__.pyc26530644editdlrm
Edit: /usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/config.pyc (8665B)
Ñò H<Vc @sÐdZddkZddkZddkZddkZyddklZeZWne j o e ZnXddk Z ei dƒZd„Zd„Zd„Zd„Zd „Zdd d „Zd „ZdS( s8Functions that handle parsing pyzor configuration files.iÿÿÿÿN(t SentryHandlers((?<=[^\\])#.*)cCsftidƒ}titƒ}tii|ƒp%|idƒtdƒ|t i <|St |ƒ}xã|D]Û}|i ƒ p|dd joqinyCg}|i d ƒD]}||iƒi ƒq¬~\}} } Wn&tj o|id |ƒqinXyhtd 6td 6| } Wn&tj o|id |ƒqinX|djo d}n.g} |i ƒD]} | | i ƒqn~ }| djo |} n.g} | i ƒD]}| |i ƒq²~ } xs| D]k}| o1|iddi|ƒ|ƒ||i|ƒqÕ|iddi|ƒ|ƒ||i|ƒqÕWqiW|iƒ|id|ƒ|S(säLoad the ACL from the specified file, if it exists, and return an ACL dictionary, where each key is a username and each value is a set of allowed permissions (if the permission is not in the set, then it is not allowed). 'accounts' is a dictionary of accounts that exist on the server - only the keys are used, which must be the usernames (these are the users that are granted permission when the 'all' keyword is used, as described below). Each line of the file should be in the following format: operation : user : allow|deny where 'operation' is a space-separated list of pyzor commands or the keyword 'all' (meaning all commands), 'username' is a space-separated list of usernames or the keyword 'all' (meaning all users) - the anonymous user is called "anonymous", and "allow|deny" indicates whether or not the specified user(s) may execute the specified operations. The file is processed from top to bottom, with the final match for user/operation being the value taken. Every file has the following implicit final rule: all : all : deny If the file does not exist, then the following default is used: check report ping info : anonymous : allow tpyzordsXUsing default ACL: the anonymous user may use the check, report, ping and info commands.tchecktreporttpingtpongtinfoit#t:sInvalid ACL line: %rtallowtdenytallt whitelistsGranting %s to %s.t,sRevoking %s from %s.sACL: %r(scheckRRRsinfo(scheckRRRsinfos whitelist(tloggingt getLoggert collectionst defaultdicttsettostpathtexistsRtpyzortanonymous_usertopentstriptsplittlowert ValueErrortwarntTruetFalsetKeyErrortdebugtjointupdatetdifference_updatetclose(t access_fntaccountstlogtacltaccessftlinet_[1]tpartt operationstuserstallowedt_[2]t operationt_[3]tuser((sF/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/config.pytload_access_filesR  <  &  - cCstidƒ}h}tii|ƒp|idƒ|St|ƒ}x«|D]£}|iƒ p|ddjoqMny|idƒ\}}Wn&t j o|i d|ƒqMnX|iƒ}|iƒ}|i d||ƒ||||D]6}tid|ƒi ƒ}|o|i |ƒqNqNWWdQX|S(s Load the local digest skip file.tN( RRRRRRLRMt _COMMENT_PtsubRtadd(R@R R,RTR+((sF/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/config.pytload_local_whitelistÃs #tWARNc Cstidƒ}tiƒ}|oti}ti}nti}ti}ti|ƒ} | i|ƒ|i|ƒ|i|ƒ| i |ƒ|o:ti |ƒ} | i|ƒ| i|ƒ| i | ƒn|o@t o9t t|ƒ} t |ƒ} | i| ƒ| i | ƒn| S(sTSetup logging according to the specified options. Return the Logger object. s3%(asctime)s (%(process)d) %(levelname)s %(message)s(Rt Formattert StreamHandlertDEBUGtCRITICALtINFORtsetLevelt setFormattert addHandlert FileHandlert _has_raventgetattrR( tlog_nameR@R!t sentry_dsnt sentry_lvltfmttstream_handlertstream_log_leveltfile_log_levelRRt file_handlert sentry_leveltsentry_handler((sF/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/config.pyt setup_loggingÓs.             cCs†x|D]w}|i||ƒ}|pqntii|ƒ}tii|ƒptii||ƒ}n|i|||ƒqWdS(s5Set the full file path for these configuration files.N(tgetRRt expandusertisabsR"R(t homefilestcategorythomedirtconfigtfilenameR@((sF/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/config.pytexpand_homefilesús(t__doc__RRNRRtraven.handlers.loggingRRRet ImportErrorRt pyzor.accountRtcompileRWR5R9RKRURZtNoneRqRz(((sF/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/config.pyts&        O # )   &