diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-04-24 18:40:54 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-04-24 18:40:54 +0200 |
commit | f0759d14ca2c258b42e1401c9a686da14ed4f06c (patch) | |
tree | 5c41789281c987cd133499073addcd393a58bc1c | |
parent | 7e997b2c3497ad8be857072a9bfb5d77bfca2f8d (diff) | |
download | libpam-x2go-f0759d14ca2c258b42e1401c9a686da14ed4f06c.tar.gz libpam-x2go-f0759d14ca2c258b42e1401c9a686da14ed4f06c.tar.bz2 libpam-x2go-f0759d14ca2c258b42e1401c9a686da14ed4f06c.zip |
Adapt to changes in lightdm-remote-login-x2go (0.0.1.0). Expect a UCCS service that supports session type »x2go».
-rw-r--r-- | .bzrignore | 14 | ||||
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/control | 8 | ||||
-rw-r--r-- | debian/copyright | 4 | ||||
-rw-r--r-- | src/pam-x2go-children.c | 2 | ||||
-rw-r--r-- | src/pam-x2go-children.h | 3 | ||||
-rw-r--r-- | src/pam-x2go.c | 26 | ||||
-rw-r--r-- | src/x2go-auth-check.c | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 8 | ||||
-rw-r--r-- | tests/mock_guest.c | 2 | ||||
-rw-r--r-- | tests/mock_guest.h | 2 | ||||
-rw-r--r-- | tests/mock_pam.c | 6 | ||||
-rw-r--r-- | tests/mock_pam.h | 2 | ||||
-rw-r--r-- | tests/test-x2go-auth.c | 6 | ||||
-rw-r--r-- | tests/test-x2go-wrapper.cc | 12 |
17 files changed, 61 insertions, 56 deletions
@@ -1,7 +1,7 @@ -libpam-freerdp-[0-9].[0-9].[0-9].tar.gz -libpam-freerdp-[0-9].[0-9].[0-9].tar.gz.asc -src/pam_freerdp.la -src/pam_freerdp_la-pam-freerdp.lo -src/pam_freerdp_la-pam-freerdp.o -src/pam-freerdp.la -freerdp-auth-check +libpam-x2go-[0-9].[0-9].[0-9].tar.gz +libpam-x2go-[0-9].[0-9].[0-9].tar.gz.asc +src/pam_x2go.la +src/pam_x2go_la-pam-x2go.lo +src/pam_x2go_la-pam-x2go.o +src/pam-x2go.la +x2go-auth-check @@ -1,7 +1,7 @@ -libpam-freerdp-[0-9].[0-9].[0-9].tar.gz -libpam-freerdp-[0-9].[0-9].[0-9].tar.gz.asc -src/pam_freerdp.la -src/pam_freerdp_la-pam-freerdp.lo -src/pam_freerdp_la-pam-freerdp.o -src/pam-freerdp.la -freerdp-auth-check +libpam-x2go-[0-9].[0-9].[0-9].tar.gz +libpam-x2go-[0-9].[0-9].[0-9].tar.gz.asc +src/pam_x2go.la +src/pam_x2go_la-pam-x2go.lo +src/pam_x2go_la-pam-x2go.o +src/pam-x2go.la +x2go-auth-check @@ -1 +1 @@ -A small PAM module to check FreeRDP for credentials +A small PAM module to check an X2Go Server (SSH) for credentials diff --git a/debian/changelog b/debian/changelog index 8a706ff..7794a20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ libpam-x2go (0.0.1.0-0~x2go1) UNRELEASED; urgency=low - * Continue development... + * New upstream version (0.0.1.0): + - Adapt to changes in lightdm-remote-login-x2go (0.0.1.0). Expect + a UCCS service that supports session type »x2go». -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 24 Apr 2013 18:30:42 +0200 diff --git a/debian/control b/debian/control index d97f7c4..907cd60 100644 --- a/debian/control +++ b/debian/control @@ -12,17 +12,19 @@ Build-Depends: pkg-config, cdbs (>= 0.4.93~), dh-autoreconf, -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 Homepage: http://wiki.x2go.org Vcs-Git: git://code.x2go.org/libpam-x2go.git +Vcs-Browser: http://code.x2go.org/gitweb?p=libpam-x2go.git;a=summary Package: libpam-x2go Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - pyhoca-cli, +Suggests: + x2goclient | pyhoca-cli, Description: PAM Module to auth against an X2Go server using PyHoca - Auth and session PAM module that uses PyHoca to authenticate against + 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. diff --git a/debian/copyright b/debian/copyright index 874cd91..80ffaba 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,13 +4,13 @@ Source: http://code.x2go.org/gitweb?p=libpam-x2go.git;a=summary Files: * Copyright: - 2012, Mike Gabriel (X2Go Project) <mike.gabriel@das-netzwerkteam.de> + 2012-2013, Mike Gabriel (X2Go Project) <mike.gabriel@das-netzwerkteam.de> 2012, Canonical Ltd. License: GPL-3 Files: debian/* Copyright: - 2012, Mike Gabriel (X2Go Project) <mike.gabriel@das-netzwerkteam.de> + 2012-2013, Mike Gabriel (X2Go Project) <mike.gabriel@das-netzwerkteam.de> License: GPL-3 License: GPL-3 diff --git a/src/pam-x2go-children.c b/src/pam-x2go-children.c index e161ca3..d719a53 100644 --- a/src/pam-x2go-children.c +++ b/src/pam-x2go-children.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + * 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 diff --git a/src/pam-x2go-children.h b/src/pam-x2go-children.h index 4cf8e63..f46c3cf 100644 --- a/src/pam-x2go-children.h +++ b/src/pam-x2go-children.h @@ -1,4 +1,5 @@ /* + * 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 @@ -19,7 +20,7 @@ #ifndef _PAM_X2GO_CHILDREN_H_ #define _PAM_X2GO_CHILDREN_H_ -#define PAM_TYPE_DOMAIN 1234 +#define PAM_TYPE_SESSIONTYPE 1234 #define ALL_GOOD_SIGNAL "Ar, ready to authenticate cap'n" void diff --git a/src/pam-x2go.c b/src/pam-x2go.c index 4744e2b..49df1db 100644 --- a/src/pam-x2go.c +++ b/src/pam-x2go.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + * 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 @@ -56,9 +56,9 @@ get_item (pam_handle_t * pamh, int type) { /* Check to see if we just have the value. If we do, great let's dup it some we're consistently allocating memory */ - if (type != PAM_TYPE_DOMAIN) { - /* If it's not a domain we can use the PAM functions because the PAM - functions don't support the domain */ + if (type != PAM_TYPE_SESSIONTYPE) { + /* If it's not a session type we can use the PAM functions because the PAM + functions don't support session type */ char * value = NULL; if (pam_get_item(pamh, type, (const void **)&value) == PAM_SUCCESS && value != NULL) { return value; @@ -69,7 +69,7 @@ get_item (pam_handle_t * pamh, int type) return global_password; } } else { - /* Here we only have domains, so we can see if the global domain is + /* Here we only have session type, so we can see if the global session type is useful for us, if we have it */ if (global_session != NULL) { return global_session; @@ -98,8 +98,8 @@ get_item (pam_handle_t * pamh, int type) message.msg = "password:"; message.msg_style = PAM_PROMPT_ECHO_OFF; break; - case PAM_TYPE_DOMAIN: - message.msg = "domain:"; + case PAM_TYPE_SESSIONTYPE: + message.msg = "sessiontype:"; break; default: return NULL; @@ -148,14 +148,14 @@ get_item (pam_handle_t * pamh, int type) char * retval = NULL; if (promptval != NULL) { /* Can't believe it really would be at this point, but let's be sure */ - if (type != PAM_TYPE_DOMAIN) { - /* We can only use the PAM functions if it's not the domain */ + if (type != PAM_TYPE_SESSIONTYPE) { + /* We can only use the PAM functions if it's not the session type */ pam_set_item(pamh, type, (const void *)promptval); /* We're returning the value saved by PAM so we can clear promptval */ pam_get_item(pamh, type, (const void **)&retval); } - if (type == PAM_TYPE_DOMAIN) { - /* The domain can be saved globally so we can use it for open */ + if (type == PAM_TYPE_SESSIONTYPE) { + /* The session type can be saved globally so we can use it for open */ if (global_session != NULL) { free(global_session); } @@ -213,7 +213,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) GET_ITEM(username, PAM_USER); GET_ITEM(ruser, PAM_RUSER); GET_ITEM(rhost, PAM_RHOST); - GET_ITEM(rsession, PAM_TYPE_DOMAIN); + GET_ITEM(rsession, PAM_TYPE_SESSIONTYPE); GET_ITEM(password, PAM_AUTHTOK); int stdinpipe[2]; @@ -278,7 +278,7 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv GET_ITEM(username, PAM_USER); GET_ITEM(ruser, PAM_RUSER); GET_ITEM(rhost, PAM_RHOST); - GET_ITEM(rsession, PAM_TYPE_DOMAIN); + GET_ITEM(rsession, PAM_TYPE_SESSIONTYPE); GET_ITEM(password, PAM_AUTHTOK); struct passwd * pwdent = getpwnam(username); diff --git a/src/x2go-auth-check.c b/src/x2go-auth-check.c index 2306139..3037e18 100644 --- a/src/x2go-auth-check.c +++ b/src/x2go-auth-check.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + * 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 diff --git a/tests/Makefile.am b/tests/Makefile.am index 97f137d..ce629ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -41,21 +41,21 @@ libgtest_a_CXXFLAGS = \ test_x2go_wrapper: test-x2go-auth -test_pyhoca_wrapper_SOURCES = \ +test_x2go_wrapper_SOURCES = \ mock_pam.c mock_pam.h \ mock_guest.c mock_guest.h \ test-x2go-wrapper.cc -test_pyhoca_wrapper_LDADD = \ +test_x2go_wrapper_LDADD = \ $(top_builddir)/src/libssh.la \ libgtest.a -test_pyhoca_wrapper_CXXFLAGS = \ +test_x2go_wrapper_CXXFLAGS = \ $(AM_CXXFLAGS) \ -DAUTH_CHECK="\"$(abs_builddir)/test-x2go-auth\"" \ -I${top_srcdir}/src -test_pyhoca_wrapper_LDFLAGS = \ +test_x2go_wrapper_LDFLAGS = \ -pthread ########################## diff --git a/tests/mock_guest.c b/tests/mock_guest.c index fab61e2..ea4861b 100644 --- a/tests/mock_guest.c +++ b/tests/mock_guest.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. + * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. * Copyright © 2012 Canonical Ltd. All rights reserved. * * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de> diff --git a/tests/mock_guest.h b/tests/mock_guest.h index 8257d30..b7c78e8 100644 --- a/tests/mock_guest.h +++ b/tests/mock_guest.h @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. + * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. * Copyright © 2012 Canonical Ltd. All rights reserved. * * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de> diff --git a/tests/mock_pam.c b/tests/mock_pam.c index 2da9963..64c503f 100644 --- a/tests/mock_pam.c +++ b/tests/mock_pam.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. + * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. * Copyright © 2012 Canonical Ltd. All rights reserved. * * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de> @@ -39,8 +39,8 @@ int fake_conv (int num_msg, const struct pam_message **msg, response->resp = strdup ("protocol://rhost/dummy"); else if (strcmp((*msg)->msg, "password:") == 0) response->resp = strdup ("password"); - else if (strcmp((*msg)->msg, "domain:") == 0) - response->resp = strdup ("domain"); + else if (strcmp((*msg)->msg, "sessiontype:") == 0) + response->resp = strdup ("sessiontype"); else return PAM_SYMBOL_ERR; /* leaks... */ diff --git a/tests/mock_pam.h b/tests/mock_pam.h index 9bdd74d..c335e49 100644 --- a/tests/mock_pam.h +++ b/tests/mock_pam.h @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. + * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. * Copyright © 2012 Canonical Ltd. All rights reserved. * * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de> diff --git a/tests/test-x2go-auth.c b/tests/test-x2go-auth.c index 1753f9b..592f0c7 100644 --- a/tests/test-x2go-auth.c +++ b/tests/test-x2go-auth.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + * 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 @@ -45,8 +45,8 @@ main (int argc, char * argv[]) return -1; } - /* Check domain */ - if (strcmp(argv[3], "domain")) { + /* Check session type */ + if (strcmp(argv[3], "sessiontype")) { return -1; } diff --git a/tests/test-x2go-wrapper.cc b/tests/test-x2go-wrapper.cc index 24e49c0..a792d3e 100644 --- a/tests/test-x2go-wrapper.cc +++ b/tests/test-x2go-wrapper.cc @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. + * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. * Copyright © 2012 Canonical Ltd. All rights reserved. * * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de> @@ -23,17 +23,17 @@ const char * auth_check_path = AUTH_CHECK; namespace { // The fixture for testing class Foo. - class PyhocaWrapperTest : public ::testing::Test { + class X2GoWrapperTest : public ::testing::Test { protected: // You can remove any or all of the following functions if its body // is empty. - PyhocaWrapperTest() { + X2GoWrapperTest() { // You can do set-up work for each test here. setenv("HOME", "/tmp", 1 /* overwrite */); } - virtual ~PyhocaWrapperTest() { + virtual ~X2GoWrapperTest() { // You can do clean-up work that doesn't throw exceptions here. } @@ -55,12 +55,12 @@ namespace { // Objects declared here can be used by all tests in the test case for Foo. }; - TEST_F(PyhocaWrapperTest, canLinkTheWholeGang) { + TEST_F(X2GoWrapperTest, canLinkTheWholeGang) { EXPECT_EQ (1, 1); // right, that's trivial, but that means // that I got all of the wrapper and pam to link there } - TEST_F(PyhocaWrapperTest, canCallPamOpenSession) { + TEST_F(X2GoWrapperTest, canCallPamOpenSession) { const char *argv[] = { NULL }; pam_handle_t *pamh = pam_handle_new (); |