1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3
Michael Adam 30a27ba428 s3:idmap:autorid: make calculation in idmap_autorid_sid_to_id much more obvious
This is my attempt to make the sid->unix-id calculation much more obvious.
Especially with the introduction of the multi-range support an the originally
named "multiplier", the calculation

id = low_id + range_size * domain_number + rid - range_size * multiplier

was rather opaque to me.

What really happens here is this:
The rid is split into a reduced_rid part that is < rangesize and
a multiple of rangesize. This is given by the formula

rid = rid % range_size + (rid / range_size) * range_size

We define
 reduced_rid := rid % range_size
and
 domain_range_index := rid / range_size ( == the original multiplier)

and the original formula is equivalent to:

id = reduced_rid + low_id + range_number * range_size;

and reads

id = reduced_rid + range_minvalue

if we set range_minvalue := low_id + range_number * range_size.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-05-06 16:33:39 +02:00
..
auth BUG 9817: Fix 'map untrusted to domain' with NTLMv2. 2013-04-24 17:14:48 +02:00
autoconf s3-build: Do not write loadparm generated files into the build tree 2012-06-15 11:10:14 +02:00
build
client Make sure to set umask() before calling mkstemp(). 2013-03-06 01:16:34 +01:00
exports
groupdb loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *. 2012-07-18 15:07:23 +09:30
include smbd: We don't use DEFERRED_OPEN_ENTRY anymore 2013-04-26 15:17:22 -07:00
intl
lib s3:lib fix wrong usage of PRIu64 in sscanf 2013-05-06 16:33:38 +02:00
libads BUG 9699: Fix adding case sensitive spn. 2013-04-03 23:57:32 +02:00
libgpo
libnet Make sure to set umask() before calling mkstemp(). 2013-03-06 01:16:34 +01:00
librpc smbd: Obsolete MSG_SMB_OPEN_RETRY 2013-04-26 15:17:22 -07:00
libsmb libsmb: call directly tevent_req_simple_finish_ntstatus 2013-05-06 08:35:10 +02:00
locale s3-po: Fix typo in comment. 2012-05-08 16:46:36 +02:00
locking smbd: We don't use DEFERRED_OPEN_ENTRY anymore 2013-04-26 15:17:22 -07:00
m4 build: Remove --enable-smbtorture, require bin/smbtorture (from waf) for make test 2012-11-22 10:21:17 +01:00
modules Fix warnings and one compile error caused by newer gcc 4.7. 2013-05-05 19:01:37 +02:00
nmbd nmbd: Fix request data data processing. 2013-02-22 16:36:12 +01:00
pam_smbpass waf: Build pam_smbpass module only if enabled. 2012-10-04 10:20:35 +02:00
param s3: remove some dead code (for setdir command) 2013-03-12 01:03:37 +01:00
passdb PASSDB: add support to set and enumerate UPN suffixes associated with our forest 2013-04-09 20:29:18 +02:00
pkgconfig
po swat: move russian swat files alongside ja and tr 2013-01-10 18:46:23 +11:00
printing bug 9830: fix panic in nt_printer_publish_ads 2013-04-25 19:01:55 +02:00
profile s3: remove some dead code (for setdir command) 2013-03-12 01:03:37 +01:00
registry s3:registry increase a debug level 2013-04-19 13:16:38 +02:00
rpc_client s3:rpc_client fix a crash 2013-02-20 19:00:52 +01:00
rpc_server s3:rpc_server increase a debug level 2013-04-19 13:16:38 +02:00
rpcclient s3-rpcclient: add cmd_spoolss_play_gdi_script_on_printer_ic. 2013-01-24 17:42:26 +01:00
script vfs_catia: testcase - add missing pieces 2013-03-12 07:36:13 +01:00
selftest s3:selftest: Add LARGE_READX test into our make test infrastructure. 2013-03-20 09:32:26 -07:00
services
smbd check_parent_exists() can change errno. Ensure we preserve it across calls. 2013-04-30 11:00:11 +02:00
stf
tests build: Fix quota tests, including move of sysquotas.c to the top level 2012-09-29 14:50:00 +10:00
torture vfstest: Convert cmd_set_nt_acl to synthetic_smb_fname 2013-04-17 14:50:03 -07:00
utils s3:utils fix wrong usage of PRIu64 in sscanf 2013-05-06 16:33:38 +02:00
web Move everything to use the common pidfile functions. 2012-07-19 16:36:18 -07:00
winbindd s3:idmap:autorid: make calculation in idmap_autorid_sid_to_id much more obvious 2013-05-06 16:33:39 +02:00
.clang_complete
.dmallocrc
.indent.pro
autogen.sh s3:build: rewrite autogen.sh to be called from any directory 2012-09-12 23:52:51 +02:00
change-log
config.guess
config.sub
configure.developer
configure.in Implements a vfs module for cephfs, a distributed file system 2013-04-24 12:53:18 -07:00
Doxyfile
install-sh
mainpage.dox
Makefile-smbtorture build: Be consistent with the name of smbtorture binaries 2012-11-22 10:21:16 +01:00
Makefile.in Implements a vfs module for cephfs, a distributed file system 2013-04-24 12:53:18 -07:00
smbadduser.in
wscript waf: Create a better wscript for finding ncurses. 2013-04-29 13:05:59 +02:00
wscript_build regedit: Import hex editor. 2013-04-29 13:06:02 +02:00
wscript_configure_system_ncurses regedit: Link to ncurses form library 2013-04-29 13:06:01 +02:00