summaryrefslogtreecommitdiff
path: root/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'files.c')
-rw-r--r--files.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/files.c b/files.c
index afc9f0c..d16c372 100644
--- a/files.c
+++ b/files.c
@@ -1998,10 +1998,10 @@ void process_dot_desktop_files(Options *op, Package *p)
/*
- * set_security_context() - set the security context of the file to 'shlib_t'
+ * set_security_context() - set the security context of the file to 'type'
* Returns TRUE on success or if SELinux is disabled, FALSE otherwise
*/
-int set_security_context(Options *op, const char *filename)
+int set_security_context(Options *op, const char *filename, const char *type)
{
char *cmd = NULL;
int ret = FALSE;
@@ -2010,8 +2010,7 @@ int set_security_context(Options *op, const char *filename)
return TRUE;
}
- cmd = nvstrcat(op->utils[CHCON], " -t ", op->selinux_chcon_type, " ",
- filename, NULL);
+ cmd = nvstrcat(op->utils[CHCON], " -t ", type, " ", filename, NULL);
ret = run_command(op, cmd, NULL, FALSE, 0, TRUE);
@@ -2019,7 +2018,7 @@ int set_security_context(Options *op, const char *filename)
if (cmd) nvfree(cmd);
return ret;
-} /* set_security_context() */
+}
/*