diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-11-11 13:57:29 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-11-11 13:57:29 +0100 |
commit | 85fbeeb70b606ab5261cebdefa6bede0b7e383ea (patch) | |
tree | 3d6b047b05d1b69787e8e2e14e532fff9c4f64e9 /src | |
parent | 0680e4196606a0e697613433d79f00af95c328f3 (diff) | |
download | libpam-x2go-85fbeeb70b606ab5261cebdefa6bede0b7e383ea.tar.gz libpam-x2go-85fbeeb70b606ab5261cebdefa6bede0b7e383ea.tar.bz2 libpam-x2go-85fbeeb70b606ab5261cebdefa6bede0b7e383ea.zip |
Revert "Send EOL+EOF at end of socket transmission."
This reverts commit c4dbf5d89df4828137aeb5fc3bc8d9d0bf28a471.
Diffstat (limited to 'src')
-rw-r--r-- | src/pam-x2go-children.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pam-x2go-children.c b/src/pam-x2go-children.c index 67d3af1..e161ca3 100644 --- a/src/pam-x2go-children.c +++ b/src/pam-x2go-children.c @@ -65,7 +65,7 @@ pam_sm_authenticate_helper (int *stdinpipe, const char* username, const char* rh } if (setgid(pwdent->pw_gid) < 0 || setuid(pwdent->pw_uid) < 0 || - setegid(pwdent->pw_gid) < 0 || seteuid(pwdent->pw_uid) < 0) { + setegid(pwdent->pw_gid) < 0 || seteuid(pwdent->pw_uid) < 0) { _exit(EXIT_FAILURE); } @@ -138,7 +138,6 @@ session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruse buffer_len += strlen(rhost) + 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 */ - buffer_len += 2 /* one for EOL, another for EOF */ if (buffer_len < 5) { /* Don't need to clean up yet */ @@ -158,7 +157,7 @@ session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruse goto cleanup; } - buffer_fill = snprintf(buffer, buffer_len, "%s %s %s %s%s%s", ruser, rhost, rsession, password, EOL, EOF); + 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 |