1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/rpc_server
Tim Beale 46c1f7bdee getncchanges.c: max_links calculation didn't work well in some cases
The max_links calculation didn't work particularly well if max_links was
set to a value lower than max_objects.

As soon as repl_chunk->object_count exceeded repl_chunk->max_links, the
chunk would be deemed full, even if there was only one link to send (or
even worse, no links to send). For example, if max_objects=100 and
max_links=10, then it would send back chunks of 10 objects (or 9 objects
and 1 link).

I believe the historic reason this logic exists is to avoid overfilling
the response message. It's hard to tell what the appropriate limit would
be because the total message size would depend on how many attributes
each object has.

I couldn't think of logic that would be suitable for all cases. I toyed
with the idea of working out a percentage of how full the message is.
However, adjusting the max_links doesn't really make sense when the
settings are small enough, e.g. max_objects=100 and max_links=100 is
never going to overfill the message, so there's no reason to alter the
values.

In the end I went with:
- If the user is using non-default values, just use those.
- In the default value case, just use the historic calculation

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-09-18 05:51:25 +02:00
..
backupkey s4:rpc_server:backupkey: Move variable into scope 2017-08-11 18:21:22 +02:00
browser werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/rpc_server/ 2016-09-28 00:04:35 +02:00
common rpc_server: Move SID helpers into common 2017-05-30 08:06:07 +02:00
dnsserver dnsserver: Stop dns_name_equal doing OOB read 2017-06-01 19:34:38 +02:00
drsuapi getncchanges.c: max_links calculation didn't work well in some cases 2017-09-18 05:51:25 +02:00
echo CVE-2016-2118: s4:rpc_server/rpcecho: allow DCERPC_AUTH_LEVEL_CONNECT by default 2016-04-12 19:25:27 +02:00
epmapper CVE-2016-2118: s4:rpc_server/epmapper: allow DCERPC_AUTH_LEVEL_CONNECT by default 2016-04-12 19:25:27 +02:00
eventlog s4-eventlog: fixed dcerpc handle return 2010-11-16 07:16:04 +00:00
lsa s4:dsdb/samdb: pass an existing 'struct ldb_context' to crack_name_to_nt4_name() 2017-06-26 08:47:15 +02:00
netlogon s4:rpc_server/netlogon: make use of auth_check_password_send/recv() 2017-08-07 15:20:03 +02:00
remote s4: modules. Fix missing TALLOC_CTX in module init function. 2017-07-26 21:35:21 +02:00
samr samr: Disable NTLM-based password changes on the server if NTLM is disabled 2017-07-04 06:57:21 +02:00
srvsvc werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/rpc_server/ 2016-09-28 00:04:35 +02:00
unixinfo wbclient: "ev" is no longer used in wbc_xids_to_sids 2016-09-28 00:04:36 +02:00
winreg werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source4/rpc_server/ 2016-09-28 00:04:23 +02:00
wkssvc werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/rpc_server/ 2016-09-28 00:04:35 +02:00
dcerpc_server.c s4-rpc_server: Improve debug of new endpoints 2017-07-28 04:12:08 +02:00
dcerpc_server.h s4:rpc_server: add wait_send/recv infrastructure 2017-05-21 21:05:12 +02:00
dcerpc_server.pc.in dcerpc_server: Add 'modulesdir' variable to pkg-config file. 2012-02-23 16:26:25 +01:00
dcesrv_auth.c s4:rpc_server: remove unused dcesrv_auth_{bind_ack,auth3,alter_ack}() 2017-05-21 21:05:13 +02:00
dcesrv_mgmt.c s4-rpc_server: Allow each interface to declare if it uses handles 2016-12-20 01:11:23 +01:00
handles.c s4-rpc_server: Allow each interface to declare if it uses handles 2016-12-20 01:11:23 +01:00
service_rpc.c s4-rpc_server: Improve debug of new endpoints 2017-07-28 04:12:08 +02:00
wscript_build s4-netlogon: Provide logs for machine account success and failures 2017-06-27 16:57:42 +02:00