[X2Go-Commits] libpam-x2go.git - build-main (branch) updated: 200ccab9283410f1ddf65cce7d0f1b77dc5dcbcf

X2Go dev team git-admin at x2go.org
Sat Apr 27 13:45:27 CEST 2013


The branch, build-main has been updated
       via  200ccab9283410f1ddf65cce7d0f1b77dc5dcbcf (commit)
      from  35dc28b34f75794f4e88add4298032d236b167e1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 src/pam-freerdp.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index d8c6703..7bd2657 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -3,6 +3,8 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/wait.h>
+#include <sys/types.h>
+#include <pwd.h>
 
 #include <security/pam_modules.h>
 #include <security/pam_modutil.h>
@@ -108,20 +110,24 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv)
 	case 0: { /* child */
 		dup2(stdinpipe[0], 0);
 
-		char * args[8];
+		char * args[7];
 
 		args[0] = XFREERDP;
 		args[1] = "--plugin";
 		args[2] = "rdpsnd.so";
 		args[3] = "--no-nla";
 		args[4] = "-f";
-		args[5] = "--ignore-certificate"; /* TODO: Change when we set the home directory properly */
-		args[6] = "--from-stdin";
-		
-		args[7] = NULL;
+		args[5] = "--from-stdin";
+		args[6] = NULL;
+
+		struct passwd * pwdent = getpwnam(username);
+		if (pwdent == NULL) {
+			_exit(-1);
+		}
+
+		setenv("HOME", pwdent->pw_dir, 1);
 
 		/* TODO: Drop privs */
-		/* TODO: Home directory environment to user's home */
 		execvp(args[0], args);
 		_exit(EXIT_FAILURE);
 		break;


hooks/post-receive
-- 
libpam-x2go.git (Remote login session via X2Go (PAM module))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libpam-x2go.git" (Remote login session via X2Go (PAM module)).




More information about the x2go-commits mailing list