Skip to content

Commit

Permalink
Merge branch 'smack-for-3.20-rebased' of git://git.gitorious.org/smac…
Browse files Browse the repository at this point in the history
…k-next/kernel into next
  • Loading branch information
James Morris committed Jan 22, 2015
2 parents 743410a + 6d1cff2 commit 9d5a5f6
Show file tree
Hide file tree
Showing 5 changed files with 267 additions and 52 deletions.
12 changes: 12 additions & 0 deletions security/smack/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ config SECURITY_SMACK_BRINGUP
access rule set once the behavior is well understood.
This is a superior mechanism to the oft abused
"permissive" mode of other systems.
If you are unsure how to answer this question, answer N.

config SECURITY_SMACK_NETFILTER
bool "Packet marking using secmarks for netfilter"
depends on SECURITY_SMACK
depends on NETWORK_SECMARK
depends on NETFILTER
default n
help
This enables security marking of network packets using
Smack labels.
If you are unsure how to answer this question, answer N.
1 change: 1 addition & 0 deletions security/smack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
obj-$(CONFIG_SECURITY_SMACK) := smack.o

smack-y := smack_lsm.o smack_access.o smackfs.o
smack-$(CONFIG_NETFILTER) += smack_netfilter.o
11 changes: 11 additions & 0 deletions security/smack/smack.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ struct smack_known *smk_find_entry(const char *);
/*
* Shared data.
*/
extern int smack_enabled;
extern int smack_cipso_direct;
extern int smack_cipso_mapped;
extern struct smack_known *smack_net_ambient;
Expand Down Expand Up @@ -298,6 +299,16 @@ static inline struct smack_known *smk_of_task(const struct task_smack *tsp)
return tsp->smk_task;
}

static inline struct smack_known *smk_of_task_struct(const struct task_struct *t)
{
struct smack_known *skp;

rcu_read_lock();
skp = smk_of_task(__task_cred(t)->security);
rcu_read_unlock();
return skp;
}

/*
* Present a pointer to the forked smack label entry in an task blob.
*/
Expand Down
Loading

0 comments on commit 9d5a5f6

Please sign in to comment.