diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-25 11:07:12 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-25 16:19:18 -0400 |
commit | 7fac271ccebb84743c39f553eb5ec013cf1d10aa (patch) | |
tree | 85d62f6c504c6445b1cf3c11d109607ceeb52844 /src | |
parent | e30d02c04efad31f97c35165a92105852c805d34 (diff) | |
download | sssd-7fac271ccebb84743c39f553eb5ec013cf1d10aa.tar.gz sssd-7fac271ccebb84743c39f553eb5ec013cf1d10aa.tar.bz2 sssd-7fac271ccebb84743c39f553eb5ec013cf1d10aa.zip |
SSSDConfig: Handle integer parsing more leniently
Allow the base to be auto-detected rather than limited to base 10
Add hexadecimal integer test
Diffstat (limited to 'src')
-rw-r--r-- | src/config/SSSDConfig.py | 3 | ||||
-rw-r--r-- | src/config/testconfigs/sssd-valid.conf | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/config/SSSDConfig.py b/src/config/SSSDConfig.py index 17ce38ef..76e4112f 100644 --- a/src/config/SSSDConfig.py +++ b/src/config/SSSDConfig.py @@ -987,6 +987,9 @@ class SSSDDomain(SSSDConfigObject): if option_schema[0] == bool and \ type(value) == str: value = self.schema.bool_lookup[value.lower()] + elif option_schema[0] == int and type(value) == str: + # Make sure we handle any reasonable base + value = int(value, 0) else: value = option_schema[0](value) except ValueError: diff --git a/src/config/testconfigs/sssd-valid.conf b/src/config/testconfigs/sssd-valid.conf index f4be0796..a2824d3f 100644 --- a/src/config/testconfigs/sssd-valid.conf +++ b/src/config/testconfigs/sssd-valid.conf @@ -23,7 +23,7 @@ debug_level = 0 [domain/IPA] id_provider = ldap auth_provider = krb5 -debug_level = 0 +debug_level = 0xFF0 [domain/LOCAL] id_provider = local |