[X2Go-Commits] libpam-x2go.git - x2gosession (branch) updated: 48df96792e41ff14f101fbb9829a059b0cdd3879

X2Go dev team git-admin at x2go.org
Wed Apr 24 18:47:23 CEST 2013


The branch, x2gosession has been updated
  discards  0b41e3977e41d07997f008a8344f9ab70e4d213d (commit)
       via  48df96792e41ff14f101fbb9829a059b0cdd3879 (commit)
       via  733fde7fe2415f983ed8f2045dffda16d30d1c14 (commit)
       via  8a85c086263fda4baea7128592fefedb61f83aee (commit)
       via  1708318511cf61c58913e8f14a8fb56ff1510bdd (commit)
       via  d4ba1e134fcce95f8b7983fa9fba6d9d18f8f68b (commit)
       via  4262a0309076b1db2eb15adfbc04b62126e39cf1 (commit)
       via  6b495327f20269cc353ec20d424ecd0d68e58541 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (0b41e3977e41d07997f008a8344f9ab70e4d213d)
            \
             N -- N -- N (48df96792e41ff14f101fbb9829a059b0cdd3879)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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/freerdp-auth-check.c |    9 +++++++++
 src/pam-freerdp.c        |   46 ++++++++++++++++++++++++++++++++++++----------
 2 files changed, 45 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/src/freerdp-auth-check.c b/src/freerdp-auth-check.c
index 83bab2f..d50833b 100644
--- a/src/freerdp-auth-check.c
+++ b/src/freerdp-auth-check.c
@@ -79,6 +79,15 @@ main (int argc, char * argv[])
 	instance->settings->password = password;
 	instance->settings->ignore_certificate = true;
 
+	char * colonloc = strstr(argv[1], ":");
+	if (colonloc != NULL) {
+		/* We've got a port to deal with */
+		colonloc[0] = '\0';
+		colonloc++;
+
+		instance->settings->port = strtoul(colonloc, NULL, 10);
+	}
+
 	if (freerdp_connect(instance)) {
 		freerdp_disconnect(instance);
 		return 0;
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 89161af..63b6baf 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -32,6 +32,8 @@
 
 #define PAM_TYPE_DOMAIN  1234
 
+static char * global_domain = NULL;
+
 /* Either grab a value or prompt for it */
 static char *
 get_item (pam_handle_t * pamh, int type)
@@ -43,6 +45,10 @@ get_item (pam_handle_t * pamh, int type)
 		if (pam_get_item(pamh, type, (const void **)&value) == PAM_SUCCESS && value != NULL) {
 			return strdup(value);
 		}
+	} else {
+		if (global_domain != NULL) {
+			return strdup(global_domain);
+		}
 	}
 	/* Now we need to prompt */
 
@@ -86,6 +92,34 @@ get_item (pam_handle_t * pamh, int type)
 
 	char * retval = responses->resp;
 	free(responses);
+
+	if (type == PAM_RHOST) {
+		char * subloc = strstr(retval, "://");
+		if (subloc != NULL) {
+			char * original = retval;
+			char * newish = subloc + strlen("://");
+			char * endslash = strstr(newish, "/");
+
+			if (endslash != NULL) {
+				endslash[0] = '\0';
+			}
+
+			retval = strdup(newish);
+			free(original);
+		}
+	}
+
+	if (retval != NULL) { /* Can't believe it really would be at this point, but let's be sure */
+		if (type != PAM_TYPE_DOMAIN) {
+			pam_set_item(pamh, type, (const void *)retval);
+		} else {
+			if (global_domain != NULL) {
+				free(global_domain);
+			}
+			global_domain = strdup(retval);
+		}
+	}
+
 	return retval;
 }
 
@@ -320,20 +354,12 @@ pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv
 	return PAM_IGNORE;
 }
 
-/* LightDM likes to have this function around, but we don't need it as we
-   don't have a token hanging around. */
-PAM_EXTERN int
-pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv)
-{
-	return PAM_SUCCESS;
-}
-
 #ifdef PAM_STATIC
 
 struct pam_module _pam_freerdp_modstruct = {
-     "pam_freerdp",
+     "pam-freerdp",
      pam_sm_authenticate,
-     pam_sm_setcred,
+     NULL,
      NULL,
      pam_sm_open_session,
      pam_sm_close_session,


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