aboutsummaryrefslogtreecommitdiff
path: root/src/pam-x2go-children.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pam-x2go-children.c')
-rw-r--r--src/pam-x2go-children.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pam-x2go-children.c b/src/pam-x2go-children.c
index e86da1f..2b27ba6 100644
--- a/src/pam-x2go-children.c
+++ b/src/pam-x2go-children.c
@@ -38,7 +38,7 @@
#include "auth-check-path.h"
void
-pam_sm_authenticate_helper (int *stdinpipe, const char* username, const char* rhost, const char* ruser, const char* rdomain)
+pam_sm_authenticate_helper (int *stdinpipe, const char* username, const char* rhost, const char* ruser, const char* rsession)
{
dup2(stdinpipe[0], 0);
@@ -48,7 +48,7 @@ pam_sm_authenticate_helper (int *stdinpipe, const char* username, const char* rh
args[0] = (char *)auth_check_path;
args[1] = (char *)rhost;
args[2] = (char *)ruser;
- args[3] = (char *)rdomain;
+ args[3] = (char *)rsession;
args[4] = NULL;
struct passwd * pwdent = getpwnam(username);
@@ -82,7 +82,7 @@ pam_sm_authenticate_helper (int *stdinpipe, const char* username, const char* rh
}
int
-session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruser, const char * rhost, const char * rdomain, const char * password)
+session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruser, const char * rhost, const char * rsession, const char * password)
{
/* Socket stuff */
int socketfd = 0;
@@ -126,15 +126,15 @@ session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruse
return EXIT_FAILURE;
}
- if (rdomain[0] == '\0') {
- rdomain = ".";
+ if (rsession[0] == '\0') {
+ rsession = "TERMINAL";
}
/* Build this up as a buffer so we can just write it and see that
very, very clearly */
buffer_len += strlen(ruser) + 1; /* Add one for the space */
buffer_len += strlen(rhost) + 1; /* Add one for the space */
- buffer_len += strlen(rdomain) + 1; /* Add one for the space */
+ buffer_len += strlen(rsession) + 1; /* Add one for the space */
buffer_len += strlen(password) + 1; /* Add one for the NULL */
if (buffer_len < 5) {
@@ -155,7 +155,7 @@ session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruse
goto cleanup;
}
- buffer_fill = snprintf(buffer, buffer_len, "%s %s %s %s", ruser, password, rhost, rdomain);
+ buffer_fill = snprintf(buffer, buffer_len, "%s %s %s %s", ruser, rhost, rsession, password);
if (buffer_fill > buffer_len) {
/* This really shouldn't happen, but if for some reason we have an
difference between they way that the lengths are calculated we want