diff options
author | Paul Moore <paul.moore@hp.com> | 2008-11-18 12:03:22 -0500 |
---|---|---|
committer | Paul Moore <paul.moore@hp.com> | 2008-11-18 12:03:22 -0500 |
commit | 7f7a673e490ed3e4b4cdecbcf2effae057b16b36 (patch) | |
tree | 570276f0ce4737384fabab90230cc0cfb93940dc /security | |
parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) |
netlabel: Update kernel configuration API
Update the NetLabel kernel API to expose the new features added in kernel
releases 2.6.25 and 2.6.28: the static/fallback label functionality and network
address based selectors.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/smack/smackfs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index c21d8c8bf0c7..201f6f6290d0 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -353,11 +353,20 @@ static void smk_cipso_doi(void) for (rc = 1; rc < CIPSO_V4_TAG_MAXCNT; rc++) doip->tags[rc] = CIPSO_V4_TAG_INVALID; - rc = netlbl_cfg_cipsov4_add_map(doip, NULL, &audit_info); + rc = netlbl_cfg_cipsov4_add(doip, &audit_info); if (rc != 0) { - printk(KERN_WARNING "%s:%d add rc = %d\n", + printk(KERN_WARNING "%s:%d cipso add rc = %d\n", + __func__, __LINE__, rc); + kfree(doip); + return; + } + rc = netlbl_cfg_cipsov4_map_add(doip->doi, + NULL, NULL, NULL, &audit_info); + if (rc != 0) { + printk(KERN_WARNING "%s:%d map add rc = %d\n", __func__, __LINE__, rc); kfree(doip); + return; } } @@ -380,7 +389,8 @@ static void smk_unlbl_ambient(char *oldambient) __func__, __LINE__, rc); } - rc = netlbl_cfg_unlbl_add_map(smack_net_ambient, &audit_info); + rc = netlbl_cfg_unlbl_map_add(smack_net_ambient, + PF_INET, NULL, NULL, &audit_info); if (rc != 0) printk(KERN_WARNING "%s:%d add rc = %d\n", __func__, __LINE__, rc); |