summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-08-15 13:24:08 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-08-21 12:12:35 +0200
commitee0a1b3f94846fb19fbe3b72304d7ea2c989669c (patch)
treea95e70958216b0045c0cef4b1f9465046fba28f5
parent7d7e514d42c2c90071d09a272a13250491487bcb (diff)
downloadsssd_unused-ee0a1b3f94846fb19fbe3b72304d7ea2c989669c.tar.gz
sssd_unused-ee0a1b3f94846fb19fbe3b72304d7ea2c989669c.tar.xz
sssd_unused-ee0a1b3f94846fb19fbe3b72304d7ea2c989669c.zip
SYSDB: Make sysdb_attrs_get_el_int() public
Also rename it to sysdb_attrs_get_el_ext()
-rw-r--r--src/db/sysdb.c14
-rw-r--r--src/db/sysdb.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 07c1a500..40c06376 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -284,8 +284,8 @@ struct sysdb_attrs *sysdb_new_attrs(TALLOC_CTX *memctx)
return talloc_zero(memctx, struct sysdb_attrs);
}
-static int sysdb_attrs_get_el_int(struct sysdb_attrs *attrs, const char *name,
- bool alloc, struct ldb_message_element **el)
+int sysdb_attrs_get_el_ext(struct sysdb_attrs *attrs, const char *name,
+ bool alloc, struct ldb_message_element **el)
{
struct ldb_message_element *e = NULL;
int i;
@@ -324,7 +324,7 @@ static int sysdb_attrs_get_el_int(struct sysdb_attrs *attrs, const char *name,
int sysdb_attrs_get_el(struct sysdb_attrs *attrs, const char *name,
struct ldb_message_element **el)
{
- return sysdb_attrs_get_el_int(attrs, name, true, el);
+ return sysdb_attrs_get_el_ext(attrs, name, true, el);
}
int sysdb_attrs_get_string(struct sysdb_attrs *attrs, const char *name,
@@ -333,7 +333,7 @@ int sysdb_attrs_get_string(struct sysdb_attrs *attrs, const char *name,
struct ldb_message_element *el;
int ret;
- ret = sysdb_attrs_get_el_int(attrs, name, false, &el);
+ ret = sysdb_attrs_get_el_ext(attrs, name, false, &el);
if (ret) {
return ret;
}
@@ -354,7 +354,7 @@ int sysdb_attrs_get_uint32_t(struct sysdb_attrs *attrs, const char *name,
char *endptr;
uint32_t val;
- ret = sysdb_attrs_get_el_int(attrs, name, false, &el);
+ ret = sysdb_attrs_get_el_ext(attrs, name, false, &el);
if (ret) {
return ret;
}
@@ -378,7 +378,7 @@ errno_t sysdb_attrs_get_bool(struct sysdb_attrs *attrs, const char *name,
struct ldb_message_element *el;
int ret;
- ret = sysdb_attrs_get_el_int(attrs, name, false, &el);
+ ret = sysdb_attrs_get_el_ext(attrs, name, false, &el);
if (ret) {
return ret;
}
@@ -402,7 +402,7 @@ int sysdb_attrs_get_string_array(struct sysdb_attrs *attrs, const char *name,
unsigned int u;
const char **a;
- ret = sysdb_attrs_get_el_int(attrs, name, false, &el);
+ ret = sysdb_attrs_get_el_ext(attrs, name, false, &el);
if (ret) {
return ret;
}
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 7f2e41f9..90ec551c 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -196,6 +196,8 @@ int sysdb_attrs_add_time_t(struct sysdb_attrs *attrs,
const char *name, time_t value);
int sysdb_attrs_get_el(struct sysdb_attrs *attrs, const char *name,
struct ldb_message_element **el);
+int sysdb_attrs_get_el_ext(struct sysdb_attrs *attrs, const char *name,
+ bool alloc, struct ldb_message_element **el);
int sysdb_attrs_steal_string(struct sysdb_attrs *attrs,
const char *name, char *str);
int sysdb_attrs_get_string(struct sysdb_attrs *attrs, const char *name,