Exemple #1
0
 def out_of_band(self, msg):
     if msg[0] == Message.LOG:
         # (LOG, level, message)
         LOG.log(msg[1], msg[2])
     else:
         LOG.warning(_LW('Ignoring unexpected OOB message from privileged '
                         'process: %r'), msg)
Exemple #2
0
 def out_of_band(self, msg):
     if msg[0] == Message.LOG:
         # (LOG, level, message)
         LOG.log(msg[1], msg[2])
     else:
         LOG.warning(
             _LW('Ignoring unexpected OOB message from privileged '
                 'process: %r'), msg)
    def start(self, method=Method.ROOTWRAP):
        if self.channel is not None:
            LOG.warning(_LW('privsep daemon already running'))
            return

        if method is Method.ROOTWRAP:
            channel = daemon.RootwrapClientChannel(context=self)
        elif method is Method.FORK:
            channel = daemon.ForkingClientChannel(context=self)
        else:
            raise ValueError('Unknown method: %s' % method)

        self.channel = channel
Exemple #4
0
    def start(self, method=Method.ROOTWRAP):
        if self.channel is not None:
            LOG.warn(_LW('privsep daemon already running'))
            return

        if method is Method.ROOTWRAP:
            channel = daemon.RootwrapClientChannel(context=self)
        elif method is Method.FORK:
            channel = daemon.ForkingClientChannel(context=self)
        else:
            raise ValueError('Unknown method: %s' % method)

        self.channel = channel