genhomedircon: require match for home directory name
Use regular expression '/[^/]+' instead of '/[^/]*', like semodule's genhomedircon. Generates file contexts like '/home/[^/]+/dead\.letter' Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
577373f0db
commit
806a0d12f8
@ -266,7 +266,7 @@ class selinuxConfig:
|
||||
def genoutput(self):
|
||||
ret= self.heading()
|
||||
for h in self.getHomeDirs():
|
||||
ret += self.getHomeDirContext ("user_u" , h+'/[^/]*', "user")
|
||||
ret += self.getHomeDirContext ("user_u" , h+'/[^/]+', "user")
|
||||
ret += self.getHomeRootContext(h)
|
||||
ret += self.genHomeDirContext()
|
||||
return ret
|
||||
|
Loading…
Reference in New Issue
Block a user