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

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


The branch, build-main has been updated
       via  c5889e2f6801c8454ce20d844f7e3f5b6c9543cb (commit)
      from  200ccab9283410f1ddf65cce7d0f1b77dc5dcbcf (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 |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 7bd2657..189c82f 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -122,12 +122,16 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv)
 
 		struct passwd * pwdent = getpwnam(username);
 		if (pwdent == NULL) {
-			_exit(-1);
+			_exit(EXIT_FAILURE);
+		}
+
+		if (setgid(pwdent->pw_gid) < 0 || setuid(pwdent->pw_uid) < 0 ||
+				setegid(pwdent->pw_gid) < 0 || seteuid(pwdent->pw_uid) < 0) {
+			_exit(EXIT_FAILURE);
 		}
 
 		setenv("HOME", pwdent->pw_dir, 1);
 
-		/* TODO: Drop privs */
 		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