ctc-oss / fapolicy-analyzer

Tools to assist with the configuration and management of fapolicyd.
https://ctc-oss.github.io/fapolicy-analyzer
GNU General Public License v3.0
12 stars 5 forks source link

fapolicy-analyzer never finishes initializing #1036

Open AlanCDavis-APG opened 3 hours ago

AlanCDavis-APG commented 3 hours ago

Problem : fapolicy-analyzer never finishes initializing

This is a new install of v1.4.0~dev440-1 build 8100761 installed from COPR ctc-oss/fapolicy-analyzer onto AlmaLinux 9.4. On startup from the desktop icon the UI comes up with the initializing message but never continues past that point. Starting from the command line, it displays the errors below. No significant log messages are generated to syslog.

Error messages :

> fapolicy-analyzer
fapolicy-analyzer v1.4.0
thread '<unnamed>' panicked at crates/trust/src/check.rs:46:14:
failed to parse_strtyped_trust_record: ParseSizeError(ParseIntError { kind: Empty })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
^CTraceback (most recent call last):
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.9/site-packages/fapolicy_analyzer/ui/__main__.py", line 142, in <module>
    main()
  File "/usr/lib64/python3.9/site-packages/fapolicy_analyzer/ui/__main__.py", line 138, in main
    Gtk.main()
  File "/usr/lib/python3.9/site-packages/gi/overrides/Gtk.py", line 1680, in main
    return _Gtk_main(*args, **kwargs)
  File "/usr/lib64/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/usr/lib64/python3.9/site-packages/gi/_ossighelper.py", line 237, in register_sigint_fallback
    signal.default_int_handler(signal.SIGINT, None)
KeyboardInterrupt

Environment : AlmaLinux 9.4 patched to latest as of 10/7/2024

~/.config/fapolicy-analyzer/config.toml: cat config.toml

[ui]
initial_view = 'rules'
[system]
rules_file_path = '/etc/fapolicyd/rules.d'
trust_lmdb_path = '/var/lib/fapolicyd'
system_trust_path = '/var/lib/rpm'
trust_dir_path = '/etc/fapolicyd/trust.d'
trust_file_path = '/etc/fapolicyd/fapolicyd.trust'
syslog_file_path = '/var/log/messages'
[application]
data_dir = '/home/dev/.local/share/fapolicy-analyzer'

fapolicyd.service status:

> systemctl -l status fapolicyd
● fapolicyd.service - File Access Policy Daemon
     Loaded: loaded (/usr/lib/systemd/system/fapolicyd.service; enabled; preset: disabled)
     Active: active (running) since Mon 2024-10-07 15:25:13 EDT; 8s ago
       Docs: man:fapolicyd(8)
    Process: 9464 ExecStartPre=/usr/sbin/fagenrules (code=exited, status=0/SUCCESS)
    Process: 9488 ExecStart=/usr/sbin/fapolicyd (code=exited, status=0/SUCCESS)
   Main PID: 9489 (fapolicyd)
      Tasks: 4 (limit: 200994)
     Memory: 38.5M
        CPU: 1.414s
     CGroup: /system.slice/fapolicyd.service
             └─9489 /usr/sbin/fapolicyd

Oct 07 15:25:13 ogma fapolicyd[9489]: No SHA256 for /usr/bin/ail-cli
Oct 07 15:25:13 ogma fapolicyd[9489]: No SHA256 for /usr/bin/appimagelauncherd
Oct 07 15:25:13 ogma fapolicyd[9489]: No SHA256 for /usr/lib/binfmt.d/appimage.conf
Oct 07 15:25:14 ogma fapolicyd[9489]: Checking if the trust database up to date
Oct 07 15:25:14 ogma fapolicyd[9489]: Importing trust data from rpmdb backend
Oct 07 15:25:14 ogma fapolicyd[9489]: Importing trust data from file backend
Oct 07 15:25:14 ogma fapolicyd[9489]: Entries in trust DB: 52509
Oct 07 15:25:14 ogma fapolicyd[9489]: Loaded trust info from all backends(without duplicates): 52509
Oct 07 15:25:14 ogma fapolicyd[9489]: Trust database checks OK
Oct 07 15:25:14 ogma fapolicyd[9489]: Starting to listen for events

fapolicyd-cli --check-trustdb (first 10 results of many) head -10 /tmp/trustdb.check /etc/cron.daily/google-earth-pro miscompares: is a sha1 /etc/modprobe.d/tuned.conf miscompares: size sha256 /etc/selinux/targeted/contexts/files/file_contexts miscompares: size sha256 /etc/selinux/targeted/policy/policy.33 miscompares: size sha256 Can't open /opt/XeroxOffice/prtsys/PatchSELinuxPolicy (No such file or directory) Can't open /opt/XeroxOffice/prtsys/SELinuxExceptions.pp (No such file or directory) Can't open /opt/XeroxOffice/prtsys/SELinuxExceptionsv6.pp (No such file or directory) /opt/XeroxOffice/prtsys/XeroxOfficeXSF miscompares: is a sha1 /opt/XeroxOffice/prtsys/db/AdminUtil.db miscompares: is a sha1 /opt/XeroxOffice/prtsys/db/v5driver.db miscompares: is a sha1


/etc/fapolicyd/trust.d:

cat trusted-usr-bin

 # AUTOGENERATED FILE VERSION 3
 # This file contains a list of trusted files
 #
 #  FULL PATH        SIZE                             SHA256
 # /home/user/my-ls 157984 61a9960bf7d255a85811f4afcac51067b8f2e4c75e21cf4f2af95319d4ed1b87
/home/automation/bin/start-vpn 78 3c87010ea2ba810ce2ab47130585d4eafbdb295f5daaa78a7df9bb2f990ecce4

765 May be related

jw3 commented 3 hours ago

@AlanCDavis-APG Thanks for the info. I'm looking into it.

What is the fapolicyd version?

AlanCDavis-APG commented 3 hours ago

Name : fapolicyd Version : 1.3.2 Release : 100.el9 Architecture : x86_64 Size : 302 k Source : fapolicyd-1.3.2-100.el9.src.rpm

On Mon, Oct 7, 2024 at 4:14 PM John Wass @.***> wrote:

@AlanCDavis-APG https://github.com/AlanCDavis-APG Thanks for the info. I'm looking into it.

What is the fapolicyd version?

— Reply to this email directly, view it on GitHub https://github.com/ctc-oss/fapolicy-analyzer/issues/1036#issuecomment-2397804614, or unsubscribe https://github.com/notifications/unsubscribe-auth/BL5AKS6U6RIPKEFXMV6VZWDZ2LTQTAVCNFSM6AAAAABPQVLHXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJXHAYDINRRGQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Alan Davis Principal System Administrator Apogee Research LLC Office : 571.384.8941 x26 Cell : 410.701.0518