K6h dZddlZddlZddlmZddlmZmZddlm Z ddl m Z ddl m Z ddlmZdd lmZdd lmZdd lmZdd lmZmZeeZGd d e ZdS)u  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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program.  If not, see . Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see N) getLogger)InotifyWatcher) inactivity)MyImunifyConfig) MessageSource)$is_native_feature_management_enabled) sync_users) hosting_panel)finally_happenedrecurring_checkcreZdZdZdZejZd dZdZ de fdZ de fdZ e d d ZdS) PasswdWatchers/etcspasswdNcK||_||_tj|_|t |j|_n||_|j|j|j td{Vs| d{Vtj r|d{V|j||_dSN)_loop_sinkr HostingPanel_hosting_panelr_watcherwatch WATCH_PATH WATCH_MASKr update_users_permissionsrENABLEDupdate_myimunify_users create_task_process_events _watch_task)selfloopsinkwatchers \/opt/imunify360/venv/lib/python3.11/site-packages/imav/feature_management/plugins/watcher.py create_sourcezPasswdWatcher.create_source1s  +8:: ?#DJ//DMM#DM DOT_===9;;;;;;;; 2//11 1 1 1 1 1 1 1  " 0--// / / / / / / /:11$2F2F2H2HIIcK|jtjtj5|jd{Vdddn #1swxYwY|jo|jdSdSr)rcancel contextlibsuppressasyncioCancelledErrorrcloser s r$shutdownzPasswdWatcher.shutdownDs !!!  !7 8 8 # #" " " " " " " " # # # # # # # # # # # # # # # /$---////////sAAAreturncjKt|jd{Vd{VSr)sync_feature_management_usersr get_usersr.s r$rz&PasswdWatcher.update_users_permissionsKsZ2%//11 1 1 1 1 1 1         r&cvKt|j|jd{Vd{VSr)sync_myimunify_usersrrr3r.s r$rz$PasswdWatcher.update_myimunify_usersPs^) Jd1;;========         r&rcK|jd{V}|j|jkrdSt d{Vsnt jd5t|j ddd{Vt ddddn #1swxYwYtj r|d{VdSdS)Npermissions_update) max_triesdelayz&Feature management permissions updated)r get_eventname WATCH_FILEr rtracktaskr rloggerinforrr)r events r$rzPasswdWatcher._process_eventsUssm--//////// : ( ( F9;;;;;;;; F!&&';<< F F&1Qa DEEE  F F F F F F F F F F F F F F F  " 0--// / / / / / / / / / 0 0s'8B++B/2B/r)__name__ __module__ __qualname__rr>rMOVED_TOrr%r/boolrrr rr&r$rr,sJJ!JJJJJ&000      d    _Q 0 0 0 0 0r&r)__doc__r+r)loggingrimav.malwarelib.subsys.ainotifyrrdefence360agent.apir defence360agent.contracts.configr!defence360agent.contracts.pluginsr*defence360agent.feature_management.controlr (defence360agent.feature_management.utilsr r2defence360agent.myimunify.modelr5defence360agent.subsys.panelsr defence360agent.utilsr r rDrArrIr&r$rUsD*<<<<<<<<******<<<<<<;;;;;;ONNNNN777777CCCCCCCC 8  6060606060M6060606060r&