aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-04 15:09:56 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-04 15:09:56 +0200
commit74ee30f7ea60054196f1f6068f0f98f163159e9d (patch)
tree0daeac2b2d6b92ee43ba882d97cc708ca1c59788
parent4b2c5174eed10ba5d342face4975b209badf81b8 (diff)
downloadlibpam-x2go-74ee30f7ea60054196f1f6068f0f98f163159e9d.tar.gz
libpam-x2go-74ee30f7ea60054196f1f6068f0f98f163159e9d.tar.bz2
libpam-x2go-74ee30f7ea60054196f1f6068f0f98f163159e9d.zip
include/pam-x2go.h: Move login prompt strings into public include file, so it can be used by e.g. Arctica Greeter.
-rw-r--r--debian/control13
-rw-r--r--src/Makefile.am11
-rw-r--r--src/pam-x2go.c12
3 files changed, 31 insertions, 5 deletions
diff --git a/debian/control b/debian/control
index 0f87210..2bfd1f9 100644
--- a/debian/control
+++ b/debian/control
@@ -29,3 +29,16 @@ Description: PAM Module to auth against an X2Go server using PyHoca
Auth and session PAM module that uses SSH to authenticate against
an X2Go server as the remote host and user. Local account required.
Most useful with the pam-temp-account module.
+
+Package: libpam-x2go-dev
+Section: libdevel
+Architecture: any
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: PAM Module to auth against an X2Go server using PyHoca (development files)
+ Auth and session PAM module that uses SSH to authenticate against
+ an X2Go server as the remote host and user. Local account required.
+ Most useful with the pam-temp-account module.
+ .
+ This package contains the pam_x2go.so header files.
diff --git a/src/Makefile.am b/src/Makefile.am
index e09c057..49d5639 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,5 @@
+NULL =
+
pamlibdir = $(PAMMODULEDIR)
pamlib_LTLIBRARIES = pam_x2go.la
@@ -17,9 +19,18 @@ pam_x2go_la_CFLAGS = \
-DAUTH_CHECK="\"$(libexecdir)/x2go-auth-check\"" \
$(COVERAGE_CFLAGS)
+pam_x2go_la_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(NULL)
+
pam_x2go_la_LIBADD = \
-lpam
+pam_x2goincludedir = $(includedir)/security/
+pam_x2goinclude_HEADERS = \
+ $(top_srcdir)/include/pam-x2go.h \
+ $(NULL)
+
libexec_PROGRAMS = \
x2go-auth-check
diff --git a/src/pam-x2go.c b/src/pam-x2go.c
index 180ec0a..0d168f1 100644
--- a/src/pam-x2go.c
+++ b/src/pam-x2go.c
@@ -38,6 +38,8 @@
#include <security/pam_modutil.h>
#include <security/pam_appl.h>
+#include "pam-x2go.h"
+
#include "pam-x2go-children.h"
#include "auth-check-path.h"
@@ -93,20 +95,20 @@ get_item (pam_handle_t * pamh, int type)
switch (type) {
case PAM_USER:
- message.msg = "login:";
+ message.msg = PAM_X2GO_PROMPT_GUESTLOGIN;
break;
case PAM_TYPE_X2GO_USER:
- message.msg = "remote login:";
+ message.msg = PAM_X2GO_PROMPT_USER;
break;
case PAM_TYPE_X2GO_SERVER:
- message.msg = "remote host:";
+ message.msg = PAM_X2GO_PROMPT_HOST;;
break;
case PAM_AUTHTOK:
- message.msg = "password:";
+ message.msg = PAM_X2GO_PROMPT_PASSWORD;
message.msg_style = PAM_PROMPT_ECHO_OFF;
break;
case PAM_TYPE_X2GO_COMMAND:
- message.msg = "remote command:";
+ message.msg = PAM_X2GO_PROMPT_COMMAND;
break;
default:
return NULL;