Andrew Bartlett [Tue, 16 Mar 2010 03:41:51 +0000 (14:41 +1100)]
s4:dsdb Add a memory context for dsdb_get_schema()
When specified, we talloc_reference onto this context to ensure that
pointers found in it are valid for the life of the objects they are
placed into. (Such as the string form of LDAP attributes).
Andrew Bartlett
Andrew Bartlett [Tue, 16 Mar 2010 03:40:15 +0000 (14:40 +1100)]
s4:dsdb Don't error out if we can't get the Aggregate schema DN yet
It's easier to just set it up when we can, then to deal with the
ordering issues in ldb startup. As long as we have it ready if a real
client ever asks for it, then we should be happy.
Andrew Bartlett
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 22:18:44 +0000 (23:18 +0100)]
s4:registry - check also for other registry value types in the generic test
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 21:46:20 +0000 (22:46 +0100)]
s4:registry - add a test for the "REG_DWORD_BIG_ENDIAN" datatype
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 17:55:33 +0000 (18:55 +0100)]
s4:registry - introduce the "REG_DWORD_BIG_ENDIAN" datatype
It's like the normal REG_DWORD type but the byte order swapped
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 07:49:22 +0000 (08:49 +0100)]
s4:dsdb/kcc/*.c - fix up wrong typed counters
Erick Nogueira do Nascimento [Mon, 15 Mar 2010 16:33:06 +0000 (13:33 -0300)]
s4-drs: Torture testcase for DS_REPL_INFO_METADATA_2_FOR_OBJ infoType of DsGetReplInfo()
This torture testcase considers both cases for this infoType: when the flag
DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE is enabled and when not.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Erick Nogueira do Nascimento [Mon, 15 Mar 2010 16:31:50 +0000 (13:31 -0300)]
s4-drs: DsGetReplInfo(), infoType = DS_REPL_INFO_METADATA_2_FOR_OBJ
Implementation of the DS_REPL_INFO_METADATA_2_FOR_OBJ infoType for DsGetReplInfo()
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Craig Miskell [Mon, 15 Mar 2010 23:20:44 +0000 (16:20 -0700)]
Fix bug #7191 - WINS doesn't respond after > 86 #1c registrations.
Michael Adam [Mon, 15 Mar 2010 11:36:52 +0000 (12:36 +0100)]
s3:registry-legacy: use talloc_stackframe() instead of NULL in regkey_open_internal()
Michael
Michael Adam [Mon, 15 Mar 2010 11:16:52 +0000 (12:16 +0100)]
s3:smbcacls: also honour the "--sddl" flag when setting ACLs.
Michael
Volker Lendecke [Sun, 14 Mar 2010 20:18:34 +0000 (21:18 +0100)]
s3: Fix an uninitialized variable read
Found by Laurent Gaffie <laurent.gaffie@gmail.com>
Thanks for that,
Volker
Jeremy Allison [Mon, 15 Mar 2010 22:39:41 +0000 (15:39 -0700)]
Remove the bool admin_user from conn struct. We no longer look at this to make access decisions.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 22:04:18 +0000 (15:04 -0700)]
Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()
Make ea data checks identical for trans2open and trans2mkdir.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 19:24:06 +0000 (12:24 -0700)]
Remove reference to conn->admin_user in preparation for removal.
We use (uid_t)0 here not sec_initial_uid() as make test uses a single user context.
I will revisit this when all the uid check changes are complete.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 19:18:04 +0000 (12:18 -0700)]
Simplify processing of "admin user". If a user is an admin_user ensure their conn token is uid 0.
This simplifies change_to_user() and removes special processing of the assignments
we pass to set_sec_ctx().
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 19:13:30 +0000 (12:13 -0700)]
Switch over to using get_currect_XXX() accessor functions.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 18:04:51 +0000 (11:04 -0700)]
Pass "connection_struct *conn" into functions that currently use "current_user.XXX"
Will allow me to replace them with accessor functions.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 17:45:15 +0000 (10:45 -0700)]
Add accessor functions for current uid, gid, unix token, NT token and vuid.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 18:03:29 +0000 (11:03 -0700)]
We don't need to treat the token differently in the conn->admin_user case, it should already be pointing to a token with uid == 0.
Jeremy.
Jeremy Allison [Mon, 15 Mar 2010 17:33:09 +0000 (10:33 -0700)]
Rever
e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 "Remove more uses of "extern struct current_user current_user;"."
As requested by Volker, split this into smaller commits.
Jeremy.
Günther Deschner [Mon, 15 Mar 2010 16:08:23 +0000 (17:08 +0100)]
s4-smbtorture: add simple printer rename test to RPC-SPOOLSS-PRINTER.
Guenther
Günther Deschner [Mon, 15 Mar 2010 16:08:23 +0000 (17:08 +0100)]
testprogs: add EnumPrinterData test to win32 spoolss test.
Guenther
Günther Deschner [Mon, 15 Mar 2010 15:11:43 +0000 (16:11 +0100)]
s4-smbtorture: fill PrinterDriverData with more values for consistency test.
Guenther
Stefan Metzmacher [Mon, 15 Mar 2010 13:42:17 +0000 (14:42 +0100)]
s3:smbd: make sure we always have a valid talloc stackframe
metze
Stefan Metzmacher [Mon, 15 Mar 2010 13:39:11 +0000 (14:39 +0100)]
talloc_stack: reset stackframe pointers to NULL
This makes it easier to debug the code in future.
metze
Stefan Metzmacher [Mon, 15 Mar 2010 13:32:52 +0000 (14:32 +0100)]
talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
In smbd there's a small gab between TALLOC_FREE(frame); before
be call smbd_parent_loop() where we don't have a valid talloc stackframe.
smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop.
As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct
the time header for the debug message we crash on some systems.
metze
Günther Deschner [Mon, 15 Mar 2010 13:55:25 +0000 (14:55 +0100)]
s4-smbtorture: cleanup data after enumdata{ex} consistency test.
Guenther
Günther Deschner [Mon, 15 Mar 2010 13:41:58 +0000 (14:41 +0100)]
s3-spoolss: Fix _spoolss_EnumPrinterData.
Guenther
Günther Deschner [Mon, 15 Mar 2010 13:11:44 +0000 (14:11 +0100)]
s4-smbtorture: when cross checking enumdata{ex} make sure to have at least one entry.
Guenther
Günther Deschner [Mon, 15 Mar 2010 11:38:17 +0000 (12:38 +0100)]
s4-smbtorture: add PrinterInfo_to_SetPrinterInfo helper to RPC-SPOOLSS.
Guenther
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 12:44:00 +0000 (13:44 +0100)]
s4:registry - rpc - don't crash when communication partner isn't available
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 10:15:19 +0000 (11:15 +0100)]
s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions
We don't need to provide an extra representation for all available registry types.
But if we treat all unsupported types as binary we also get our tools (regtree,
regshell, regdiff...) working with them in a basic manner.
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 10:12:52 +0000 (11:12 +0100)]
s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch
(As in the "reg_value_types" structure)
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 10:52:24 +0000 (11:52 +0100)]
s4:registry - local testsuite - add a test for REG_QWORD
Change also here to fixed-length HEX values output to test for the right
representation.
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 10:51:42 +0000 (11:51 +0100)]
s4:registry - fix up the output of hexadecimal values
Use a fixed-length representation to avoid platform-specific issues.
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 10:07:36 +0000 (11:07 +0100)]
s4:registry - add support for REG_QWORD values
Basically the same as REG_DWORD but these are eight byte long.
Günther Deschner [Mon, 15 Mar 2010 09:20:06 +0000 (10:20 +0100)]
s4-smbtorture: fix torture_comment in RPC-SPOOLSS.
Guenther
Stefan Metzmacher [Mon, 15 Mar 2010 08:37:42 +0000 (09:37 +0100)]
s4:tortore/libnet: fix crash bugs because of incorrect function prototypes
metze
Matthias Dieter Wallnöfer [Sun, 14 Mar 2010 16:40:14 +0000 (17:40 +0100)]
s4:registry - util.c - add harder checks for inputs on "reg_val_data_string"
("NULL" result is error on most data types).
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 12:37:18 +0000 (13:37 +0100)]
Revert "s4-smbtorture: skip extended SetValue test against Samba (both dont survive)."
This reverts commit
40e2c04f8aba605e951810751222559ea0d32ebd.
s4 should support now also the extended "SetValue" tests.
Matthias Dieter Wallnöfer [Sun, 14 Mar 2010 16:18:29 +0000 (17:18 +0100)]
s4:registry - ldb.c - provide a mechanism for storing UTF8/binary REG_DWORD values
We need to support this as gd's WINREG torture test shows.
Matthias Dieter Wallnöfer [Sun, 14 Mar 2010 09:30:19 +0000 (10:30 +0100)]
s4:registry - ldb.c - provide a mechansim for storing UTF8/binary REG_SZ/REG_EXPAND_SZ values
We need to support this as gd's WINREG torture test shows.
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 20:13:59 +0000 (21:13 +0100)]
s4:registry - ldb.c - fix up a strange LDB filter
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 19:03:03 +0000 (20:03 +0100)]
s4:registry - ldb.c - fix up the memory handling in "reg_ldb_unpack_value"
Don't substitute existing data blobs with new ones and make sure, that the
result objects in the data blob don't have memory dependencies of the LDB value
input.
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 18:37:13 +0000 (19:37 +0100)]
s4:registry - ldb.c - check more for possible "Out of memory" circumstances
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 18:30:43 +0000 (19:30 +0100)]
s4:registry - ldb.c - remove superfluous "query" variable
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 18:29:03 +0000 (19:29 +0100)]
s4:registry - ldb.c - Consider result values in "reg_ldb_pack_value"
Break on errors and return NULL and otherwise the message pointer.
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 17:39:54 +0000 (18:39 +0100)]
s4:registry - ldb.c - Move the "val" structure
Move it into the REG_SZ/REG_EXPAND_SZ case block since it's used only there.
Plus convert it from static into dynamic talloc'ed.
Volker Lendecke [Sun, 14 Mar 2010 13:21:18 +0000 (14:21 +0100)]
s3: Remove some unused #defines
Volker Lendecke [Sun, 14 Mar 2010 12:49:58 +0000 (13:49 +0100)]
s3: Use a switch to implement map_nt_error_from_tdb
First, this immediately gave me the warning that TDB_ERR_NESTING was not
covered and second, this saved 48 bytes in the .o :-)
Volker Lendecke [Sun, 14 Mar 2010 13:13:30 +0000 (14:13 +0100)]
s3: Remove some unused code
Volker Lendecke [Sun, 14 Mar 2010 13:06:45 +0000 (14:06 +0100)]
s3: Fix some nonempty blank lines
Matthias Dieter Wallnöfer [Sun, 14 Mar 2010 09:31:29 +0000 (10:31 +0100)]
Reintroduce "s4:provision Improve the handling of provision errors""
This mainly reverts commit
f0bc02d74c16bc013e9fdab46ef271cf45873453.
Jelmer pointed out a way how we can achieve the same error handling with an
older syntax also on Python 2.4+.
Volker Lendecke [Sat, 13 Mar 2010 19:02:16 +0000 (20:02 +0100)]
s3: Convert unexpected.tdb to use tdb_wrap_open
Volker Lendecke [Sat, 13 Mar 2010 18:05:38 +0000 (19:05 +0100)]
s3: Make tdb_wrap_open more robust
This hides the use of talloc_reference from the caller, making it impossible to
wrongly call talloc_free() on the result.
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 11:47:28 +0000 (12:47 +0100)]
NSS:winbind_struct_protocol.h - fix typo
Matthias Dieter Wallnöfer [Sat, 13 Mar 2010 11:26:30 +0000 (12:26 +0100)]
Revert "s4:provision Improve the handling of provision errors"
This reverts partially commit
027123199e13cc02ae4edadd8f0dd0f0660e1193.
Andrew, this is not Python 2.4+ compatible
Stefan Metzmacher [Sat, 13 Mar 2010 07:19:34 +0000 (08:19 +0100)]
s4:torture/rpc/spoolss.c: fix compiler warnings
metze
Günther Deschner [Sat, 13 Mar 2010 01:26:59 +0000 (02:26 +0100)]
s4-smbtorture: warn on unexpected devicenames in spoolss devicemode test.
Guenther
Günther Deschner [Sat, 13 Mar 2010 00:37:32 +0000 (01:37 +0100)]
s4-smbtorture: send even more random data in extended winreg SetValue test.
Guenther
Günther Deschner [Sat, 13 Mar 2010 00:34:31 +0000 (01:34 +0100)]
s4-smbtorture: fix build and handle in spoolss test.
it's friday night...
Guenther
Günther Deschner [Fri, 12 Mar 2010 17:31:22 +0000 (18:31 +0100)]
s3-spoolss: wrap _spoolss_EnumPrinterData() around _spoolss_EnumPrinterDataEx().
This removes some dependencies to registry code.
Guenther
Günther Deschner [Sat, 13 Mar 2010 00:07:43 +0000 (01:07 +0100)]
s4-smbtorture: add spoolss EnumPrinterData vs EnumPrinterDataEx consistency test.
Guenther
Günther Deschner [Sat, 13 Mar 2010 00:05:24 +0000 (01:05 +0100)]
s4-smbtorture: refactor spoolss EnumPrinterData test.
Guenther
Günther Deschner [Fri, 12 Mar 2010 21:45:33 +0000 (22:45 +0100)]
s4-smbtorture: refactor SetPrinterData() calls a little more.
Guenther
Günther Deschner [Fri, 12 Mar 2010 21:11:14 +0000 (22:11 +0100)]
s4-smbtorture: re-arrange spoolss_SetPrinterData() tests.
Guenther
Günther Deschner [Fri, 12 Mar 2010 23:20:52 +0000 (00:20 +0100)]
s4-smbtorture: make sure RPC-SPOOLSS passes against 64bit archs (w2k8r2).
Guenther
Jeremy Allison [Fri, 12 Mar 2010 22:31:47 +0000 (14:31 -0800)]
Missed a couple more uses of conn->server_info->ptok that need to be get_current_nttok(conn)
Centralize the root check into smb1_file_se_access_check()
so this is used by modules/vfs_acl_common.c also.
Jeremy.
Jeremy Allison [Fri, 12 Mar 2010 21:56:51 +0000 (13:56 -0800)]
Remove more uses of "extern struct current_user current_user;".
Use accessor functions to get to this value. Tidies up much of
the user context code. Volker, please look at the changes in smbd/uid.c
to familiarize yourself with these changes as I think they make the
logic in there cleaner.
Cause smbd/posix_acls.c code to look at current user context, not
stored context on the conn struct - allows correct use of these
function calls under a become_root()/unbecome_root() pair.
Jeremy.
Matthias Dieter Wallnöfer [Fri, 12 Mar 2010 20:04:22 +0000 (21:04 +0100)]
s4:provision.py - small output improvement
Matthias Dieter Wallnöfer [Fri, 12 Mar 2010 17:56:44 +0000 (18:56 +0100)]
s4:util.c - "dsdb_check_optional_feature" - counter should be "unsigned"
Volker Lendecke [Fri, 12 Mar 2010 14:48:35 +0000 (15:48 +0100)]
s3: Add "net registry increment"
A convenience function to increment a DWORD value under a (cluster-wide) lock
Stefan Metzmacher [Thu, 11 Mar 2010 11:51:46 +0000 (12:51 +0100)]
s4:torture/rpc/dfs.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 11:30:24 +0000 (12:30 +0100)]
s4:torture/rpc/echo.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:33:10 +0000 (11:33 +0100)]
s4:torture/libnet: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:31:36 +0000 (11:31 +0100)]
s4:torture/ntp: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:27:58 +0000 (11:27 +0100)]
s4:libnet/libnet_time.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:27:40 +0000 (11:27 +0100)]
s4:libnet/libnet_share.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:27:16 +0000 (11:27 +0100)]
s4:libnet/libnet_samsync.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 06:59:14 +0000 (07:59 +0100)]
s4:libnet/libnet_passwd.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:26:27 +0000 (11:26 +0100)]
s4:libnet/libnet_join.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:25:34 +0000 (11:25 +0100)]
s4:libcli/util/clilsa.c: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Thu, 11 Mar 2010 10:25:01 +0000 (11:25 +0100)]
s4:client: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 17:17:28 +0000 (18:17 +0100)]
s4:rpc_server/spoolss: make use of dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 17:13:50 +0000 (18:13 +0100)]
s4:lib/registry/rpc: convert to use dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 10:12:17 +0000 (11:12 +0100)]
pidl:Samba4/NDR/Client: make the old rpc_request style async functions static
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:36:05 +0000 (10:36 +0100)]
s4:dcom: add a comment about unused code.
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:30:03 +0000 (10:30 +0100)]
s4:libcli/composite: get rid of composite_continue_rpc()
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:23:01 +0000 (10:23 +0100)]
s4:librpc/rpc/dcerpc_util.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:17:25 +0000 (10:17 +0100)]
s4:librpc/rpc/dcerpc_schannel.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Tue, 9 Mar 2010 14:46:55 +0000 (15:46 +0100)]
s4:torture/rpc: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:04:20 +0000 (10:04 +0100)]
s4:winbind/wb_sam_logon.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:03:56 +0000 (10:03 +0100)]
s4:winbind/wb_init_domain.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:03:26 +0000 (10:03 +0100)]
s4:winbind/wb_dom_info_trusted.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:02:50 +0000 (10:02 +0100)]
s4:winbind/wb_connect_sam.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:02:25 +0000 (10:02 +0100)]
s4:winbind/wb_connect_lsa.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:01:57 +0000 (10:01 +0100)]
s4:winbind/wb_cmd_usersids.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Wed, 10 Mar 2010 09:01:23 +0000 (10:01 +0100)]
s4:winbind/wb_cmd_list_trustdom.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Stefan Metzmacher [Tue, 9 Mar 2010 12:49:20 +0000 (13:49 +0100)]
s4:winbind/wb_cmd_getdcname: make use of use tevent_req based dcerpc_binding_handle stubs
metze