aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-04-24 18:40:54 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-04-24 18:40:54 +0200
commitf0759d14ca2c258b42e1401c9a686da14ed4f06c (patch)
tree5c41789281c987cd133499073addcd393a58bc1c /src
parent7e997b2c3497ad8be857072a9bfb5d77bfca2f8d (diff)
downloadlibpam-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».
Diffstat (limited to 'src')
-rw-r--r--src/pam-x2go-children.c2
-rw-r--r--src/pam-x2go-children.h3
-rw-r--r--src/pam-x2go.c26
-rw-r--r--src/x2go-auth-check.c2
4 files changed, 17 insertions, 16 deletions
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