aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-04 15:48:07 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-04 15:48:27 +0200
commit8ad83579d01fa02d68aa81fc49dc6abbb458dc04 (patch)
tree496b51295ec6cc7e9686308b05e570a4e0253290
parent17aeb03f42e28d3bc990fe95eb774a2ec2e18720 (diff)
downloadlibpam-freerdp2-8ad83579d01fa02d68aa81fc49dc6abbb458dc04.tar.gz
libpam-freerdp2-8ad83579d01fa02d68aa81fc49dc6abbb458dc04.tar.bz2
libpam-freerdp2-8ad83579d01fa02d68aa81fc49dc6abbb458dc04.zip
include/pam-freerdp2.h: Exclude PAM prompts via public API so they can be used by e.g. Arctica Greeter.
-rw-r--r--configure.ac2
-rw-r--r--debian/control11
-rw-r--r--debian/libpam-freerdp2-dev.install1
-rw-r--r--debian/libpam-freerdp2.install2
-rw-r--r--include/pam-freerdp2.h29
-rw-r--r--src/Makefile.am12
-rw-r--r--src/pam-freerdp.c2
7 files changed, 58 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8d75950..b3daef1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_INIT([libpam-freerdp2], [1.0.1])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
-AM_INIT_AUTOMAKE([-Wno-portability])
+AM_INIT_AUTOMAKE([-Wno-portability subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
diff --git a/debian/control b/debian/control
index 86457da..a43b051 100644
--- a/debian/control
+++ b/debian/control
@@ -22,3 +22,14 @@ Description: PAM Module to auth against an RDP server using FreeRDPv2
Auth and session PAM module that uses FreeRDPv2 to authenticate against
an RDP server as the remote host and user. Local account required.
Most useful with the pam-temp-account module.
+
+Package: libpam-freerdp2-dev
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+Description: PAM Module to auth against an RDP server using FreeRDPv2 (development files)
+ Auth and session PAM module that uses FreeRDPv2 to authenticate against
+ an RDP server as the remote host and user. Local account required.
+ Most useful with the pam-temp-account module.
+ .
+ This package contains the pam_freerdp2.so header files.
diff --git a/debian/libpam-freerdp2-dev.install b/debian/libpam-freerdp2-dev.install
new file mode 100644
index 0000000..175bba7
--- /dev/null
+++ b/debian/libpam-freerdp2-dev.install
@@ -0,0 +1 @@
+usr/include/security/
diff --git a/debian/libpam-freerdp2.install b/debian/libpam-freerdp2.install
new file mode 100644
index 0000000..46af1b1
--- /dev/null
+++ b/debian/libpam-freerdp2.install
@@ -0,0 +1,2 @@
+lib/
+usr/lib/
diff --git a/include/pam-freerdp2.h b/include/pam-freerdp2.h
new file mode 100644
index 0000000..3635a4f
--- /dev/null
+++ b/include/pam-freerdp2.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+ * Copyright © 2012 Canonical Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranties of
+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+ */
+
+#ifndef _PAM_FREERDP2_H_
+#define _PAM_FREERDP2_H_
+
+#define PAM_FREERDP2_PROMPT_GUESTLOGIN "login:"
+#define PAM_FREERDP2_PROMPT_USER "remote login:"
+#define PAM_FREERDP2_PROMPT_HOST "remote host:"
+#define PAM_FREERDP2_PROMPT_DOMAIN "remote domain:"
+#define PAM_FREERDP2_PROMPT_PASSWORD "password:"
+
+#endif //_PAM_FREERDP2_H_
diff --git a/src/Makefile.am b/src/Makefile.am
index 4eb3aa0..efc3adc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,5 @@
+NULL =
+
pamlibdir = $(PAMMODULEDIR)
pamlib_LTLIBRARIES = pam_freerdp2.la
@@ -18,6 +20,11 @@ pam_freerdp2_la_CFLAGS = \
pam_freerdp2_la_LIBADD = \
$(builddir)/libfreerdp2core.la
+pam_freerdp2includedir = $(includedir)/security/
+pam_freerdp2include_HEADERS = \
+ $(top_srcdir)/include/pam-freerdp2.h \
+ $(NULL)
+
noinst_LTLIBRARIES = \
libfreerdp2core.la
@@ -29,9 +36,14 @@ libfreerdp2core_la_CFLAGS = \
$(COVERAGE_CFLAGS)
libfreerdp2core_la_LIBADD = \
-lpam
+libfreerdp2core_la_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(NULL)
libfreerdp2core_la_LDFLAGS = \
$(COVERAGE_LDFLAGS)
+
+
pkglibexec_PROGRAMS = \
freerdp2-auth-check
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 908c54d..e331732 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -36,6 +36,8 @@
#include <security/pam_modutil.h>
#include <security/pam_appl.h>
+#include "pam-freerdp2.h"
+
#include "pam-freerdp-children.h"
#include "auth-check-path.h"