80fca8d Delay import of psutil to avoid AVC

Authored and Committed by cheimes 3 years ago
    Delay import of psutil to avoid AVC
    
    Commit cfad7af35dd5a2cdd4081d1e9ac7c245f47f1dce added a check to ensure a
    system has sufficient amount of memory. The feature uses psutil to get
    available memory. On import psutil opens files in /proc which can result in
    an SELinux violations and Python exception.
    
         PermissionError: [Errno 13] Permission denied: '/proc/stat'
    
    Fixes: https://pagure.io/freeipa/issue/8512
    Signed-off-by: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
    
        
file modified
+2 -2
file modified
+1 -0