diff options
-rw-r--r-- | include/linux/security.h | 6 | ||||
-rw-r--r-- | security/dummy.c | 2 | ||||
-rw-r--r-- | security/security.c | 2 | ||||
-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 | ||||
-rw-r--r-- | security/smack/smack_lsm.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index adb09d893ae0..50737c70e78e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1481,7 +1481,7 @@ struct security_operations { | |||
1481 | int (*getprocattr) (struct task_struct *p, char *name, char **value); | 1481 | int (*getprocattr) (struct task_struct *p, char *name, char **value); |
1482 | int (*setprocattr) (struct task_struct *p, char *name, void *value, size_t size); | 1482 | int (*setprocattr) (struct task_struct *p, char *name, void *value, size_t size); |
1483 | int (*secid_to_secctx) (u32 secid, char **secdata, u32 *seclen); | 1483 | int (*secid_to_secctx) (u32 secid, char **secdata, u32 *seclen); |
1484 | int (*secctx_to_secid) (char *secdata, u32 seclen, u32 *secid); | 1484 | int (*secctx_to_secid) (const char *secdata, u32 seclen, u32 *secid); |
1485 | void (*release_secctx) (char *secdata, u32 seclen); | 1485 | void (*release_secctx) (char *secdata, u32 seclen); |
1486 | 1486 | ||
1487 | #ifdef CONFIG_SECURITY_NETWORK | 1487 | #ifdef CONFIG_SECURITY_NETWORK |
@@ -1730,7 +1730,7 @@ int security_setprocattr(struct task_struct *p, char *name, void *value, size_t | |||
1730 | int security_netlink_send(struct sock *sk, struct sk_buff *skb); | 1730 | int security_netlink_send(struct sock *sk, struct sk_buff *skb); |
1731 | int security_netlink_recv(struct sk_buff *skb, int cap); | 1731 | int security_netlink_recv(struct sk_buff *skb, int cap); |
1732 | int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen); | 1732 | int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen); |
1733 | int security_secctx_to_secid(char *secdata, u32 seclen, u32 *secid); | 1733 | int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid); |
1734 | void security_release_secctx(char *secdata, u32 seclen); | 1734 | void security_release_secctx(char *secdata, u32 seclen); |
1735 | 1735 | ||
1736 | #else /* CONFIG_SECURITY */ | 1736 | #else /* CONFIG_SECURITY */ |
@@ -2449,7 +2449,7 @@ static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *secle | |||
2449 | return -EOPNOTSUPP; | 2449 | return -EOPNOTSUPP; |
2450 | } | 2450 | } |
2451 | 2451 | ||
2452 | static inline int security_secctx_to_secid(char *secdata, | 2452 | static inline int security_secctx_to_secid(const char *secdata, |
2453 | u32 seclen, | 2453 | u32 seclen, |
2454 | u32 *secid) | 2454 | u32 *secid) |
2455 | { | 2455 | { |
diff --git a/security/dummy.c b/security/dummy.c index 48cf30226e16..f50c6c3c32c9 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -968,7 +968,7 @@ static int dummy_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | |||
968 | return -EOPNOTSUPP; | 968 | return -EOPNOTSUPP; |
969 | } | 969 | } |
970 | 970 | ||
971 | static int dummy_secctx_to_secid(char *secdata, u32 seclen, u32 *secid) | 971 | static int dummy_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid) |
972 | { | 972 | { |
973 | return -EOPNOTSUPP; | 973 | return -EOPNOTSUPP; |
974 | } | 974 | } |
diff --git a/security/security.c b/security/security.c index 8e64a29dc55d..59838a99b80e 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -886,7 +886,7 @@ int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | |||
886 | } | 886 | } |
887 | EXPORT_SYMBOL(security_secid_to_secctx); | 887 | EXPORT_SYMBOL(security_secid_to_secctx); |
888 | 888 | ||
889 | int security_secctx_to_secid(char *secdata, u32 seclen, u32 *secid) | 889 | int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid) |
890 | { | 890 | { |
891 | return security_ops->secctx_to_secid(secdata, seclen, secid); | 891 | return security_ops->secctx_to_secid(secdata, seclen, secid); |
892 | } | 892 | } |
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); |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 5d2ec5650e61..92baee53a7dc 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -2406,7 +2406,7 @@ static int smack_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | |||
2406 | * | 2406 | * |
2407 | * Exists for audit and networking code. | 2407 | * Exists for audit and networking code. |
2408 | */ | 2408 | */ |
2409 | static int smack_secctx_to_secid(char *secdata, u32 seclen, u32 *secid) | 2409 | static int smack_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid) |
2410 | { | 2410 | { |
2411 | *secid = smack_to_secid(secdata); | 2411 | *secid = smack_to_secid(secdata); |
2412 | return 0; | 2412 | return 0; |