Matthieu Patou [Wed, 15 May 2013 11:46:33 +0000 (04:46 -0700)]
dsdb-drepl: create a new schedulable event for running pending operations
So instead of running dreplsrv_periodic_schedule when receiving a
DRS_REPLICA_SYNC request which will force the DC to look for changes
with all the DC it usually replicate to, we reduce it to the DC
specified in the DRS_REPLICA_SYNC request. It will allow also to do have the
correct options as set by the client who send the DRS_REPLICA_SYNC.
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Mon, 29 Apr 2013 10:27:25 +0000 (12:27 +0200)]
lib/param: remove unused 'printer_admin'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 14 21:45:19 CEST 2013 on sn-devel-104
Stefan Metzmacher [Tue, 30 Apr 2013 06:39:00 +0000 (08:39 +0200)]
doc-xml/smbdotconf: fix server [min|max] protocol documentation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Tue, 7 May 2013 12:15:35 +0000 (14:15 +0200)]
talloc: only provide the --enable-talloc-compat1 in standalone build
The compat library is already only built in standalone build,
so we need the configure option also only in the standalone build.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Björn Jacke [Tue, 14 May 2013 14:51:28 +0000 (16:51 +0200)]
winbind/idmap_ad: be verbose about the user that we fail to map
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Tue, 14 May 2013 13:43:10 +0000 (15:43 +0200)]
vfs_gpfs: slightly simplify connect()
DISCONNECT can be arbitrarily complex, TALLOC_FREE of a simple struct
is easier.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May 14 18:11:29 CEST 2013 on sn-devel-104
Shekhar Amlekar [Tue, 7 May 2013 12:28:16 +0000 (17:58 +0530)]
s3:rpc_server/srvsvc check access before doing work
Before doing the (potentially) costly enumerations,
check if the user has necessary privileges first
Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com>
Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Tue May 14 16:22:24 CEST 2013 on sn-devel-104
Volker Lendecke [Sat, 11 May 2013 08:51:22 +0000 (10:51 +0200)]
torture: Remove some unused code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Christian Ambach [Fri, 10 May 2013 22:45:15 +0000 (00:45 +0200)]
tdb: include information about hash function being used in tdbtool info output
makes it possible to easily determine if the tdb under examination
uses jenkins hash or not
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Tue, 14 May 2013 08:52:33 +0000 (10:52 +0200)]
smbd: Remove a pointless variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May 14 13:19:44 CEST 2013 on sn-devel-104
Matthieu Patou [Mon, 6 May 2013 07:58:28 +0000 (00:58 -0700)]
selftests-drs: make our generated class subclass of classschema
Without this change objectclass=["top", "classSchema", "Foobar"] will
not be sorted correctly and will generated an error saying that class
Foobar is unreleated to classSchema (which is not true). It's mimicing what
other classes of the default schema are doing (ie. contact)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 14 07:07:19 CEST 2013 on sn-devel-104
Matthieu Patou [Mon, 13 May 2013 16:16:24 +0000 (09:16 -0700)]
Export PROMOTED_DC related variable
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Matthieu Patou [Mon, 6 May 2013 08:09:05 +0000 (01:09 -0700)]
dsdb: make the name of non related class more obvious
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andrew Bartlett [Mon, 13 May 2013 21:23:33 +0000 (09:23 +1200)]
build: Add missing dep from vfs_nfs4acl_xattr to NDR_NFS4ACL
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue May 14 01:23:17 CEST 2013 on sn-devel-104
Volker Lendecke [Sun, 12 May 2013 10:47:39 +0000 (12:47 +0200)]
lib: Fix CID 241650 Sizeof not portable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun May 12 17:44:55 CEST 2013 on sn-devel-104
Volker Lendecke [Sun, 12 May 2013 10:44:41 +0000 (12:44 +0200)]
pthreadpool: Fix CID 710828 Sizeof not portable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Volker Lendecke [Sun, 12 May 2013 10:33:49 +0000 (12:33 +0200)]
dbwrap: Fix CID
1002092 Uninitialized scalar variable
We don't set saved_errno in the ret==0 case.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Björn Baumbach [Wed, 8 May 2013 08:27:26 +0000 (10:27 +0200)]
docs: smb.conf: fix max read/write/trans default values (bug #9871)
Commit
6d128aac119d948f0ecb0dcf6b400b4eb4027fe6 has increased the limit:
"s3:smb2_server increase defaults for read/write/trans sizes to 1MB"
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 10 23:14:50 CEST 2013 on sn-devel-104
Christian Ambach [Mon, 6 May 2013 17:00:29 +0000 (19:00 +0200)]
s4:torture fix a build break on AIX
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 9 08:05:12 CEST 2013 on sn-devel-104
Christian Ambach [Mon, 6 May 2013 16:56:09 +0000 (16:56 +0000)]
s3:modules/vfs_aixacl2 fix compile errors
fix various compile errors that were introduced with latest ACL changes
Signed-off-by: Christian Ambach <ambi@samba.org>
Pair-Programmed-With: Alexander Werth <alexander.werth@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Tue, 7 May 2013 21:04:24 +0000 (14:04 -0700)]
Fix missing TALLOC_FREE of stackframes.
Signed-off-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Tue, 7 May 2013 20:58:26 +0000 (13:58 -0700)]
Tidy up old bool usage. False -> false, True -> true.
Signed-off-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 28 Apr 2013 08:20:04 +0000 (18:20 +1000)]
vfs: Allow CREATOR GROUP to be used with vfs_zfsacl
The solaris acl() code requires that both ACE_GROUP|ACE_IDENTIFIER_GROUP be
set to indicate the @group permissions.
Otherwise, it would return Invalid Paramter to clients.
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Sun, 28 Apr 2013 17:06:59 +0000 (19:06 +0200)]
s4-smbtorture: Run tests for nfs4:modes simple and special.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Fri, 3 May 2013 03:46:25 +0000 (05:46 +0200)]
s3: Update vfs_gpfs man page with new nfs4:mode help text.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 2 May 2013 15:45:23 +0000 (17:45 +0200)]
s3: Update README.nfs4acls.txt
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 2 May 2013 14:53:35 +0000 (16:53 +0200)]
s3: Use mode bits in some cases in mode simple.
Non inheriting ACL entries will show mode bits.
With this an file owner change does affect the effective ACL because
the special owner acl will now refer to the new owner.
This could be fixed by updating the ACL on a file owner change.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 2 May 2013 14:50:55 +0000 (16:50 +0200)]
s3: Add changes that keep nfs4:mode special behavior.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 10 May 2012 12:19:41 +0000 (14:19 +0200)]
s3: Mapping of cifs creator owner to nfs owner@ ace.
This is ignored in nfs4mode special for compatibility.
Also ensure that we drop non inheriting creator owner
aces since these don't contribute to who can access
a file.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Wed, 25 Apr 2012 13:10:20 +0000 (15:10 +0200)]
s3: Mapping of special entries to creator owner in mode simple.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 26 Jul 2012 15:29:12 +0000 (17:29 +0200)]
s3: Add params parameter to smbacl4_nfs42win function.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 26 Jul 2012 15:11:03 +0000 (17:11 +0200)]
s3: Change smbacl4_get_vfs_params to use connection_struct instead of fsp.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Mon, 15 Apr 2013 14:08:46 +0000 (16:08 +0200)]
s3: Move up declaration of params struct and related function.
We need the parameters earlier in the code so we move up
the declaration of the params struct. Since reading the
parameters is closely related the definition of the function
smbacl4_get_vfs_params has also been moved up.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Thu, 18 Apr 2013 12:12:34 +0000 (14:12 +0200)]
s4-smbtorture: Set result message when failing the inheritance test.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Tue, 16 Apr 2013 12:11:27 +0000 (14:11 +0200)]
vfs: Add inheritance emulation to vfs_nfs4acl_xattr.
Recursively inherit ACL from parent directory if no acl xattr is
found on the current file.
Use a default ACL if a non-inheriting ACL is encountered.
With this the nfs4acl_xattr.dynamic test passes.
But the nfs4acl_xattr.inheritance test results in an error because
of warnings that cause the test to pass a failed result.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 14 Apr 2013 10:04:45 +0000 (20:04 +1000)]
selftest: Run raw.acls test against the nfs4acl_xattr module
This is the first time we have tested the NFSv4 ACL mapping code.
Sadly most tests fail but these can be fixed from here.
This at least shows that the code does not segfault.
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 14 Apr 2013 09:51:42 +0000 (19:51 +1000)]
librpc: Add special owner/group/other constants to nfs4acl.idl
As per nfs4acl-0.9/lib/nfs4acl.c (the package where this structure is originally defined)
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Wed, 8 May 2013 06:30:30 +0000 (18:30 +1200)]
build: Add vfs_nfs4acl to the autoconf build
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 14 Apr 2013 10:06:57 +0000 (20:06 +1000)]
vfs: Add new VFS module vfs_nfs4acl_xattr to use nfs4acl.idl
This uses the xattr format used by the patches at http://users.suse.com/~agruen/nfs4acl/
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 14 Apr 2013 09:22:37 +0000 (19:22 +1000)]
vfs: Remove unused security_info argument in vfz_zfsacl.c
Reviewed-by: Jeremy Allison <jra@samba.org>
Alexander Werth [Mon, 15 Apr 2013 14:35:36 +0000 (16:35 +0200)]
vfs: Fix compile of vfs_gpfs.c.
Since the smb4acl is now correctly allocated on mem_ctx and not
the talloc stack frame we can free the stack frame correctly.
And the chmod emulation code now needs the vfs handle since
that is now required by the callback function to set the smb4acl.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 14 Apr 2013 08:13:42 +0000 (18:13 +1000)]
vfs: Allocate SMB4ACL_T on an explict memory context
This ensures the caller knows exactly what the memory lifetime of this
returned object is. This makes the NFSv4 ACL code consistent with the
POSIX and NT ACL code, to avoid supprising developers who have worked
on those other parts of the ACL code.
Most of this patch is adding a memory context to the callers and passing it in.
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Sun, 14 Apr 2013 07:31:42 +0000 (17:31 +1000)]
vfs: Add vfs_handle_struct argument to smb_set_nt_acl_nfs4 and the callback
This allows the callback to call xattr based storage functions that need this argument.
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Fri, 12 Apr 2013 10:24:44 +0000 (20:24 +1000)]
build: Move nfs4acl to the top level
This is to create IDL-stored NFSv4 ACLs, just as we use for posix ACLs
to permit better testing.
Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 8 May 2013 08:21:15 +0000 (10:21 +0200)]
pidl:NDR/Parser: correctly set $ndr->[relative_highest_]offset for relative_short pointers
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 8 20:49:55 CEST 2013 on sn-devel-104
Stefan Metzmacher [Wed, 8 May 2013 08:18:54 +0000 (10:18 +0200)]
Revert "Remove a bunch of "unused variable _relative_save_offset" warnings."
This reverts commit
fa5898b6de797431d5ae9d2ce6dcddcb35a60b66.
This is the wrong fix for the warnings, the correct fix will follow.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Jeremy Allison [Wed, 8 May 2013 00:07:10 +0000 (17:07 -0700)]
Remove a bunch of "unused variable _relative_save_offset" warnings.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Wed May 8 07:47:45 CEST 2013 on sn-devel-104
Richard Sharpe [Thu, 2 May 2013 21:36:05 +0000 (14:36 -0700)]
Tests processing an oplock break within a compound SMB2 request.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue May 7 19:45:36 CEST 2013 on sn-devel-104
Jeremy Allison [Thu, 2 May 2013 21:16:22 +0000 (14:16 -0700)]
Remove the compound_related_in_progress state from the smb2 global state.
And also remove the restriction that we can't read a new
request whilst we're in this state.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@samba.org>
Jeremy Allison [Thu, 2 May 2013 20:55:53 +0000 (13:55 -0700)]
The core of the fix to allow opens to go async inside a compound request.
This is only allowed for opens that cause an oplock break, otherwise it
is not allowed. See [MS-SMB2].pdf note <194> on Section 3.3.5.2.7.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Jeremy Allison [Thu, 2 May 2013 20:08:16 +0000 (13:08 -0700)]
Move a variable into the area of code where it's used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Jeremy Allison [Thu, 2 May 2013 19:34:54 +0000 (12:34 -0700)]
Ensure we don't try and cancel anything that is in a compound-related request.
Too hard to deal with splitting off the replies.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Jeremy Allison [Thu, 2 May 2013 18:12:47 +0000 (11:12 -0700)]
Only do the 1 second delay for sharing violations for SMB1, not SMB2.
Match Windows behavior.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Volker Lendecke [Tue, 7 May 2013 13:07:34 +0000 (15:07 +0200)]
Makefile: Fix bug 9868 - Don't know how to make LIBNDR_PREG_OBJ.
Thanks to Lucs for finding the issue
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May 7 17:57:57 CEST 2013 on sn-devel-104
Volker Lendecke [Tue, 7 May 2013 10:39:16 +0000 (12:39 +0200)]
winbind: Fix bug 9854 -- NULL pointer dereference
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue May 7 14:49:07 CEST 2013 on sn-devel-104
Jeremy Allison [Mon, 6 May 2013 21:10:58 +0000 (14:10 -0700)]
Fix up the man pages to explain that "store dos attributes" overrides them.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 7 01:24:54 CEST 2013 on sn-devel-104
Jeremy Allison [Mon, 6 May 2013 21:10:15 +0000 (14:10 -0700)]
Allow "store dos attributes" to override the other "map XXX" parameters.
Makes us consistent with what is described in the man pages.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Mon, 6 May 2013 11:16:49 +0000 (13:16 +0200)]
build: default --with-regedit to "auto" instead of "yes"
This means we don't build regedit when there is no ncurses
and this is not an error for the overall build.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Mon May 6 20:11:09 CEST 2013 on sn-devel-104
Michael Adam [Mon, 6 May 2013 12:14:02 +0000 (14:14 +0200)]
build: fix --with-regedit to properly honour the yes/no/auto scheme
I.e. fail configure when ncurses support is not found but
regedit build was requested.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Michael Adam [Mon, 6 May 2013 11:19:24 +0000 (13:19 +0200)]
build: simplify ncurses checks: --with-regedit does not take a path list
--with-regedit is defined using SAMBA3_ADD_OPTION(), and can hence
take the values "yes", "no", and "auto". So it is not possible to
hand in paths to look for ncurses-config via this option.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Michael Adam [Thu, 25 Apr 2013 23:06:58 +0000 (01:06 +0200)]
docs: update the description of the formulas in the idmap_autorid manpage
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon May 6 18:23:56 CEST 2013 on sn-devel-104
Michael Adam [Thu, 25 Apr 2013 22:52:49 +0000 (00:52 +0200)]
s3:idmap:autorid: add a comment block explaining the calculations
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Michael Adam [Thu, 25 Apr 2013 18:24:36 +0000 (20:24 +0200)]
s3:idmap:autorid: simplify the id->sid calculation
To make it more intutive.
rid = reduced_rid + domain_range_index * range_size
where
reduced_rid = (id - id_low) % range_size
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Michael Adam [Thu, 25 Apr 2013 18:12:39 +0000 (20:12 +0200)]
s3:idmap:autorid: calculate the range's low_id in idmap_autorid_get_domainrange()
This way, the calculation needs to be don only in one central place and
the formulas get simpler.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Michael Adam [Thu, 25 Apr 2013 17:47:00 +0000 (19:47 +0200)]
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>
Michael Adam [Thu, 25 Apr 2013 17:18:27 +0000 (19:18 +0200)]
s3:idmap:autorid: rename range.multiplier to domain_range_index
The name multiplier is very confusing (at least for me).
This is an index that is used to reference the various
per-domain ranges.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Michael Adam [Thu, 25 Apr 2013 17:13:45 +0000 (19:13 +0200)]
s3:idmap:autorid: rename autorid_range_config.sid to domsid, along with instances
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Michael Adam [Thu, 25 Apr 2013 17:04:56 +0000 (19:04 +0200)]
s3:idmap:autorid: rename autorid_domain_config --> autorid_range_config and instances to "range"
This describes it better with the new support for multiple ranges for domains.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Michael Adam [Thu, 25 Apr 2013 11:56:03 +0000 (13:56 +0200)]
s3:idmap:autorid: rename domainnum to rangenum
Now ranges don't correspond to domains any more, but
multiple ranges are associated to a domain. So the name
is misleading.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Abhidnya Joshi [Tue, 16 Apr 2013 11:11:45 +0000 (16:41 +0530)]
docs-xml: manpage update for autorid multirange support
Signed-off-by: Abhidnya Joshi <achirmul@in.ibm.com>
Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Abhidnya Joshi [Wed, 10 Apr 2013 10:56:07 +0000 (16:26 +0530)]
s3:winbindd/autorid multiple range support
when a mapping request for a RID comes in that is larger
than the rangesize, allocate an extension range to be able
to map this one
This is especially important for large installations which
might have large RIDs being used in a trusted domain that
the administrator was not aware of when planning for autorid
usage and so those objects could not be mapped up to now.
As it is not possible to change the rangesize after the first
start of autorid, this would lead to big trouble.
Signed-off-by: Abhidnya Joshi <achirmul@in.ibm.com>
Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Christian Ambach [Tue, 16 Apr 2013 10:39:55 +0000 (12:39 +0200)]
s3:utils fix wrong usage of PRIu64 in sscanf
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Christian Ambach [Tue, 16 Apr 2013 10:39:39 +0000 (12:39 +0200)]
s3:lib fix wrong usage of PRIu64 in sscanf
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Christian Ambach [Tue, 16 Apr 2013 08:56:29 +0000 (10:56 +0200)]
lib/replace: add SCNx macros
we already have PRI*, but the corresponding SCN* were missing
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Christian Ambach [Tue, 9 Apr 2013 21:10:16 +0000 (23:10 +0200)]
lib/replace: prefer inttypes.h over stdint.h
according to C99 7.8, inttypes.h should include stdint.h so prefer inttypes.h
and fall back to stdint.h (and our own definitions of PRI*) only when inttypes.h
could not be found
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Matthieu Patou [Sun, 5 May 2013 22:37:58 +0000 (15:37 -0700)]
selftest: do not run doc tests if we don't build manpages
if XSLTPROC_MANPAGES is not set then manpages won't be built so there is
no sense trying to test it.
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 6 12:53:37 CEST 2013 on sn-devel-104
Matthieu Patou [Sun, 5 May 2013 22:37:00 +0000 (15:37 -0700)]
selftest: Output error when samba_tool user command fails
It should help to debug why is it failing on some hosts in the build
farm (ie. sn-devel)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Matthieu Patou [Sun, 5 May 2013 22:05:37 +0000 (15:05 -0700)]
configure: print a message when docbook.xsl is missing localy
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Matthieu Patou [Sun, 5 May 2013 21:53:40 +0000 (14:53 -0700)]
libsmb: call directly tevent_req_simple_finish_ntstatus
The CC compiler on openindiana is not pleased with a void function doing
a return of another void function.
It should help the build of openindiana on the buildfarm
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon May 6 08:35:10 CEST 2013 on sn-devel-104
Jeremy Allison [Fri, 3 May 2013 17:06:39 +0000 (10:06 -0700)]
Fix warnings and one compile error caused by newer gcc 4.7.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sun May 5 19:01:38 CEST 2013 on sn-devel-104
Volker Lendecke [Fri, 3 May 2013 10:28:59 +0000 (10:28 +0000)]
idmap: Store negative cache entries if the backend fails
This changes the behaviour for out-of-range queries: The tdb backend
(probably all backends) returns NT_STATUS_NONE_MAPPED and does not set the
map.status value to ID_UNMAPPED. This means that we did an early error
exit, not setting a negative cache value. This makes smbd ask winbind
over and over again for out-of-range gids, which can be a performance
problem in certain scenarios.
The new code makes us fall through to the code setting the negative
cache entry in all cases.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May 3 14:48:35 CEST 2013 on sn-devel-104
Volker Lendecke [Fri, 3 May 2013 10:24:17 +0000 (10:24 +0000)]
idmap: Print error from idmap_backends_unixid_to_sid
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Thu, 25 Apr 2013 12:24:08 +0000 (14:24 +0200)]
libsmb: Use sizeof instead of explicit numbers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 30 16:02:19 CEST 2013 on sn-devel-104
Volker Lendecke [Thu, 25 Apr 2013 12:19:36 +0000 (14:19 +0200)]
libsmb: Use smb2_lease_push in smb2_create_send
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 17 Apr 2013 15:04:38 +0000 (17:04 +0200)]
libcli: Add smb2_lease marshalling
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 17 Apr 2013 14:48:21 +0000 (16:48 +0200)]
libsmb: Move "struct smb2_lease" to common
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Anand Avati [Mon, 29 Apr 2013 22:21:00 +0000 (15:21 -0700)]
check_parent_exists() can change errno. Ensure we preserve it across calls.
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Apr 30 11:00:11 CEST 2013 on sn-devel-104
Volker Lendecke [Mon, 29 Apr 2013 16:40:08 +0000 (18:40 +0200)]
winbind4: Fix bug 9832 -- talloc use after free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 26 Oct 2012 17:52:08 +0000 (19:52 +0200)]
regedit: Use color only when available.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Apr 29 15:02:19 CEST 2013 on sn-devel-104
Andreas Schneider [Fri, 26 Oct 2012 17:21:50 +0000 (19:21 +0200)]
regedit: Improve the while loop.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 26 Oct 2012 16:46:29 +0000 (18:46 +0200)]
regedit: Remove talloc leak report.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Mon, 20 Aug 2012 03:09:53 +0000 (20:09 -0700)]
regedit: Mark string values if they contain unprintable chars.
Also, edit the values in bin mode to avoid screen glitches.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Mon, 20 Aug 2012 03:02:51 +0000 (20:02 -0700)]
regedit: Add an edit binary command.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Mon, 20 Aug 2012 02:11:16 +0000 (19:11 -0700)]
regedit: Handle zero-length buffers better with hexedit.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Mon, 20 Aug 2012 01:29:06 +0000 (18:29 -0700)]
regedit: Load values on startup.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Sun, 19 Aug 2012 07:18:22 +0000 (00:18 -0700)]
regedit: Simplify the editor dialog input loop.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Sun, 19 Aug 2012 06:44:59 +0000 (23:44 -0700)]
regedit: Fix white space and wrap long lines.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Sat, 18 Aug 2012 02:03:12 +0000 (19:03 -0700)]
regedit: Add missing copyright headers to hexedit code.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Fri, 17 Aug 2012 10:06:20 +0000 (03:06 -0700)]
regedit: Enable using tab to cycle thru dialog buttons.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
C. Davis [Fri, 17 Aug 2012 09:15:20 +0000 (02:15 -0700)]
regedit: Restore cursor position when user tabs to a field.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>