summaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_policy.c
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2013-12-11 14:44:04 -0500
committerMimi Zohar <zohar@linux.vnet.ibm.com>2014-03-07 11:30:36 -0500
commit52a13284844b354c7a37533f5366cb5b653a76b3 (patch)
tree71e0f9148d8a2bb44a308d79e2883f6e732cd97b /security/integrity/ima/ima_policy.c
parent31d4b761896101660b3efe01816b63d9814755eb (diff)
downloadblackbird-op-linux-52a13284844b354c7a37533f5366cb5b653a76b3.tar.gz
blackbird-op-linux-52a13284844b354c7a37533f5366cb5b653a76b3.zip
ima: use static const char array definitions
A const char pointer allocates memory for a pointer as well as for a string, This patch replaces a number of the const char pointers throughout IMA, with a static const char array. Suggested-by: David Howells <dhowells@redhat.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Acked-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/integrity/ima/ima_policy.c')
-rw-r--r--security/integrity/ima/ima_policy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 354b125c6c9f..3f6b8a466368 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -329,7 +329,7 @@ void __init ima_init_policy(void)
*/
void ima_update_policy(void)
{
- const char *op = "policy_update";
+ static const char op[] = "policy_update";
const char *cause = "already exists";
int result = 1;
int audit_info = 0;
@@ -645,7 +645,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
*/
ssize_t ima_parse_add_rule(char *rule)
{
- const char *op = "update_policy";
+ static const char op[] = "update_policy";
char *p;
struct ima_rule_entry *entry;
ssize_t result, len;
OpenPOWER on IntegriCloud