/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Björn Påhlsson
  • Date: 2010-09-01 18:03:03 UTC
  • mto: (237.7.1 mandos)
  • mto: This revision was merged to the branch mainline in revision 270.
  • Revision ID: belorn@fukt.bsnet.se-20100901180303-u47edb73fczu56ob
bug fixes that prevent problems when runing server as root

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
                                       u' %(message)s'))
99
99
logger.addHandler(console)
100
100
 
101
 
multiprocessing_manager = multiprocessing.Manager()
102
 
 
103
101
class AvahiError(Exception):
104
102
    def __init__(self, value, *args, **kwargs):
105
103
        self.value = value
1321
1319
 
1322
1320
        super(MultiprocessingMixInWithPipe,
1323
1321
              self).process_request(request, client_address)
 
1322
        self.child_pipe.close()
1324
1323
        self.add_pipe(parent_pipe)
 
1324
        
1325
1325
    def add_pipe(self, parent_pipe):
1326
1326
        """Dummy function; override as necessary"""
1327
1327
        pass
1442
1442
                                       if cond & condition)
1443
1443
        logger.debug(u"Handling IPC: FD = %d, condition = %s", source,
1444
1444
                     conditions_string)
 
1445
 
 
1446
        # error or the other end of multiprocessing.Pipe has closed
 
1447
        if condition & gobject.IO_HUP or condition & gobject.IO_ERR:
 
1448
            return False
1445
1449
        
1446
1450
        # Read a request from the child
1447
1451
        request = parent_pipe.recv()
 
1452
        logger.debug(u"IPC request: %s", repr(request))
1448
1453
        command = request[0]
1449
1454
        
1450
1455
        if command == 'init':
1764
1769
    if server_settings["interface"]:
1765
1770
        service.interface = (if_nametoindex
1766
1771
                             (str(server_settings[u"interface"])))
 
1772
 
 
1773
    global multiprocessing_manager
 
1774
    multiprocessing_manager = multiprocessing.Manager()
1767
1775
    
1768
1776
    client_class = Client
1769
1777
    if use_dbus: