|
Lines 985-991
match_cfg_line(char **condition, int lin
Link Here
|
| 985 |
return -1; |
985 |
return -1; |
| 986 |
} |
986 |
} |
| 987 |
if (strcasecmp(attrib, "user") == 0) { |
987 |
if (strcasecmp(attrib, "user") == 0) { |
| 988 |
if (ci == NULL) { |
988 |
if (ci == NULL || (ci->test && ci->user == NULL)) { |
| 989 |
result = 0; |
989 |
result = 0; |
| 990 |
continue; |
990 |
continue; |
| 991 |
} |
991 |
} |
|
Lines 997-1003
match_cfg_line(char **condition, int lin
Link Here
|
| 997 |
debug("user %.100s matched 'User %.100s' at " |
997 |
debug("user %.100s matched 'User %.100s' at " |
| 998 |
"line %d", ci->user, arg, line); |
998 |
"line %d", ci->user, arg, line); |
| 999 |
} else if (strcasecmp(attrib, "group") == 0) { |
999 |
} else if (strcasecmp(attrib, "group") == 0) { |
| 1000 |
if (ci == NULL) { |
1000 |
if (ci == NULL || (ci->test && ci->user == NULL)) { |
| 1001 |
result = 0; |
1001 |
result = 0; |
| 1002 |
continue; |
1002 |
continue; |
| 1003 |
} |
1003 |
} |
|
Lines 1010-1016
match_cfg_line(char **condition, int lin
Link Here
|
| 1010 |
result = 0; |
1010 |
result = 0; |
| 1011 |
} |
1011 |
} |
| 1012 |
} else if (strcasecmp(attrib, "host") == 0) { |
1012 |
} else if (strcasecmp(attrib, "host") == 0) { |
| 1013 |
if (ci == NULL) { |
1013 |
if (ci == NULL || (ci->test && ci->host == NULL)) { |
| 1014 |
result = 0; |
1014 |
result = 0; |
| 1015 |
continue; |
1015 |
continue; |
| 1016 |
} |
1016 |
} |
|
Lines 1022-1028
match_cfg_line(char **condition, int lin
Link Here
|
| 1022 |
debug("connection from %.100s matched 'Host " |
1022 |
debug("connection from %.100s matched 'Host " |
| 1023 |
"%.100s' at line %d", ci->host, arg, line); |
1023 |
"%.100s' at line %d", ci->host, arg, line); |
| 1024 |
} else if (strcasecmp(attrib, "address") == 0) { |
1024 |
} else if (strcasecmp(attrib, "address") == 0) { |
| 1025 |
if (ci == NULL) { |
1025 |
if (ci == NULL || (ci->test && ci->address == NULL)) { |
| 1026 |
result = 0; |
1026 |
result = 0; |
| 1027 |
continue; |
1027 |
continue; |
| 1028 |
} |
1028 |
} |
|
Lines 1041-1047
match_cfg_line(char **condition, int lin
Link Here
|
| 1041 |
return -1; |
1041 |
return -1; |
| 1042 |
} |
1042 |
} |
| 1043 |
} else if (strcasecmp(attrib, "localaddress") == 0){ |
1043 |
} else if (strcasecmp(attrib, "localaddress") == 0){ |
| 1044 |
if (ci == NULL) { |
1044 |
if (ci == NULL || (ci->test && ci->laddress == NULL)) { |
| 1045 |
result = 0; |
1045 |
result = 0; |
| 1046 |
continue; |
1046 |
continue; |
| 1047 |
} |
1047 |
} |
|
Lines 1067-1073
match_cfg_line(char **condition, int lin
Link Here
|
| 1067 |
arg); |
1067 |
arg); |
| 1068 |
return -1; |
1068 |
return -1; |
| 1069 |
} |
1069 |
} |
| 1070 |
if (ci == NULL) { |
1070 |
if (ci == NULL || (ci->test && ci->lport == -1)) { |
| 1071 |
result = 0; |
1071 |
result = 0; |
| 1072 |
continue; |
1072 |
continue; |
| 1073 |
} |
1073 |
} |
|
Lines 1081-1090
match_cfg_line(char **condition, int lin
Link Here
|
| 1081 |
else |
1081 |
else |
| 1082 |
result = 0; |
1082 |
result = 0; |
| 1083 |
} else if (strcasecmp(attrib, "rdomain") == 0) { |
1083 |
} else if (strcasecmp(attrib, "rdomain") == 0) { |
| 1084 |
if (ci == NULL || ci->rdomain == NULL) { |
1084 |
if (ci == NULL || (ci->test && ci->rdomain == NULL)) { |
| 1085 |
result = 0; |
1085 |
result = 0; |
| 1086 |
continue; |
1086 |
continue; |
| 1087 |
} |
1087 |
} |
|
|
1088 |
if (ci->rdomain == NULL) |
| 1089 |
match_test_missing_fatal("RDomain", "rdomain"); |
| 1088 |
if (match_pattern_list(ci->rdomain, arg, 0) != 1) |
1090 |
if (match_pattern_list(ci->rdomain, arg, 0) != 1) |
| 1089 |
result = 0; |
1091 |
result = 0; |
| 1090 |
else |
1092 |
else |