projects
/
trust_router.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
064a36b
)
If port passed in to tidc_open_connection() is 0, use the default port.
author
Margaret Wasserman
<mrw@painless-security.com>
Mon, 17 Mar 2014 19:04:47 +0000
(15:04 -0400)
committer
Margaret Wasserman
<mrw@painless-security.com>
Mon, 17 Mar 2014 19:04:47 +0000
(15:04 -0400)
tid/tidc.c
patch
|
blob
|
history
diff --git
a/tid/tidc.c
b/tid/tidc.c
index
90ac58e
..
9590260
100644
(file)
--- a/
tid/tidc.c
+++ b/
tid/tidc.c
@@
-67,9
+67,15
@@
int tidc_open_connection (TIDC_INSTANCE *tidc,
{
int err = 0;
int conn = -1;
+ unsigned int use_port = 0;
- fprintf(stderr, "tidc_open_connection: Opening GSS connection to %s:%u.", server, port);
- err = gsscon_connect(server, port, "trustidentity", &conn, gssctx);
+ if (0 == port)
+ use_port = TID_PORT;
+ else
+ use_port = port;
+
+ fprintf(stderr, "tidc_open_connection: Opening GSS connection to %s:%u.", server, use_port);
+ err = gsscon_connect(server, use_port, "trustidentity", &conn, gssctx);
if (!err)
return conn;