diff options
author | Ted Gould <ted@gould.cx> | 2012-08-17 11:32:36 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-08-17 11:32:36 -0500 |
commit | 63c277fb4cb923b438070ae6d893f242e50981f3 (patch) | |
tree | 1e59c0231e56751ba49f2b06f1384a534b78ad49 | |
parent | 98fa7d94d0e96788fe7a89766203f31c0bad9fa1 (diff) | |
download | libpam-freerdp2-63c277fb4cb923b438070ae6d893f242e50981f3.tar.gz libpam-freerdp2-63c277fb4cb923b438070ae6d893f242e50981f3.tar.bz2 libpam-freerdp2-63c277fb4cb923b438070ae6d893f242e50981f3.zip |
Woot, we've got a PAM module
-rw-r--r-- | src/Makefile.am | 17 | ||||
-rw-r--r-- | src/pam-freerdp.c | 34 |
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 |