lvscan creates the /run/lock/lvm directory if nonexisting (v2)

If the /run/lock/lvm directory doesn't exist yet, running any of the LVM tools
(like lvscan) will create this directory. Introduce a named file transition for
the lock location when a directory named "lvm" is created and grant the
necessary rights to create the directory.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
This commit is contained in:
Sven Vermeulen 2012-12-17 10:42:44 +01:00 committed by Chris PeBenito
parent 84497cc8e8
commit 829b252cdc
1 changed files with 2 additions and 0 deletions

View File

@ -192,7 +192,9 @@ can_exec(lvm_t, lvm_exec_t)
# Creating lock files
manage_files_pattern(lvm_t, lvm_lock_t, lvm_lock_t)
create_dirs_pattern(lvm_t, lvm_lock_t, lvm_lock_t)
files_lock_filetrans(lvm_t, lvm_lock_t, file)
files_lock_filetrans(lvm_t, lvm_lock_t, dir, "lvm")
manage_dirs_pattern(lvm_t, lvm_var_lib_t, lvm_var_lib_t)
manage_files_pattern(lvm_t, lvm_var_lib_t, lvm_var_lib_t)