-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SELinux: Add a network node caching mechanism similar to the sel_neti…
…f_*() functions This patch adds a SELinux IP address/node SID caching mechanism similar to the sel_netif_*() functions. The node SID queries in the SELinux hooks files are also modified to take advantage of this new functionality. In addition, remove the address length information from the sk_buff parsing routines as it is redundant since we already have the address family. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
- Loading branch information
Paul Moore
authored and
James Morris
committed
Jan 29, 2008
1 parent
da5645a
commit 224dfbd
Showing
5 changed files
with
416 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Network node table | ||
* | ||
* SELinux must keep a mapping of network nodes to labels/SIDs. This | ||
* mapping is maintained as part of the normal policy but a fast cache is | ||
* needed to reduce the lookup overhead since most of these queries happen on | ||
* a per-packet basis. | ||
* | ||
* Author: Paul Moore <paul.moore@hp.com> | ||
* | ||
*/ | ||
|
||
/* | ||
* (c) Copyright Hewlett-Packard Development Company, L.P., 2007 | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of version 2 of the GNU General Public License as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
#ifndef _SELINUX_NETNODE_H | ||
#define _SELINUX_NETNODE_H | ||
|
||
int sel_netnode_sid(void *addr, u16 family, u32 *sid); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.