aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-04 22:14:00 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-04 22:14:00 +0200
commit879b9e62cfc2c27e8567930e881affefbfcef1d6 (patch)
tree6402df66030032b41ea11b6ea5d93f5f6d03d8ec
parenteed9d645552c7dca8b2cf0237d67a6affdf025a7 (diff)
downloadarctica-greeter-879b9e62cfc2c27e8567930e881affefbfcef1d6.tar.gz
arctica-greeter-879b9e62cfc2c27e8567930e881affefbfcef1d6.tar.bz2
arctica-greeter-879b9e62cfc2c27e8567930e881affefbfcef1d6.zip
src/user-list.vala: Obtain PAM_FREERDP2 prompts from public API in security/pam-freerdp2.h.
-rw-r--r--configure.ac3
-rw-r--r--debian/control1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/pam_freerdp2.vapi9
-rw-r--r--src/user-list.vala8
5 files changed, 17 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index c5576d2..5afd3e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,8 @@ dnl ##########################################################################
dnl Remote Logon Dependencies
dnl ##########################################################################
-AC_CHECK_HEADERS([security/pam-x2go.h])
+AC_CHECK_HEADERS([security/pam-x2go.h],[],AC_MSG_ERROR([Could not find security/pam-x2go.h]))
+AC_CHECK_HEADERS([security/pam-freerdp2.h],[],AC_MSG_ERROR([Could not find security/pam-freerdp2.h]))
dnl ###########################################################################
dnl Files to generate
diff --git a/debian/control b/debian/control
index 4cc96fc..b93ad9d 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Build-Depends: at-spi2-core,
libgtk-3-dev,
liblightdm-gobject-dev (>= 1.4.0) | liblightdm-gobject-1-dev (>= 1.4.0),
lightdm-vala | liblightdm-gobject-1-dev,
+ libpam-freerdp2-dev,
libpam-x2go-dev,
libpixman-1-dev,
numix-gtk-theme,
diff --git a/src/Makefile.am b/src/Makefile.am
index 4e9c567..6285029 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,6 +7,7 @@ arctica_greeter_SOURCES = \
config.vapi \
fixes.vapi \
indicator.vapi \
+ pam_freerdp2.vapi \
pam_x2go.vapi \
xsync.vapi \
animate-timer.vala \
diff --git a/src/pam_freerdp2.vapi b/src/pam_freerdp2.vapi
new file mode 100644
index 0000000..1193880
--- /dev/null
+++ b/src/pam_freerdp2.vapi
@@ -0,0 +1,9 @@
+[CCode (cprefix = "PAM_FREERDP2_", cheader_filename = "security/pam-freerdp2.h")]
+namespace pam_freerdp2
+{
+ public const string PROMPT_GUESTLOGIN;
+ public const string PROMPT_USER;
+ public const string PROMPT_HOST;
+ public const string PROMPT_DOMAIN;
+ public const string PROMPT_PASSWORD;
+}
diff --git a/src/user-list.vala b/src/user-list.vala
index 443dec8..a87612e 100644
--- a/src/user-list.vala
+++ b/src/user-list.vala
@@ -1095,24 +1095,24 @@ public class UserList : GreeterList
{
if (selected_entry.id.has_prefix ("*remote_login"))
{
- if ((text == pam_x2go.PROMPT_USER) || (text == "remote login:"))
+ if ((text == pam_x2go.PROMPT_USER) || (text == pam_freerdp2.PROMPT_USER))
{
Gtk.Entry field = current_remote_fields.get ("username") as Gtk.Entry;
var answer = field != null ? field.text : "";
ArcticaGreeter.singleton.respond (answer);
}
- else if ((text == pam_x2go.PROMPT_PASSWORD) || (text == "password:"))
+ else if ((text == pam_x2go.PROMPT_PASSWORD) || (text == pam_freerdp2.PROMPT_PASSWORD))
{
Gtk.Entry field = current_remote_fields.get ("password") as Gtk.Entry;
var answer = field != null ? field.text : "";
ArcticaGreeter.singleton.respond (answer);
}
- else if ((text == pam_x2go.PROMPT_HOST) || (text == "remote host:"))
+ else if ((text == pam_x2go.PROMPT_HOST) || (text == pam_freerdp2.PROMPT_HOST))
{
var answer = url_from_remote_loding_server_list_name (selected_entry.id);
ArcticaGreeter.singleton.respond (answer);
}
- else if (text == "domain:")
+ else if (text == pam_freerdp2.PROMPT_DOMAIN)
{
Gtk.Entry field = current_remote_fields.get ("domain") as Gtk.Entry;
var answer = field != null ? field.text : "";