403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/apport/package-hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/apport/package-hooks/source_nfs-utils.py
#!/usr/bin/python3

'''NFS Apport Interface

Copyright (C) 2022 Canonical Ltd
Author: Andreas Hasenack <andreas@canonical.com>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
'''

from apport.hookutils import (
    attach_file_if_exists,
    command_output,
    recent_syslog,
)
from glob import glob
import re

def add_info(report, ui):
    file_list = ["/etc/nfs.conf","/etc/default/nfs-common", "/etc/default/nfs-kernel-server"]
    file_list.extend(glob("/etc/nfs.conf.d/*.conf"))
    file_list.append("/etc/exports")
    file_list.append("/etc/request-key.d/id_resolver.conf")
    for f in file_list:
        attach_file_if_exists(report, f)
    report["SyslogNFS"] = recent_syslog(re.compile("(rpc\.(nfsd|gssd|svcgssd|statd|mountd|idmapd)|blkmapd|nfsdcld|nfsidmap)\["))
    report["NFSMounts"] = command_output(["findmnt", "-n", "-t", "nfs"])
    report["NFSv4Mounts"] = command_output(["findmnt", "-n", "-t", "nfs4"])

Youez - 2016 - github.com/yon3zu
LinuXploit