aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-21 09:07:26 +0000
committerOmar Polo <op@omarpolo.com>2021-01-21 09:07:26 +0000
commitb4d409cf293cdf029cefd19a531463a334bc065b (patch)
treea054996b43354b379a1c5315788de139a102c323 /server.c
parent15209ad9ed6d1c8a506a7406fb32e35f1fd105bf (diff)
use fnmatch on the domain name
Diffstat (limited to 'server.c')
-rw-r--r--server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server.c b/server.c
index f96e0a3..8d08c12 100644
--- a/server.c
+++ b/server.c
@@ -22,6 +22,7 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
+#include <fnmatch.h>
#include <string.h>
#include "gmid.h"
@@ -185,7 +186,7 @@ handle_handshake(struct pollfd *fds, struct client *c)
if (!strcmp(h->domain, "*"))
break;
- if (servname != NULL && !strcmp(h->domain, servname))
+ if (servname != NULL && !fnmatch(h->domain, servname, 0))
break;
}