From patchwork Thu Aug 18 11:18:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miroslav Vadkerti X-Patchwork-Id: 9287457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB655600CB for ; Thu, 18 Aug 2016 11:18:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CE5128A63 for ; Thu, 18 Aug 2016 11:18:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 911EC28E08; Thu, 18 Aug 2016 11:18:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (smtp.nsa.gov [8.44.101.8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E265328A63 for ; Thu, 18 Aug 2016 11:18:58 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.28,539,1464652800"; d="scan'208";a="16708407" IronPort-PHdr: =?us-ascii?q?9a23=3AIrRJ+hwBtVNFU2DXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?0e0RIJqq85mqBkHD//Il1AaPBtSCragYwLGI++C4ACpbsM7H6ChDOLV3FDY9wf?= =?us-ascii?q?0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5?= =?us-ascii?q?K6zPF5LIiIzvjqbpqsSVOVkD32T1Iesrak7n9UOJ7oheqLAhA5558gHOrHpMdr?= =?us-ascii?q?Ye7kJTDnXXoSzB4Nyt9oVo6SVatqFp3cdBVaLnY/ZwFuQAX3wbKWR92OnH/VmG?= =?us-ascii?q?FFPOtTMgVTANnx5JBRXVxA3rVZf29C3hv6xy3zfJE9fxSOURWC6l9KNiVlfWgS?= =?us-ascii?q?sEOiQl8SmDj9J5gKFWug6JvRFzw4fIJoqSMawtLevmYdoGSD8ZDY5qXCtbD9b5?= =?us-ascii?q?NtMC?= X-IPAS-Result: =?us-ascii?q?A2FvCgARmLVX/wHyM5BeHQGDJVZ8pVaTeyMDgXaFd0wBAQE?= =?us-ascii?q?BAQEBAgECWyeCMgQDEX1bRAI3FCAOAwkCFykICAMBKQQVHwsFGASIELxdJYYqh?= =?us-ascii?q?gYBEIJGAhEBaIUPBZlEhiCIfgKCN4c0hVoCkDNUgh+BXWyFaAINFweBGAEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 18 Aug 2016 11:18:56 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u7IBIBGr011015; Thu, 18 Aug 2016 07:18:18 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u7IBI9PW288212 for ; Thu, 18 Aug 2016 07:18:09 -0400 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 u7IBI8bJ011001 for ; Thu, 18 Aug 2016 07:18:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DcAAAFmbVXhhy3hNFeL4NqfKQtggMBjx6EDBQIhgGBbEwBAQEBAQEBAhMBAQEICwsJGYYNgQ5DiDG8eoYqhgYBEIJGfIUPBZlEhiCIfgKCN40OApAzghVeBIFZOjKFaAIkB4EYAQEB X-IPAS-Result: A1DcAAAFmbVXhhy3hNFeL4NqfKQtggMBjx6EDBQIhgGBbEwBAQEBAQEBAhMBAQEICwsJGYYNgQ5DiDG8eoYqhgYBEIJGfIUPBZlEhiCIfgKCN40OApAzghVeBIFZOjKFaAIkB4EYAQEB X-IronPort-AV: E=Sophos;i="5.28,539,1464667200"; d="scan'208";a="5651864" Received: from emsm-gh1-uea10.corp.nsa.gov (HELO emsm-gh1-uea10.nsa.gov) ([10.208.41.36]) by goalie.tycho.ncsc.mil with ESMTP; 18 Aug 2016 07:18:08 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AojCzHxCTmcL3sdGCMwyHUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP79pcbcNUDSrc9gkEXOFd2CrakV0qyM7+u7ByRAuc/H6yFaNsQUFlcsso?= =?us-ascii?q?Y/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVIm?= =?us-ascii?q?btr8FoOatcmrzef6o8SVOFQRwmDhKugsZFXu9EOK55FQ2dMjYo8KiTLx6kNSfO?= =?us-ascii?q?pXwW46bXmypD3bovmKwZh47i5LsOgg/cMTGY/zfqA/UKAKRG9+azN9t4XXskzY?= =?us-ascii?q?QA+O4GYMenkHmRpPRQ7e5Vf1WYminDH9s79Y2TOdJsn/U/gKUDih4r13SVe8jT?= =?us-ascii?q?kOOz006n3/kMF8jKtH5hmmokoskMbvfIiJOa8mLevmdtQASD8ZUw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0GLAgARmLVXhhy3hNFeL4NqfKQtgSlaA?= =?us-ascii?q?Y8ehAwUCIF2hAuBbEwBAQEBAQEBAgECEAEBAQgLCwkZL4IyFn9bgTyBDkOIMb0?= =?us-ascii?q?ChiqGBgEQgkZ8hQ8FmUSGIIh+AoI3jQ4CkDOCcwSBWToyhWgCJAeBGAEBAQ?= X-IPAS-Result: =?us-ascii?q?A0GLAgARmLVXhhy3hNFeL4NqfKQtgSlaAY8ehAwUCIF2hAu?= =?us-ascii?q?BbEwBAQEBAQEBAgECEAEBAQgLCwkZL4IyFn9bgTyBDkOIMb0ChiqGBgEQgkZ8h?= =?us-ascii?q?Q8FmUSGIIh+AoI3jQ4CkDOCcwSBWToyhWgCJAeBGAEBAQ?= X-IronPort-AV: E=Sophos;i="5.28,539,1464652800"; d="scan'208";a="16708379" Received: from mx1.redhat.com ([209.132.183.28]) by emsm-gh1-uea10.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Aug 2016 11:18:08 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3AD944E336 for ; Thu, 18 Aug 2016 11:18:07 +0000 (UTC) Received: from crude.brq.redhat.com (crude.brq.redhat.com [10.34.24.82]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7IBI5ei001100; Thu, 18 Aug 2016 07:18:06 -0400 From: Miroslav Vadkerti To: selinux@tycho.nsa.gov Subject: [PATCH] semanage: fix error message for fcontext -m Date: Thu, 18 Aug 2016 13:18:01 +0200 Message-Id: <1471519081-26417-1-git-send-email-mvadkert@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 18 Aug 2016 11:18:07 +0000 (UTC) X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP The type must be a file of device type, not a port type. Signed-off-by: Miroslav Vadkerti --- policycoreutils/semanage/seobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py index a6681f0..a34d20d 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -1937,7 +1937,7 @@ class fcontextRecords(semanageRecords): if serange == "" and setype == "" and seuser == "": raise ValueError(_("Requires setype, serange or seuser")) if setype and setype not in self.valid_types: - raise ValueError(_("Type %s is invalid, must be a port type") % setype) + raise ValueError(_("Type %s is invalid, must be a file or device type") % setype) self.validate(target)