version 1.268, 2015/05/01 07:08:08 |
version 1.269, 2015/05/04 06:10:48 |
|
|
{ |
{ |
int result = 1, attributes = 0, port; |
int result = 1, attributes = 0, port; |
char *arg, *attrib, *cp = *condition; |
char *arg, *attrib, *cp = *condition; |
size_t len; |
|
|
|
if (ci == NULL) |
if (ci == NULL) |
debug3("checking syntax for 'Match %s'", cp); |
debug3("checking syntax for 'Match %s'", cp); |
|
|
error("Missing Match criteria for %s", attrib); |
error("Missing Match criteria for %s", attrib); |
return -1; |
return -1; |
} |
} |
len = strlen(arg); |
|
if (strcasecmp(attrib, "user") == 0) { |
if (strcasecmp(attrib, "user") == 0) { |
if (ci == NULL || ci->user == NULL) { |
if (ci == NULL || ci->user == NULL) { |
result = 0; |
result = 0; |
continue; |
continue; |
} |
} |
if (match_pattern_list(ci->user, arg, len, 0) != 1) |
if (match_pattern_list(ci->user, arg, 0) != 1) |
result = 0; |
result = 0; |
else |
else |
debug("user %.100s matched 'User %.100s' at " |
debug("user %.100s matched 'User %.100s' at " |
|
|
result = 0; |
result = 0; |
continue; |
continue; |
} |
} |
if (match_hostname(ci->host, arg, len) != 1) |
if (match_hostname(ci->host, arg) != 1) |
result = 0; |
result = 0; |
else |
else |
debug("connection from %.100s matched 'Host " |
debug("connection from %.100s matched 'Host " |