From d224c9f41d34210ee7870b49367acc5acf69211f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Wed, 22 Jan 2020 09:10:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=20cl-core-patch=20=D0=BE=D1=82=20portage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/cl-core-wrapper | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/cl-core-wrapper b/data/cl-core-wrapper index d35dba6..946db29 100644 --- a/data/cl-core-wrapper +++ b/data/cl-core-wrapper @@ -23,12 +23,14 @@ import re if __name__ == '__main__': - if os.getuid() != 0 and not sys.argv[0].endswith("/cl-passwd"): + # direct run for root user, cl-passwd, cl-core-patch for portage user + if (os.giduid() == 0 or sys.argv[0].endswith("/cl-passwd") or + os.giduid() == 250 and sys.argv[0].endswith("/cl-core-patch")): + core_main.core_main() + else: try: import calculate.console.console_main as console_main console_main.console_main() except ImportError as e: print str(e) pass - else: - core_main.core_main()