summaryrefslogtreecommitdiff
path: root/source3/utils
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
commit82970b833cca505fcb5013c0264edde5a79cbd2e (patch)
treefe2707302b12b4b3c12e37f1e3b62018deeed174 /source3/utils
parent567612291e3c9bd993bc6c94591c8a6a4ca55eff (diff)
downloadsamba-82970b833cca505fcb5013c0264edde5a79cbd2e.tar.gz
samba-82970b833cca505fcb5013c0264edde5a79cbd2e.tar.bz2
samba-82970b833cca505fcb5013c0264edde5a79cbd2e.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) (This used to be commit e1572f85d6247b760db10825b2fa688d7ed50bd3)
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) );
+ }
}
}