diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-05-23 07:08:01 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-26 10:29:37 -0400 |
commit | 9c47bdef9d2d67e7fed31201f7007b7dd9e85903 (patch) | |
tree | 1fdfd698cfce3871e3cc785dfc5436b6074e061f /src/db/sysdb.c | |
parent | b8f94ca9d19384139c3ceee2f8ff918556f9790c (diff) | |
download | sssd-9c47bdef9d2d67e7fed31201f7007b7dd9e85903.tar.gz sssd-9c47bdef9d2d67e7fed31201f7007b7dd9e85903.tar.xz sssd-9c47bdef9d2d67e7fed31201f7007b7dd9e85903.zip |
Handle non-POSIX groups in nesting
Added sysdb_attrs_get_bool() function
Non-posix group processing - sysdb changes
Non-posix group processing - ldap provider and nss responder
Diffstat (limited to 'src/db/sysdb.c')
-rw-r--r-- | src/db/sysdb.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index b23bac145..40b7c26c6 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -333,6 +333,28 @@ int sysdb_attrs_get_uint32_t(struct sysdb_attrs *attrs, const char *name, return EOK; } +errno_t sysdb_attrs_get_bool(struct sysdb_attrs *attrs, const char *name, + bool *value) +{ + struct ldb_message_element *el; + int ret; + + ret = sysdb_attrs_get_el_int(attrs, name, false, &el); + if (ret) { + return ret; + } + + if (el->num_values != 1) { + return ERANGE; + } + + if (strcmp((const char *)el->values[0].data, "TRUE") == 0) + *value = true; + else + *value = false; + return EOK; +} + int sysdb_attrs_get_string_array(struct sysdb_attrs *attrs, const char *name, TALLOC_CTX *mem_ctx, const char ***string) { |