~ubuntu-branches/ubuntu/precise/maas/precise-security

15.2.3 by Andres Rodriguez, Julian Edwards, Raphaël Badin, Jeroen Vermeulen, Andres Rodriguez, Robie Basak, Scott Moser, Diogo Matsubara
* New upstream release. (LP: #1062518)
1
#!/usr/bin/python
2
3
'''apport hook for bind9
4
5
(c) 2012 Canonical Ltd.
6
Author: Andres Rodriguez <andres.rodriguez@canonical.com>
7
8
This program is free software; you can redistribute it and/or modify it
9
under the terms of the GNU General Public License as published by the
10
Free Software Foundation; either version 2 of the License, or (at your
11
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
12
the full text of the license.
13
'''
14
15
from apport.hookutils import *
16
17
def add_info(report, ui):
18
    response = ui.yesno("The contents of your /etc/maas/maas_local_settings.py, "
19
                        "/etc/maas/txlongpoll.yaml, /etc/maas/pserv.yaml files "
20
                        "may help developers diagnose your bug more "
21
                        "quickly.  However, it may contain sensitive "
22
                        "information.  Do you want to include it in your "
23
                        "bug report?")
24
25
    if response == None: # user cancelled
26
        raise StopIteration
27
28
    elif response == True:
29
        attach_conffiles(report,'maas')
30
31
    # Attaching log files
32
    attach_file_if_exists(report, '/var/log/maas/maas.log', 'MAASLog')
33
    attach_file_if_exists(report, '/var/log/maas/pserv.log', 'MAASPservLog')
34
    attach_file_if_exists(report, '/var/log/maas/txlongpoll.log', 'MAAStxlongpollLog')
35
36
    # Attaching related packages info
37
    attach_related_packages(report, ['python-django-maas', 'apparmor'])