/mandos/trunk

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

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2013-10-28 08:38:47 UTC
  • Revision ID: teddy@recompile.se-20131028083847-cper3srg5o29r2ge
Use architecture libdir.

Instead of always using /usr/lib/mandos, use whatever the architecture
specifies, like /usr/lib/x86_64-linux-gnu/mandos or /usr/lib64/mandos.
Still use /usr/lib/mandos as a fallback.

* Makefile (LIBDIR): New.
 (install-client-nokey, uninstall-client): Use LIBDIR instead of
                                           $(PREFIX)/lib.
* initramfs-tools-hook: Detect correct libdir and copy from there.

Reported-by: Nathanael D. Noblet <nathanael@gnat.ca>
Suggested-by: Nathanael D. Noblet <nathanael@gnat.ca>

Show diffs side-by-side

added added

removed removed

Lines of Context:
690
690
        # If a checker exists, make sure it is not a zombie
691
691
        try:
692
692
            pid, status = os.waitpid(self.checker.pid, os.WNOHANG)
693
 
        except AttributeError:
694
 
            pass
695
 
        except OSError as error:
696
 
            if error.errno != errno.ECHILD:
697
 
                raise
 
693
        except (AttributeError, OSError) as error:
 
694
            if (isinstance(error, OSError)
 
695
                and error.errno != errno.ECHILD):
 
696
                raise error
698
697
        else:
699
698
            if pid:
700
699
                logger.warning("Checker was a zombie")
1703
1702
            logger.debug("Protocol version: %r", line)
1704
1703
            try:
1705
1704
                if int(line.strip().split()[0]) > 1:
1706
 
                    raise RuntimeError(line)
 
1705
                    raise RuntimeError
1707
1706
            except (ValueError, IndexError, RuntimeError) as error:
1708
1707
                logger.error("Unknown protocol version: %s", error)
1709
1708
                return
1916
1915
    
1917
1916
    def add_pipe(self, parent_pipe, proc):
1918
1917
        """Dummy function; override as necessary"""
1919
 
        raise NotImplementedError()
 
1918
        raise NotImplementedError
1920
1919
 
1921
1920
 
1922
1921
class IPv6_TCPServer(MultiprocessingMixInWithPipe,
2259
2258
            else:
2260
2259
                raise ValueError("Unknown suffix {0!r}"
2261
2260
                                 .format(suffix))
2262
 
        except IndexError as e:
 
2261
        except (ValueError, IndexError) as e:
2263
2262
            raise ValueError(*(e.args))
2264
2263
        timevalue += delta
2265
2264
    return timevalue
2482
2481
        os.setuid(uid)
2483
2482
    except OSError as error:
2484
2483
        if error.errno != errno.EPERM:
2485
 
            raise
 
2484
            raise error
2486
2485
    
2487
2486
    if debug:
2488
2487
        # Enable all possible GnuTLS debugging
2793
2792
            else:
2794
2793
                logger.warning("Could not save persistent state:",
2795
2794
                               exc_info=e)
2796
 
                raise
 
2795
                raise e
2797
2796
        
2798
2797
        # Delete all clients, and settings from config
2799
2798
        while tcp_server.clients: