diff options
author | David Howells <dhowells@redhat.com> | 2008-04-29 15:52:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 16:22:56 -0400 |
commit | 7bf570dc8dcf76df2a9f583bef2da96d4289ed0d (patch) | |
tree | b60a62585dfe511d9216cdd4a207fd07df1b2f99 /security/selinux | |
parent | 7663c1e2792a9662b23dec6e19bfcd3d55360b8f (diff) |
Security: Make secctx_to_secid() take const secdata
Make secctx_to_secid() take constant secdata.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 2 | ||||
-rw-r--r-- | security/selinux/include/security.h | 2 | ||||
-rw-r--r-- | security/selinux/ss/services.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4e4de98941ae..85a220465a8f 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -5238,7 +5238,7 @@ static int selinux_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | |||
5238 | return security_sid_to_context(secid, secdata, seclen); | 5238 | return security_sid_to_context(secid, secdata, seclen); |
5239 | } | 5239 | } |
5240 | 5240 | ||
5241 | static int selinux_secctx_to_secid(char *secdata, u32 seclen, u32 *secid) | 5241 | static int selinux_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid) |
5242 | { | 5242 | { |
5243 | return security_context_to_sid(secdata, seclen, secid); | 5243 | return security_context_to_sid(secdata, seclen, secid); |
5244 | } | 5244 | } |
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index cdb14add27d2..ad30ac4273d6 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
@@ -96,7 +96,7 @@ int security_sid_to_context(u32 sid, char **scontext, | |||
96 | int security_context_to_sid(const char *scontext, u32 scontext_len, | 96 | int security_context_to_sid(const char *scontext, u32 scontext_len, |
97 | u32 *out_sid); | 97 | u32 *out_sid); |
98 | 98 | ||
99 | int security_context_to_sid_default(char *scontext, u32 scontext_len, | 99 | int security_context_to_sid_default(const char *scontext, u32 scontext_len, |
100 | u32 *out_sid, u32 def_sid, gfp_t gfp_flags); | 100 | u32 *out_sid, u32 def_sid, gfp_t gfp_flags); |
101 | 101 | ||
102 | int security_get_user_sids(u32 callsid, char *username, | 102 | int security_get_user_sids(u32 callsid, char *username, |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 25cac5a2aa8e..dcc2e1c4fd83 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -858,8 +858,8 @@ int security_context_to_sid(const char *scontext, u32 scontext_len, u32 *sid) | |||
858 | * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient | 858 | * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient |
859 | * memory is available, or 0 on success. | 859 | * memory is available, or 0 on success. |
860 | */ | 860 | */ |
861 | int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *sid, | 861 | int security_context_to_sid_default(const char *scontext, u32 scontext_len, |
862 | u32 def_sid, gfp_t gfp_flags) | 862 | u32 *sid, u32 def_sid, gfp_t gfp_flags) |
863 | { | 863 | { |
864 | return security_context_to_sid_core(scontext, scontext_len, | 864 | return security_context_to_sid_core(scontext, scontext_len, |
865 | sid, def_sid, gfp_flags); | 865 | sid, def_sid, gfp_flags); |