aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-27 15:02:23 -0500
committerTed Gould <ted@gould.cx>2012-08-27 15:02:23 -0500
commit4262a0309076b1db2eb15adfbc04b62126e39cf1 (patch)
tree9c1e2b6836d039a537d8ab6a69bb942632df1bc9
parent6b495327f20269cc353ec20d424ecd0d68e58541 (diff)
downloadlibpam-x2go-4262a0309076b1db2eb15adfbc04b62126e39cf1.tar.gz
libpam-x2go-4262a0309076b1db2eb15adfbc04b62126e39cf1.tar.bz2
libpam-x2go-4262a0309076b1db2eb15adfbc04b62126e39cf1.zip
Switch to looking for '://' in the string
-rw-r--r--src/pam-freerdp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 2550767..440ee40 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -88,9 +88,10 @@ get_item (pam_handle_t * pamh, int type)
free(responses);
if (type == PAM_RHOST) {
- if (strncmp(retval, "http://", strlen("http://")) == 0) {
+ char * subloc = NULL;
+ if ((subloc = strstr(retval, "://")) != NULL) {
char * original = retval;
- char * newish = retval + strlen("http://");
+ char * newish = retval + strlen("://");
char * c;
for (c = newish; *c != '\0'; c++) {
if (*c == '/') {