aboutsummaryrefslogtreecommitdiffstats
path: root/USER
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2003-04-24 09:13:20 +0000
committerDaouda Lo <daouda@mandriva.com>2003-04-24 09:13:20 +0000
commita7ac43c93d98debdf89a66de9e155a3b502a375b (patch)
tree240c72c82935fdd9a1bbe1eb77349da9e7b02e16 /USER
parent9c543d9ed8d4baa172487373b9c480d89c46b409 (diff)
downloaduserdrake-a7ac43c93d98debdf89a66de9e155a3b502a375b.tar
userdrake-a7ac43c93d98debdf89a66de9e155a3b502a375b.tar.gz
userdrake-a7ac43c93d98debdf89a66de9e155a3b502a375b.tar.bz2
userdrake-a7ac43c93d98debdf89a66de9e155a3b502a375b.tar.xz
userdrake-a7ac43c93d98debdf89a66de9e155a3b502a375b.zip
- get_user_shells
Diffstat (limited to 'USER')
-rw-r--r--USER/USER.xs18
1 files changed, 17 insertions, 1 deletions
diff --git a/USER/USER.xs b/USER/USER.xs
index 9a64433..5505d95 100644
--- a/USER/USER.xs
+++ b/USER/USER.xs
@@ -146,7 +146,23 @@ Admin_groups_enumerate_full(self, pattern)
g_ptr_array_free(accounts, TRUE);
OUTPUT:
RETVAL
-
+
+AV *
+Admin_get_user_shells(self)
+ USER::ADMIN *self
+ CODE:
+ int i = 0;
+ const char *shell;
+ RETVAL = (AV*)sv_2mortal((SV*)newAV());
+ setusershell();
+ while ((shell = getusershell()) != NULL) {
+ av_store(RETVAL, i, newSVpv(shell, 0));
+ i++;
+ }
+ endusershell();
+ OUTPUT:
+ RETVAL
+
MODULE = USER PACKAGE = USER::ENT PREFIX = Ent_
USER::ENT *