diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-12-16 17:59:59 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2011-12-23 16:18:25 +1100 |
commit | 95868605e2caf4c8a66b10be7911762d587a2388 (patch) | |
tree | 69deee74b5cd15d64294a7442e46d71a4051d81d /source4 | |
parent | 10860d58d77e9769c70d07678baddc09f73d3c52 (diff) | |
download | samba-95868605e2caf4c8a66b10be7911762d587a2388.tar.gz samba-95868605e2caf4c8a66b10be7911762d587a2388.tar.bz2 samba-95868605e2caf4c8a66b10be7911762d587a2388.zip |
s4:rpc-dnsserver: Make sure that zone information is filled in
This fixes the problem of NULL zone in zone operations when specific
zone is specified and no zone filter is specified.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/rpc_server/dnsserver/dcerpc_dnsserver.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c index c9de440621..5f4009bafe 100644 --- a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c +++ b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c @@ -1914,6 +1914,11 @@ static WERROR dcesrv_DnssrvOperation(struct dcesrv_call_state *dce_call, TALLOC_ r->in.dwTypeId, &r->in.pData); } else { + z = dnsserver_find_zone(dsstate->zones, r->in.pszZone); + if (z == NULL && request_filter == 0) { + return WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST; + } + ret = dnsserver_operate_zone(dsstate, mem_ctx, z, request_filter, r->in.pszOperation, @@ -2116,6 +2121,11 @@ static WERROR dcesrv_DnssrvOperation2(struct dcesrv_call_state *dce_call, TALLOC r->in.dwTypeId, &r->in.pData); } else { + z = dnsserver_find_zone(dsstate->zones, r->in.pszZone); + if (z == NULL && request_filter == 0) { + return WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST; + } + ret = dnsserver_operate_zone(dsstate, mem_ctx, z, request_filter, r->in.pszOperation, |