Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w36CnL9a027541 for ; Fri, 6 Apr 2018 08:49:21 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by UPDCF3IC11.oob.disa.mil (Postfix) with SMTP id 40Hff54ZHfzg5pw for ; Fri, 6 Apr 2018 12:49:17 +0000 (UTC) Received: from UPDC3CPA08_EEMSG_MP24.eemsg.mil (unknown [192.168.18.19]) by UPDCF3IC11.oob.disa.mil (Postfix) with ESMTP id 40Hff53s3kzg46x for ; Fri, 6 Apr 2018 12:49:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 88AAF406F949 for ; Fri, 6 Apr 2018 12:49:14 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.12.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2307C2140624 for ; Fri, 6 Apr 2018 12:49:13 +0000 (UTC) From: Vit Mojzis To: selinux@tycho.nsa.gov Date: Fri, 6 Apr 2018 14:49:09 +0200 Message-Id: <20180406124909.3603-1-vmojzis@redhat.com> Subject: [PATCH] python/sepolicy: Fix type for cgi scripts List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: The type generated by apache_content_template macro for cgi scripts changed from httpd_$1_script_t to $1_script_t. Update sepolicy accordingly. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1271324 Signed-off-by: Vit Mojzis --- python/sepolicy/sepolicy/generate.py | 2 +- python/sepolicy/sepolicy/templates/executable.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sepolicy/sepolicy/generate.py b/python/sepolicy/sepolicy/generate.py index f814e278..675b99d6 100644 --- a/python/sepolicy/sepolicy/generate.py +++ b/python/sepolicy/sepolicy/generate.py @@ -347,7 +347,7 @@ class policy: raise ValueError(_("Name must be alpha numberic with no spaces. Consider using option \"-n MODULENAME\"")) if type == CGI: - self.name = "httpd_%s_script" % name + self.name = "%s_script" % name else: self.name = name diff --git a/python/sepolicy/sepolicy/templates/executable.py b/python/sepolicy/sepolicy/templates/executable.py index f2679938..e1b17486 100644 --- a/python/sepolicy/sepolicy/templates/executable.py +++ b/python/sepolicy/sepolicy/templates/executable.py @@ -116,7 +116,7 @@ policy_module(TEMPLATETYPE, 1.0.0) apache_content_template(TEMPLATETYPE) -permissive httpd_TEMPLATETYPE_script_t; +permissive TEMPLATETYPE_script_t; """ te_daemon_rules="""\ -- 2.14.3