diff options
author | John Johansen <john.johansen@canonical.com> | 2017-01-16 00:42:30 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-01-16 01:18:26 -0800 |
commit | bbe4a7c8733c925b061dcce2d1af8926cefbe539 (patch) | |
tree | b0ccd2d4668dfc3de53a88cfe16eb91eaf4419fb | |
parent | 6e474e3063eae9767f219d83cf91d8360f63be0c (diff) |
apparmor: constify policy name and hname
Signed-off-by: John Johansen <john.johansen@canonical.com>
-rw-r--r-- | security/apparmor/apparmorfs.c | 2 | ||||
-rw-r--r-- | security/apparmor/include/lib.h | 4 | ||||
-rw-r--r-- | security/apparmor/lib.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index d7cfd79d9857..96a02ee9c499 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -38,7 +38,7 @@ * * Returns: length of mangled name */ -static int mangle_name(char *name, char *target) +static int mangle_name(const char *name, char *target) { char *t = target; diff --git a/security/apparmor/include/lib.h b/security/apparmor/include/lib.h index b5c16d3a7a18..7e81cdab4af0 100644 --- a/security/apparmor/include/lib.h +++ b/security/apparmor/include/lib.h @@ -123,8 +123,8 @@ static inline bool path_mediated_fs(struct dentry *dentry) * @profiles: head of the profiles list contained in the object */ struct aa_policy { - char *name; - char *hname; + const char *name; + const char *hname; struct list_head list; struct list_head profiles; }; diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index 02203889c3c8..91d5766d1c28 100644 --- a/security/apparmor/lib.c +++ b/security/apparmor/lib.c @@ -178,7 +178,7 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix, policy->hname = kmalloc(strlen(prefix) + strlen(name) + 3, GFP_KERNEL); if (policy->hname) - sprintf(policy->hname, "%s//%s", prefix, name); + sprintf((char *)policy->hname, "%s//%s", prefix, name); } else policy->hname = kstrdup(name, GFP_KERNEL); if (!policy->hname) |