Skip to content

Commit

Permalink
Rename class_destroy to avoid namespace conflicts.
Browse files Browse the repository at this point in the history
We're seeing increasing namespace conflicts between the global
class_destroy() function declared in linux/device.h, and the private
function in the SELinux core code.  This patch renames the SELinux
function to cls_destroy() to avoid this conflict.

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
James Morris authored and David S. Miller committed Dec 3, 2006
1 parent 484b366 commit 6cbda6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static int common_destroy(void *key, void *datum, void *p)
return 0;
}

static int class_destroy(void *key, void *datum, void *p)
static int cls_destroy(void *key, void *datum, void *p)
{
struct class_datum *cladatum;
struct constraint_node *constraint, *ctemp;
Expand Down Expand Up @@ -566,7 +566,7 @@ static int cat_destroy(void *key, void *datum, void *p)
static int (*destroy_f[SYM_NUM]) (void *key, void *datum, void *datap) =
{
common_destroy,
class_destroy,
cls_destroy,
role_destroy,
type_destroy,
user_destroy,
Expand Down Expand Up @@ -1124,7 +1124,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
out:
return rc;
bad:
class_destroy(key, cladatum, NULL);
cls_destroy(key, cladatum, NULL);
goto out;
}

Expand Down

0 comments on commit 6cbda6b

Please sign in to comment.