aboutsummaryrefslogtreecommitdiff
path: root/src/pam-x2go.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-11-09 12:04:48 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-11-09 12:04:48 +0100
commitedd14a06a92de3b1275f4aeb377d8fa3852f823e (patch)
tree64f22a313e0694b6b5431169e4732c2fd707fb39 /src/pam-x2go.c
parent42b8b279e62e6e2f5a7455e30bb0a211763ee187 (diff)
downloadlibpam-x2go-edd14a06a92de3b1275f4aeb377d8fa3852f823e.tar.gz
libpam-x2go-edd14a06a92de3b1275f4aeb377d8fa3852f823e.tar.bz2
libpam-x2go-edd14a06a92de3b1275f4aeb377d8fa3852f823e.zip
Adaptations of the forked original to work with X2Go: Check the authentication token via libssh (ssh login to the remote server).
Diffstat (limited to 'src/pam-x2go.c')
-rw-r--r--src/pam-x2go.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/pam-x2go.c b/src/pam-x2go.c
index 8979e6e..8ca5147 100644
--- a/src/pam-x2go.c
+++ b/src/pam-x2go.c
@@ -34,7 +34,7 @@
#include <security/pam_modutil.h>
#include <security/pam_appl.h>
-#include "pam-freerdp-children.h"
+#include "pam-x2go-children.h"
#include "auth-check-path.h"
static int unpriveleged_kill (struct passwd * pwdent);
@@ -126,18 +126,6 @@ get_item (pam_handle_t * pamh, int type)
}
}
- /* The way that xfreerdp does parsing means that we can't handle
- spaces in the username. Let's block them as early as possible.
- Though, if the xfreerdp part gets fixed, we want this to disappear
- http://launchpad.net/bugs/1053102
- */
- if (type == PAM_RUSER) {
- if (strstr(promptval, " ") != NULL) {
- free(promptval);
- return NULL;
- }
- }
-
if (type == PAM_RHOST) {
char * subloc = strstr(promptval, "://");
if (subloc != NULL) {
@@ -205,7 +193,7 @@ get_item (pam_handle_t * pamh, int type)
}
/* Authenticate. We need to make sure we have a user account, that
- there are remote accounts and then verify them with FreeRDP */
+ there are remote accounts and then verify them with X2Go */
PAM_EXTERN int
pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv)
{
@@ -270,7 +258,7 @@ done:
pid_t session_pid = 0;
/* Open Session. Here we need to fork a little process so that we can
give the credentials to the session itself so that it can startup the
- xfreerdp viewer for the login */
+ PyHoca (X2Go) client for the login */
PAM_EXTERN int
pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv)
{
@@ -426,8 +414,8 @@ pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv)
#ifdef PAM_STATIC
-struct pam_module _pam_freerdp_modstruct = {
- "pam_freerdp",
+struct pam_module _pam_x2go_modstruct = {
+ "pam_x2go",
pam_sm_authenticate,
pam_sm_setcred,
NULL,