[PATCH 35/96] policycoreutils: semanage: do not allow spaces in file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


This patch looks good to me. acked.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5D6hcACgkQrlYvE4MpobMLxQCePkG+e5V7RflYDvaBnhys16q7
xiUAoLIwdSZnDqsVOruMsa6ViBtplG1o
=vy3b
-----END PGP SIGNATURE-----
>From e217a7a7fe5a38350ddb18ab4e32e09221e82891 Mon Sep 17 00:00:00 2001
From: Eric Paris <eparis@xxxxxxxxxx>
Date: Fri, 15 Jul 2011 18:23:45 +0200
Subject: [PATCH 35/96] policycoreutils: semanage: do not allow spaces in file
 context

The entire tool chain does not support file context with a space in the
regex.  If one of these gets into the file_context files, all sorts of stuff
goes nuts.

Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
---
 policycoreutils/semanage/seobject.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py
index 5f8f2b8..c36dd37 100644
--- a/policycoreutils/semanage/seobject.py
+++ b/policycoreutils/semanage/seobject.py
@@ -1409,6 +1409,8 @@ class fcontextRecords(semanageRecords):
         def validate(self, target):
                if target == "" or target.find("\n") >= 0:
                       raise ValueError(_("Invalid file specification"))
+               if target.find(" ") != -1:
+                      raise ValueError(_("File specification can not include spaces"))
                       
 	def __add(self, target, type, ftype = "", serange = "", seuser = "system_u"):
                 self.validate(target)
-- 
1.7.6

Attachment: 0035-policycoreutils-semanage-do-not-allow-spaces-in-file.patch.sig
Description: PGP signature


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux