summaryrefslogtreecommitdiffstats
path: root/src/account/aux_lu.c
diff options
context:
space:
mode:
authorRoman Rakus <rrakus@redhat.com>2012-08-14 15:10:03 +0200
committerRoman Rakus <rrakus@redhat.com>2012-08-14 15:11:43 +0200
commite84ef5b99ff28063dcda246aa2746177bcc22e9b (patch)
treef9b8308d041857e3ab09ba49c23dc39909c5fdd7 /src/account/aux_lu.c
parent8e14ce31d9c6ad81a337e51647ab9fa16e62cbe7 (diff)
downloadopenlmi-providers-e84ef5b99ff28063dcda246aa2746177bcc22e9b.tar.gz
openlmi-providers-e84ef5b99ff28063dcda246aa2746177bcc22e9b.tar.xz
openlmi-providers-e84ef5b99ff28063dcda246aa2746177bcc22e9b.zip
Account provider0.0.2
Listing of the users and groups Signed-off-by: Roman Rakus <rrakus@redhat.com>
Diffstat (limited to 'src/account/aux_lu.c')
-rw-r--r--src/account/aux_lu.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/account/aux_lu.c b/src/account/aux_lu.c
new file mode 100644
index 0000000..2907214
--- /dev/null
+++ b/src/account/aux_lu.c
@@ -0,0 +1,22 @@
+#include "aux_lu.h"
+#include <libuser/entity.h>
+#include <libuser/user.h>
+
+/*
+ * Get the value of type from the given entity
+ * returns string
+ */
+char* aux_lu_get_str(struct lu_ent* ent, char* type)
+{
+ return g_value_get_string(g_value_array_get_nth(lu_ent_get(ent, type), 0));
+}
+
+/*
+ * Get the value of type from the given entity
+ * returns long int
+ */
+long aux_lu_get_long(struct lu_ent* ent, char* type)
+{
+ return g_value_get_long(g_value_array_get_nth(lu_ent_get(ent, type), 0));
+}
+