1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/source4
Tim Beale 2fa2f132ae dsdb: Avoid calculating the PSO multiple times
In a typical user login query, the code tries to work out the PSO 2-3
times - once for the msDS-ResultantPSO attribute, and then again for the
msDS-User-Account-Control-Computed & msDS-UserPasswordExpiryTimeComputed
constructed attributes.

The PSO calculation is reasonably expensive, mostly due to the nested
groups calculation. If we've already constructed the msDS-ResultantPSO
attribute, then we can save ourselves extra work by just re-fetching the
result directly, rather than expanding the nested groups again from
scratch.

The previous patch improves efficiency when there are no PSOs in the
system. This should improve the case where there are PSOs that apply to
the users. (Unfortunately, it won't help where there are some PSOs in
the system, but no PSO applies to the user being queried).

Also updated sam.c so the msDS-ResultantPSO gets calculated first,
before the other constructed attributes.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed May 23 10:09:11 CEST 2018 on sn-devel-144
2018-05-23 10:09:10 +02:00
..
auth dsdb: Avoid calculating the PSO multiple times 2018-05-23 10:09:10 +02:00
build/pasn1
cldap_server samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
client s4:client: Fix size types and loop 2018-04-03 20:20:10 +02:00
cluster dbwrap: Remove calls to loadparm 2018-04-24 01:53:19 +02:00
dns_server samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
dsdb dsdb: Avoid calculating the PSO multiple times 2018-05-23 10:09:10 +02:00
echo_server source4/smbd: Do not overstamp the process model with "single" 2017-10-19 05:33:10 +02:00
heimdal Bulk: enclose .keys() method with list where list (from python2) expected 2018-05-12 21:38:17 +02:00
heimdal_build heimdal_build: use closefrom from libreplace 2018-02-21 14:19:19 +01:00
include lib: Remove global xfile.h includes 2016-11-20 06:23:19 +01:00
kdc Fix spelling s/fowarding/forwarding/ 2018-05-12 02:09:26 +02:00
ldap_server samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
lib s4/lib/py-registry: initialize optional parameters for open_* functions 2018-04-13 07:27:14 +02:00
libcli pysmb: Add some more documentation for conn.list 2018-05-12 04:57:29 +02:00
libnet FIXUP: Improve memory handling on py_net_change_password 2018-05-17 14:28:19 +02:00
librpc s4/librpc: Additionally accept unicode as string param in Py2 2018-04-30 15:43:19 +02:00
nbt_server samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
ntp_signd samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
ntvfs s4:ntvfs: Fix string copy of share_name 2018-05-17 17:30:09 +02:00
param s4/param: Additionally accept unicode as string param in Py2 2018-04-30 15:43:19 +02:00
rpc_server rpc/samr: Fix PSO support in SAMR password_change RPC 2018-05-23 06:55:30 +02:00
script s4/script: convert print func to be py2/py3 compatible 2018-03-23 07:28:24 +01:00
scripting s4/scripting/devel: py2/py3 compatability always decode result of b64encode 2018-05-12 21:38:17 +02:00
selftest auth logging: Extract common audit logging code 2018-05-16 04:07:16 +02:00
setup s4/setup/tests: Add test for non ascii password setting samba-tool 2018-05-17 11:31:28 +02:00
smb_server samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
smbd samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
torture s4:torture: Use strlcpy() in gen_name() 2018-05-17 17:30:09 +02:00
utils s4:utils: Fix size types 2018-03-20 23:16:15 +01:00
web_server s4/webserver: initialise optional parameter 2018-04-13 07:27:14 +02:00
winbind samdb: Add remote address to connect 2018-05-10 20:02:23 +02:00
wrepl_server source4/smbd: Do not overstamp the process model with "single" 2017-10-19 05:33:10 +02:00
.clang_complete
.valgrind_suppressions
wscript_build Do not install smbclient4 and nmblookup4 2014-04-15 03:25:13 +02:00