diff options
author | Ted Gould <ted@gould.cx> | 2012-08-27 15:02:23 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-08-27 15:02:23 -0500 |
commit | 4262a0309076b1db2eb15adfbc04b62126e39cf1 (patch) | |
tree | 9c1e2b6836d039a537d8ab6a69bb942632df1bc9 | |
parent | 6b495327f20269cc353ec20d424ecd0d68e58541 (diff) | |
download | libpam-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.c | 5 |
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 == '/') { |