aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-02-05 01:13:14 -0500
committerJames Morris <james.l.morris@oracle.com>2014-02-06 03:11:04 -0500
commit29707b206c5171ac6583a4d1e9ec3af937e8c2e4 (patch)
tree89eaafa4bfc49b2418db3bdfb367e65f643d2e79 /security
parent923b49ff69fcbffe6f8b2739de218c45544392a7 (diff)
security: replace strict_strto*() with kstrto*()
The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/lsm.c2
-rw-r--r--security/integrity/ima/ima_policy.c6
-rw-r--r--security/integrity/integrity_audit.c2
-rw-r--r--security/keys/encrypted-keys/encrypted.c2
-rw-r--r--security/keys/trusted.c6
-rw-r--r--security/selinux/hooks.c4
-rw-r--r--security/selinux/selinuxfs.c2
7 files changed, 12 insertions, 12 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 4257b7e2796b..998100093332 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -751,7 +751,7 @@ module_param_named(enabled, apparmor_enabled, bool, S_IRUGO);
751static int __init apparmor_enabled_setup(char *str) 751static int __init apparmor_enabled_setup(char *str)
752{ 752{
753 unsigned long enabled; 753 unsigned long enabled;
754 int error = strict_strtoul(str, 0, &enabled); 754 int error = kstrtoul(str, 0, &enabled);
755 if (!error) 755 if (!error)
756 apparmor_enabled = enabled ? 1 : 0; 756 apparmor_enabled = enabled ? 1 : 0;
757 return 1; 757 return 1;
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index a9c3d3cd1990..354b125c6c9f 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -520,7 +520,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
520 break; 520 break;
521 } 521 }
522 522
523 result = strict_strtoul(args[0].from, 16, 523 result = kstrtoul(args[0].from, 16,
524 &entry->fsmagic); 524 &entry->fsmagic);
525 if (!result) 525 if (!result)
526 entry->flags |= IMA_FSMAGIC; 526 entry->flags |= IMA_FSMAGIC;
@@ -547,7 +547,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
547 break; 547 break;
548 } 548 }
549 549
550 result = strict_strtoul(args[0].from, 10, &lnum); 550 result = kstrtoul(args[0].from, 10, &lnum);
551 if (!result) { 551 if (!result) {
552 entry->uid = make_kuid(current_user_ns(), (uid_t)lnum); 552 entry->uid = make_kuid(current_user_ns(), (uid_t)lnum);
553 if (!uid_valid(entry->uid) || (((uid_t)lnum) != lnum)) 553 if (!uid_valid(entry->uid) || (((uid_t)lnum) != lnum))
@@ -564,7 +564,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
564 break; 564 break;
565 } 565 }
566 566
567 result = strict_strtoul(args[0].from, 10, &lnum); 567 result = kstrtoul(args[0].from, 10, &lnum);
568 if (!result) { 568 if (!result) {
569 entry->fowner = make_kuid(current_user_ns(), (uid_t)lnum); 569 entry->fowner = make_kuid(current_user_ns(), (uid_t)lnum);
570 if (!uid_valid(entry->fowner) || (((uid_t)lnum) != lnum)) 570 if (!uid_valid(entry->fowner) || (((uid_t)lnum) != lnum))
diff --git a/security/integrity/integrity_audit.c b/security/integrity/integrity_audit.c
index d7efb30404aa..809ec8428ee7 100644
--- a/security/integrity/integrity_audit.c
+++ b/security/integrity/integrity_audit.c
@@ -22,7 +22,7 @@ static int __init integrity_audit_setup(char *str)
22{ 22{
23 unsigned long audit; 23 unsigned long audit;
24 24
25 if (!strict_strtoul(str, 0, &audit)) 25 if (!kstrtoul(str, 0, &audit))
26 integrity_audit_info = audit ? 1 : 0; 26 integrity_audit_info = audit ? 1 : 0;
27 return 1; 27 return 1;
28} 28}
diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c
index 9e1e005c7596..5fe443d120af 100644
--- a/security/keys/encrypted-keys/encrypted.c
+++ b/security/keys/encrypted-keys/encrypted.c
@@ -609,7 +609,7 @@ static struct encrypted_key_payload *encrypted_key_alloc(struct key *key,
609 long dlen; 609 long dlen;
610 int ret; 610 int ret;
611 611
612 ret = strict_strtol(datalen, 10, &dlen); 612 ret = kstrtol(datalen, 10, &dlen);
613 if (ret < 0 || dlen < MIN_DATA_SIZE || dlen > MAX_DATA_SIZE) 613 if (ret < 0 || dlen < MIN_DATA_SIZE || dlen > MAX_DATA_SIZE)
614 return ERR_PTR(-EINVAL); 614 return ERR_PTR(-EINVAL);
615 615
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index e13fcf7636f7..6b804aa4529a 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -753,7 +753,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
753 return -EINVAL; 753 return -EINVAL;
754 break; 754 break;
755 case Opt_keyhandle: 755 case Opt_keyhandle:
756 res = strict_strtoul(args[0].from, 16, &handle); 756 res = kstrtoul(args[0].from, 16, &handle);
757 if (res < 0) 757 if (res < 0)
758 return -EINVAL; 758 return -EINVAL;
759 opt->keytype = SEAL_keytype; 759 opt->keytype = SEAL_keytype;
@@ -782,7 +782,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
782 return -EINVAL; 782 return -EINVAL;
783 break; 783 break;
784 case Opt_pcrlock: 784 case Opt_pcrlock:
785 res = strict_strtoul(args[0].from, 10, &lock); 785 res = kstrtoul(args[0].from, 10, &lock);
786 if (res < 0) 786 if (res < 0)
787 return -EINVAL; 787 return -EINVAL;
788 opt->pcrlock = lock; 788 opt->pcrlock = lock;
@@ -820,7 +820,7 @@ static int datablob_parse(char *datablob, struct trusted_key_payload *p,
820 c = strsep(&datablob, " \t"); 820 c = strsep(&datablob, " \t");
821 if (!c) 821 if (!c)
822 return -EINVAL; 822 return -EINVAL;
823 ret = strict_strtol(c, 10, &keylen); 823 ret = kstrtol(c, 10, &keylen);
824 if (ret < 0 || keylen < MIN_KEY_SIZE || keylen > MAX_KEY_SIZE) 824 if (ret < 0 || keylen < MIN_KEY_SIZE || keylen > MAX_KEY_SIZE)
825 return -EINVAL; 825 return -EINVAL;
826 p->key_len = keylen; 826 p->key_len = keylen;
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 3219560f9fae..0e68bdbe020a 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -106,7 +106,7 @@ int selinux_enforcing;
106static int __init enforcing_setup(char *str) 106static int __init enforcing_setup(char *str)
107{ 107{
108 unsigned long enforcing; 108 unsigned long enforcing;
109 if (!strict_strtoul(str, 0, &enforcing)) 109 if (!kstrtoul(str, 0, &enforcing))
110 selinux_enforcing = enforcing ? 1 : 0; 110 selinux_enforcing = enforcing ? 1 : 0;
111 return 1; 111 return 1;
112} 112}
@@ -119,7 +119,7 @@ int selinux_enabled = CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE;
119static int __init selinux_enabled_setup(char *str) 119static int __init selinux_enabled_setup(char *str)
120{ 120{
121 unsigned long enabled; 121 unsigned long enabled;
122 if (!strict_strtoul(str, 0, &enabled)) 122 if (!kstrtoul(str, 0, &enabled))
123 selinux_enabled = enabled ? 1 : 0; 123 selinux_enabled = enabled ? 1 : 0;
124 return 1; 124 return 1;
125} 125}
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 5122affe06a8..170b4b123acc 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -54,7 +54,7 @@ unsigned int selinux_checkreqprot = CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE;
54static int __init checkreqprot_setup(char *str) 54static int __init checkreqprot_setup(char *str)
55{ 55{
56 unsigned long checkreqprot; 56 unsigned long checkreqprot;
57 if (!strict_strtoul(str, 0, &checkreqprot)) 57 if (!kstrtoul(str, 0, &checkreqprot))
58 selinux_checkreqprot = checkreqprot ? 1 : 0; 58 selinux_checkreqprot = checkreqprot ? 1 : 0;
59 return 1; 59 return 1;
60} 60}