aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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