aboutsummaryrefslogtreecommitdiff
path: root/src/freerdp-auth-check.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-28 08:11:57 +0000
committerTarmac <Unknown>2012-08-28 08:11:57 +0000
commitd67a26ba2585bd8bc74fed85e3ba0f4bc48f6f35 (patch)
tree4fed2e6f3eab07c70c79ceb82b5f33d93130ca2c /src/freerdp-auth-check.c
parent5b36f6b97465461ebc87a984c853c81f2c67a4ac (diff)
parent613d854fcdb84ab282e73ec2f51eea805a7cd0cd (diff)
downloadlibpam-freerdp2-d67a26ba2585bd8bc74fed85e3ba0f4bc48f6f35.tar.gz
libpam-freerdp2-d67a26ba2585bd8bc74fed85e3ba0f4bc48f6f35.tar.bz2
libpam-freerdp2-d67a26ba2585bd8bc74fed85e3ba0f4bc48f6f35.zip
Handle URLs as the remote host value. Approved by Albert Astals Cid, jenkins.
Diffstat (limited to 'src/freerdp-auth-check.c')
-rw-r--r--src/freerdp-auth-check.c9
1 files changed, 9 insertions, 0 deletions
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;