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:27:02 +0200
commit74c85b07831edb520764bfb0f997576ff355c681 (patch)
tree6d5104612c66fcd9a7746efccdea9282fe0d71c8
parent9356e8f50436724e985d9a8f5d4f2bc0f5b837bc (diff)
downloadsssd-74c85b07831edb520764bfb0f997576ff355c681.tar.gz
sssd-74c85b07831edb520764bfb0f997576ff355c681.tar.xz
sssd-74c85b07831edb520764bfb0f997576ff355c681.zip
SYSDB: Make sysdb_attrs_get_el_int() public
Also rename it to sysdb_attrs_get_el_ext()
-rw-r--r--src/db/sysdb.c16
-rw-r--r--src/db/sysdb.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 2790d28fe..863707dec 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -300,8 +300,8 @@ struct sysdb_attrs *sysdb_new_attrs(TALLOC_CTX *mem_ctx)
return talloc_zero(mem_ctx, 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;
@@ -340,7 +340,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,
@@ -349,7 +349,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;
}
@@ -370,7 +370,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;
}
@@ -396,7 +396,7 @@ int sysdb_attrs_get_uint16_t(struct sysdb_attrs *attrs, const char *name,
char *endptr;
uint16_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;
}
@@ -420,7 +420,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;
}
@@ -444,7 +444,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 1f14b7481..4e4581731 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -266,6 +266,8 @@ int sysdb_attrs_copy_values(struct sysdb_attrs *src,
const char *name);
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,