Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbe4a7c8 authored by John Johansen's avatar John Johansen
Browse files

apparmor: constify policy name and hname

parent 6e474e30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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;
};
+1 −1
Original line number Diff line number Diff line
@@ -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)