Ejemplo n.º 1
0
    def __init__(self, cfg=None):
        self.config = cfg
        if self.config is None:
            self.config = config.Config()
        self.cache = Password_Cache(self.config)
        self.fifo = password_ipc.FIFO(self.config.passwordCacheFifo())
        self.db = {}

        self.keyringSupported = tools.keyringSupported()
Ejemplo n.º 2
0
    def __init__(self, cfg = None):
        self.config = cfg
        if self.config is None:
            self.config = config.Config()
        self.cache = Password_Cache(self.config)
        self.fifo = password_ipc.FIFO(self.config.passwordCacheFifo())
        self.db = {}

        self.keyringSupported = tools.keyringSupported()
Ejemplo n.º 3
0
    def __init__(self, cfg=None, *args, **kwargs):
        self.config = cfg
        if self.config is None:
            self.config = config.Config()
        cachePath = self.config.passwordCacheFolder()
        if not tools.mkdir(cachePath, 0o700):
            msg = 'Failed to create secure Password_Cache folder'
            logger.error(msg, self)
            raise PermissionError(msg)
        pid = self.config.passwordCachePid()
        super(Password_Cache, self).__init__(pid, *args, **kwargs)
        self.dbKeyring = {}
        self.dbUsr = {}
        self.fifo = password_ipc.FIFO(self.config.passwordCacheFifo())

        self.keyringSupported = tools.keyringSupported()
Ejemplo n.º 4
0
    def __init__(self, cfg = None, *args, **kwargs):
        self.config = cfg
        if self.config is None:
            self.config = config.Config()
        cachePath = self.config.passwordCacheFolder()
        if not tools.mkdir(cachePath, 0o700):
            msg = 'Failed to create secure Password_Cache folder'
            logger.error(msg, self)
            raise PermissionError(msg)
        pid = self.config.passwordCachePid()
        super(Password_Cache, self).__init__(pid, umask = 0o077, *args, **kwargs)
        self.dbKeyring = {}
        self.dbUsr = {}
        self.fifo = password_ipc.FIFO(self.config.passwordCacheFifo())

        self.keyringSupported = tools.keyringSupported()