aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-17 11:32:36 -0500
committerTed Gould <ted@gould.cx>2012-08-17 11:32:36 -0500
commitfd92d9b4252d98acab56a9b60ea5d3bdc2ecc404 (patch)
tree1e59c0231e56751ba49f2b06f1384a534b78ad49 /src
parent497c3e3ff6b0055e40fa5fad3db248a48902f40a (diff)
downloadlibpam-x2go-fd92d9b4252d98acab56a9b60ea5d3bdc2ecc404.tar.gz
libpam-x2go-fd92d9b4252d98acab56a9b60ea5d3bdc2ecc404.tar.bz2
libpam-x2go-fd92d9b4252d98acab56a9b60ea5d3bdc2ecc404.zip
Woot, we've got a PAM module
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am17
-rw-r--r--src/pam-freerdp.c34
2 files changed, 51 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e69de29..a63960c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -0,0 +1,17 @@
+
+pamlibdir = $(PAMMODULEDIR)
+pamlib_LTLIBRARIES = pam-freerdp.la
+
+pam_freerdp_la_SOURCES = \
+ pam-freerdp.c
+
+pam_freerdp_la_LDFLAGS = \
+ -no-undefined \
+ -module \
+ -avoid-version
+
+pam_freerdp_la_LIBADD = \
+ -lpam
+
+pam_freerdp_la_CFLAGS = \
+ -Wall -Werror
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
new file mode 100644
index 0000000..6466a06
--- /dev/null
+++ b/src/pam-freerdp.c
@@ -0,0 +1,34 @@
+#include <security/pam_modules.h>
+#include <security/pam_modutil.h>
+
+PAM_EXTERN int
+pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv)
+{
+ return PAM_IGNORE;
+}
+
+PAM_EXTERN int
+pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char **argv)
+{
+ return PAM_IGNORE;
+}
+
+PAM_EXTERN int
+pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv)
+{
+ return PAM_IGNORE;
+}
+
+#ifdef PAM_STATIC
+
+struct pam_module _pam_temp_account_modstruct = {
+ "pam-freerdp",
+ pam_sm_authenticate,
+ NULL,
+ NULL,
+ pam_sm_open_session,
+ pam_sm_close_session,
+ NULL,
+};
+
+#endif