summaryrefslogtreecommitdiffstats
path: root/login-utils/logindefs.h
diff options
context:
space:
mode:
authorKarel Zak2011-10-05 12:10:26 +0200
committerKarel Zak2011-10-26 23:17:17 +0200
commitc82d9c977c7fdf28ede2db15601edde1a5819511 (patch)
treef8173e4967e03186f3ae1bdbfe85a273006c46f6 /login-utils/logindefs.h
parenttests: cleanup islocal test (diff)
downloadkernel-qcow2-util-linux-c82d9c977c7fdf28ede2db15601edde1a5819511.tar.gz
kernel-qcow2-util-linux-c82d9c977c7fdf28ede2db15601edde1a5819511.tar.xz
kernel-qcow2-util-linux-c82d9c977c7fdf28ede2db15601edde1a5819511.zip
login: add login.defs code and tests
The new logindefs.c file contains /etc/login.defs parser and functions for searching in the list of the login default variables. The patch also contains a new regression test for the code. Based on pam_login-4.0 from Suse. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/logindefs.h')
-rw-r--r--login-utils/logindefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/login-utils/logindefs.h b/login-utils/logindefs.h
new file mode 100644
index 000000000..37d19e1f7
--- /dev/null
+++ b/login-utils/logindefs.h
@@ -0,0 +1,9 @@
+#ifndef UTIL_LINUX_LOGINDEFS_H
+#define UTIL_LINUX_LOGINDEFS_H
+
+extern int getlogindefs_bool(const char *name, int dflt);
+extern long getlogindefs_num(const char *name, long dflt);
+extern const char *getlogindefs_str(const char *name, const char *dflt);
+extern void free_getlogindefs_data(void);
+
+#endif /* UTIL_LINUX_LOGINDEFS_H */