summaryrefslogtreecommitdiffstats
path: root/source/utils/testparm.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-06-20 16:54:32 +0000
committerSimo Sorce <idra@samba.org>2001-06-20 16:54:32 +0000
commite1572f85d6247b760db10825b2fa688d7ed50bd3 (patch)
tree873a9381269e64ae6844f12af54d249e092b787b /source/utils/testparm.c
parentd0b37d1a623acce2ae4509aebda85ad1280dc8ac (diff)
downloadsamba-e1572f85d6247b760db10825b2fa688d7ed50bd3.tar.gz
samba-e1572f85d6247b760db10825b2fa688d7ed50bd3.tar.xz
samba-e1572f85d6247b760db10825b2fa688d7ed50bd3.zip
initial support for paramter type P_LIST
it will avoid problems with lists being longer than 1024 bytes just now only ip list parameters have been converted to the new type (hosts allow, hosts deny, ssl hosts, ssl hosts resign)
Diffstat (limited to 'source/utils/testparm.c')
-rw-r--r--source/utils/testparm.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index ae4a12a8825..b8536d4b9da 100644
--- a/source/utils/testparm.c
+++ b/source/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) );
+ }
}
}