summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/testparm.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index ae4a12a882..b8536d4b9d 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -237,23 +237,28 @@ int main(int argc, char *argv[])
for (s=0;s<1000;s++) {
if (VALID_SNUM(s)) {
- char *deny_list = lp_hostsdeny(s);
- char *allow_list = lp_hostsallow(s);
+ char **deny_list = lp_hostsdeny(s);
+ char **allow_list = lp_hostsallow(s);
+ int i;
if(deny_list) {
- char *hasstar = strchr(deny_list, '*');
- char *hasquery = strchr(deny_list, '?');
- if(hasstar || hasquery) {
- printf("Invalid character %c in hosts deny list %s for service %s.\n",
- hasstar ? *hasstar : *hasquery, deny_list, lp_servicename(s) );
+ for (i=0; deny_list[i]; i++) {
+ char *hasstar = strchr(deny_list[i], '*');
+ char *hasquery = strchr(deny_list[i], '?');
+ if(hasstar || hasquery) {
+ printf("Invalid character %c in hosts deny list (%s) for service %s.\n",
+ hasstar ? *hasstar : *hasquery, deny_list[i], lp_servicename(s) );
+ }
}
}
if(allow_list) {
- char *hasstar = strchr(allow_list, '*');
- char *hasquery = strchr(allow_list, '?');
- if(hasstar || hasquery) {
- printf("Invalid character %c in hosts allow list %s for service %s.\n",
- hasstar ? *hasstar : *hasquery, allow_list, lp_servicename(s) );
+ for (i=0; allow_list[i]; i++) {
+ char *hasstar = strchr(allow_list[i], '*');
+ char *hasquery = strchr(allow_list[i], '?');
+ if(hasstar || hasquery) {
+ printf("Invalid character %c in hosts allow list (%s) for service %s.\n",
+ hasstar ? *hasstar : *hasquery, allow_list[i], lp_servicename(s) );
+ }
}
}