From 4262a0309076b1db2eb15adfbc04b62126e39cf1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Aug 2012 15:02:23 -0500 Subject: Switch to looking for '://' in the string --- src/pam-freerdp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 == '/') { -- cgit v1.2.3