Kamen Mazdrashki [Fri, 11 Jun 2010 13:20:41 +0000 (16:20 +0300)]
s4/test-libnet: Refactor test_group_create() a little to: - 222
Kamen Mazdrashki [Fri, 11 Jun 2010 13:02:10 +0000 (16:02 +0300)]
s4/test-libnet: Re-align code a bit - more readable this way IMO
Kamen Mazdrashki [Fri, 11 Jun 2010 12:44:34 +0000 (15:44 +0300)]
s4/test-libnet: Refactor test_group_create() a little to:
- Close unused policy handle for created group
- re-align code - it is more readable this way IMHO
Kamen Mazdrashki [Fri, 11 Jun 2010 12:37:12 +0000 (15:37 +0300)]
s4/test-libnet: Refactor test_user_create() little bit to:
- fix a flaw that user RID is not returned in case
user is recreated
- close unused policy handle to created user
- do not take into account the result from
test_samr_close_handle - we don't case
Kamen Mazdrashki [Fri, 11 Jun 2010 12:30:09 +0000 (15:30 +0300)]
s4/test-libnet: add few comments for utility functions
Kamen Mazdrashki [Fri, 11 Jun 2010 12:11:01 +0000 (15:11 +0300)]
s4/test-libnet: Move LSA close handle function to a common location
Kamen Mazdrashki [Fri, 11 Jun 2010 12:01:07 +0000 (15:01 +0300)]
s4/test-libnet: remove unused code
Pre-connecting SAMR and LSA pipes is implemented in
test_libnet_context_init() function
Kamen Mazdrashki [Fri, 11 Jun 2010 11:59:57 +0000 (14:59 +0300)]
s4/test-libnet: Fix compile-time warning
Kamen Mazdrashki [Wed, 9 Jun 2010 22:53:38 +0000 (01:53 +0300)]
PATCH: Patch Matthias work so that 'net vampire' works again
Kamen Mazdrashki [Sat, 22 May 2010 16:13:23 +0000 (19:13 +0300)]
s4/waf: Use TERMINAL env var or 'xterm' to start a terminal to debug in
Kamen Mazdrashki [Sat, 22 May 2010 16:10:52 +0000 (19:10 +0300)]
s4/test: Add DC_ vars to VAMPIRE_DC environment
Kamen Mazdrashki [Sat, 22 May 2010 16:08:49 +0000 (19:08 +0300)]
Dump environment during 'make test'
Stefan Metzmacher [Sat, 8 May 2010 07:44:09 +0000 (09:44 +0200)]
TODO: pidl:NDR/Parser: for ndr64 the union alignment comes before the switch_type
metze
Andrew Bartlett [Tue, 4 May 2010 10:32:54 +0000 (20:32 +1000)]
s4:dsdb Try to cope with linked attribute updates where the DN has changed.
We need to try and search by GUID if we can.
Andrew Bartlett
Kamen Mazdrashki [Tue, 4 May 2010 09:44:20 +0000 (12:44 +0300)]
s4/drs: Be more verbose when we are about to rename an object in repl_meta_data
Kamen Mazdrashki [Tue, 27 Apr 2010 01:43:26 +0000 (04:43 +0300)]
s4/libnet: Add "dNSHostName" attribute when joining the Site
"dNSHostName" attribute is important part of Server object
and it is Server's recored owner responsibility to maintain
this attribute value.
Kamen Mazdrashki [Tue, 27 Apr 2010 01:41:38 +0000 (04:41 +0300)]
s4/libnet: Vampire should join us as a Domain Controller
Kamen Mazdrashki [Tue, 13 Apr 2010 23:15:50 +0000 (02:15 +0300)]
s4/selftest: Fix wrong comment
Kamen Mazdrashki [Tue, 13 Apr 2010 23:15:27 +0000 (02:15 +0300)]
s4/selftest: Fix 'net vampire' command invocation
- 'net vampire' no longer accepts '--realm' option
- 'vampire' command must follow 'bin/net' on command line
so that Python commands are searched for 'vampire' command
- '--target-dir' option must be used
Andrew Bartlett [Tue, 13 Apr 2010 01:08:41 +0000 (11:08 +1000)]
s4:selftest Fix 'net vampire' command invocation
The change to allowing subcommands in 'net' to use their own options
parser means that we can't use this argument order any more. We need
to put global options before commands.
Andrew Bartlett
Andrew Bartlett [Wed, 10 Mar 2010 23:44:05 +0000 (10:44 +1100)]
s4:selftest Run RPC-DSSYNC against the vampired DC
Andrew Bartlett [Wed, 10 Mar 2010 22:38:37 +0000 (09:38 +1100)]
s4:selftest Run the RPC echo earlier, so to start the member and vampire DC
This means that the vampire DC is running while the other tests are
doing modifications, which will trigger more traffic and test out the
code better.
Andrew Bartlett
Andrew Bartlett [Wed, 10 Mar 2010 20:26:41 +0000 (07:26 +1100)]
s4:selftest Add test of the vampire'ed DC
Andrew Bartlett
Andrew Bartlett [Thu, 11 Mar 2010 23:36:12 +0000 (10:36 +1100)]
s4:selftest Add vampire_dc test environment
This starts a domain controller, after running 'net vampire' to
populate it.
Andrew Bartlett
Kamen Mazdrashki [Wed, 6 Jan 2010 11:36:27 +0000 (13:36 +0200)]
ECLIPSE + PyDev Project
Kamen Mazdrashki [Thu, 10 Jun 2010 15:23:06 +0000 (18:23 +0300)]
s4/test: use test_libnet_context_init() function to create libnet_context
This way we ensure that LIBNET call will be issued against
the DC we are testing against
Kamen Mazdrashki [Thu, 10 Jun 2010 15:21:44 +0000 (18:21 +0300)]
s4/test: fix SEGFAULT in test_group_create when rid is NULL
Caller of this function may not need group RID and
in such case it passes NULL for rid parameter
Kamen Mazdrashki [Thu, 10 Jun 2010 10:12:08 +0000 (13:12 +0300)]
s4/test-libnet: Helper func to initialize libnet_context
and create rpc connections to SAMR and LSA pipes.
This function should be used in cases where we need
'deterministic' connection to the DC we are testing against.
The problem is that most of the test follow the pattern:
1. Connect to server supplied on command line
2. Create user/group through connection in 1.
3. Use 'fresh' libnet_context to query/alter the object in
step 2.
In singe-DC environment this work well. But in multiple-DC
environment libnet may connect to another DC (step 3), not
the one we use in step 1 and 2. This leads to false error -
object created in step 2 is not found on DC we are querying
in step 3.
Kamen Mazdrashki [Wed, 9 Jun 2010 23:02:06 +0000 (02:02 +0300)]
s4/test: Call test_user_cleanup with original RDN for the user
'name' var is changed during the test execution and should
contain samAccountName for the user, while test_user_cleanup()
expects account RDN to be passed
Kamen Mazdrashki [Wed, 9 Jun 2010 22:59:51 +0000 (01:59 +0300)]
s4/test: Fix incorrect NTSTATUS comparison
In case group already exists, we should get NT_STATUS_GROUP_EXISTS.
Kamen Mazdrashki [Tue, 8 Jun 2010 15:03:00 +0000 (18:03 +0300)]
s4/test: remove create/delete group implementation in API-CREATEGROUP test
We already have common implementation for create/delete
group in libnet/utils.c
Kamen Mazdrashki [Tue, 8 Jun 2010 12:44:00 +0000 (15:44 +0300)]
s4/test: Remove duplicated test_opendomain() functionality
We already have a nice common test_domain_open()
function in libnet/util.c
Kamen Mazdrashki [Mon, 7 Jun 2010 15:44:14 +0000 (18:44 +0300)]
s4/test: libnet_user tests should use common test_user_cleanup
implementation instead of not-so-informative test_cleanup()
Kamen Mazdrashki [Mon, 7 Jun 2010 15:33:35 +0000 (18:33 +0300)]
s4/test: Refactor test_user_cleanup to be more robust
We always call this function with user's account RDN
while samr_LookupNames() searches for samAccountName.
Kamen Mazdrashki [Mon, 7 Jun 2010 14:51:26 +0000 (17:51 +0300)]
s4/test: remove duplicated comment
Andreas Schneider [Thu, 10 Jun 2010 15:48:39 +0000 (11:48 -0400)]
s3:misc make use of server_[event/messaging]_context directly
Untangle these functions from smbd specific dependencies so they can be freely
used in multiple servers.
Simo Sorce [Thu, 10 Jun 2010 15:55:27 +0000 (11:55 -0400)]
s3:winbindd use common server context functions
Simo Sorce [Thu, 10 Jun 2010 15:54:00 +0000 (11:54 -0400)]
s3:lib make server contexts generic
Pair-programmed-with: Andreas Schneider <asn@samba.org>
Jeremy Allison [Thu, 10 Jun 2010 21:28:55 +0000 (14:28 -0700)]
Fix the build in the non WITH_AIO case (sorry).
Björn Jacke [Thu, 10 Jun 2010 21:15:19 +0000 (23:15 +0200)]
s3: readd h_errno struct member but rename it
as pointed out by metze this is a structure of fixed size, which should not be
changed.
Rusty Russell [Thu, 10 Jun 2010 20:27:51 +0000 (13:27 -0700)]
Since idtree assigns sequentially, it rarely reaches high numbers.
But such numbers can be forced with idr_get_new_above(), and that
reveals two bugs:
1) Crash in sub_remove() caused by pa array being too short.
2) Shift by more than 32 in _idr_find(), which is undefined, causing
the "outside the current tree" optimization to misfire and return NULL.
Jeremy Allison [Thu, 10 Jun 2010 20:20:37 +0000 (13:20 -0700)]
Implement AIO in SMB2. Doesn't allow cancel calls yet (to be added).
Jeremy.
Jeremy Allison [Thu, 10 Jun 2010 20:19:25 +0000 (13:19 -0700)]
Ensure we correctly setup req->subreq before testing for async. Stops crashes when
XX_send functions set async to stop interim replies being sent.
Jeremy.
Jeremy Allison [Thu, 10 Jun 2010 20:17:35 +0000 (13:17 -0700)]
Don't use the autofree context for the globals. This causes child smbd's forked
by modules to crash due to destructors being called (found when using the vfs_aio_fork
module with smb2).
Jeremy.
Simo Sorce [Thu, 10 Jun 2010 18:56:03 +0000 (14:56 -0400)]
s3:cleaunp reformatting for readability
Simo Sorce [Thu, 10 Jun 2010 18:36:19 +0000 (14:36 -0400)]
s3:cleanup remove trailing spaces
Björn Jacke [Thu, 10 Jun 2010 15:19:16 +0000 (17:19 +0200)]
s3: fix build on HP-UX
this struct member h_errno is not used in the HP-UX code paths, it was just
there because Solaris has it, too. As h_errno is a function call macro on HP-UX
when thread support is enabled we run into trouble here. Just commenting it out
should be okay as we don't use it anyway.
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 14:18:41 +0000 (16:18 +0200)]
s4:ldap.py - add testcase which demonstrates the reset of the "primaryGroupID"
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 14:15:10 +0000 (16:15 +0200)]
s4:samldb LDB module - fix up the case when the old and new "primaryGroupID" are the same
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 14:08:23 +0000 (16:08 +0200)]
s4:samldb LDB module - don't create multiple "ac" module contexts on modify operations
Since we do now run sequentially through all checks we don't need multiple "ac"
contexts anymore.
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 13:47:48 +0000 (15:47 +0200)]
s4:dcesrv_samr_Add/DeleteAliasMember - provide better NTSTATUS return codes when something didn't work
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 10:42:04 +0000 (12:42 +0200)]
s4:dcesrv_samr_GetAliasMembership - fix type of counter variables
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 10:19:04 +0000 (12:19 +0200)]
s4:dcesrv_samr_DeleteAliasMember - add more braces to fit better the coding styles
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 10:17:48 +0000 (12:17 +0200)]
s4:dcesrv_samr_AddAliasMembership - Merge the two error blocks into one
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 09:50:12 +0000 (11:50 +0200)]
s4:dcesrv_samr_Add/DelGroupMember - remove the account type check
MS-SAMR 3.1.5.8 speaks from accounts which are not necessarely only users.
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 09:48:33 +0000 (11:48 +0200)]
s4:dcesrv_samr_AddGroupMember - also the error code "LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS" is allowed
This is returned when the group is the primary group of the specified entry.
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 09:05:43 +0000 (11:05 +0200)]
s4:samba_dsdb LDB module - move the "objectclass_attrs" module back
I think it should be lower in order to control also the "instanceType" module.
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 08:52:31 +0000 (10:52 +0200)]
s4:ldap.py - add a test to demonstrate the 'instanceType' behaviour
Matthias Dieter Wallnöfer [Thu, 10 Jun 2010 08:39:52 +0000 (10:39 +0200)]
s4:instancetype LDB module - prevent all types of "instanceType" manipulation
Also on Windows Server you aren't able to change it.
Volker Lendecke [Thu, 10 Jun 2010 13:40:14 +0000 (15:40 +0200)]
s3: Fix EnumDomainAliases when no aliases are in LDAP
We used to return NT_STATUS_ACCESS_DENIED, now we just return 0 entries, just
like W2k8 does.
usrmgr.exe was pretty unhappy with the NT_STATUS_ACCESS_DENIED
Michael Adam [Thu, 10 Jun 2010 09:56:15 +0000 (11:56 +0200)]
s3:pdb_ldap: fix bug 7505 - init_sam_from_ldap stores group in sid2uid cache
Volker Lendecke [Thu, 10 Jun 2010 07:50:32 +0000 (09:50 +0200)]
s3: Add a dummy test to prove the maxfd calculation
To be run in a debugger, there's no way to inspect the internal tevent_select.c
maxfd calculation
Volker Lendecke [Thu, 10 Jun 2010 07:41:11 +0000 (09:41 +0200)]
tevent: Fix maxfd calculation in tevent_select
When doing
fd1 = tevent_add_fd(ev, ev, 2, 0, NULL, NULL);
fd2 = tevent_add_fd(ev, ev, 3, 0, NULL, NULL);
TALLOC_FREE(fd2);
fd2 = tevent_add_fd(ev, ev, 1, 0, NULL, NULL);
we end up with select_ev->maxfd==1. This is wrong.
An alternative fix might be to make select_ev->maxfd an unsigned int and make
EVENT_INVALID_MAXFD==UINT_MAX. But in theory we might end up with an fd of
UINT_MAX.
std_event_add_fd() contains exactly the same piece of code, so I'm directly
pushing it.
Volker
Karolin Seeger [Thu, 10 Jun 2010 08:35:56 +0000 (10:35 +0200)]
s3-smbd: Fix typo in comment.
Karolin
Karolin Seeger [Thu, 10 Jun 2010 08:34:58 +0000 (10:34 +0200)]
s3-passdb: Fix typo in comment.
Karolin
Jeremy Allison [Thu, 10 Jun 2010 02:12:02 +0000 (19:12 -0700)]
Rename "allow_smb2" -> "using_smb2" and make the usage clearer.
Jeremy Allison [Thu, 10 Jun 2010 00:09:11 +0000 (17:09 -0700)]
Split out the "finished write processing" code into a function so it can be called
by both sync and async code.
Jeremy.
Jeremy Allison [Thu, 10 Jun 2010 00:08:41 +0000 (17:08 -0700)]
Ensure we don't send SMB1 keepalives on an SMB2 connection.
Jeremy.
Jeremy Allison [Wed, 9 Jun 2010 17:48:12 +0000 (10:48 -0700)]
Split out the "finished read processing" code into a function so it can be called
by both sync and async code.
Jeremy.
Andreas Schneider [Wed, 9 Jun 2010 14:15:28 +0000 (16:15 +0200)]
s3-winbind: Fixed setting default sequence number.
Björn Jacke [Wed, 9 Jun 2010 13:24:26 +0000 (15:24 +0200)]
s3: fix calculation of st_blocks in streams_xattr
Thanks to Joachim Schmitz for finding that miscalculation.
Björn Jacke [Wed, 9 Jun 2010 13:21:24 +0000 (15:21 +0200)]
s3: fix calculation of st_blocks in init_stat_ex_from_stat
this is just relevant for the very rare systems that don't have the st_blocks
struct member. This is a fixup of the fix for bug 7474.
Thanks to Joachim Schmitz for spotting this!
Nadezhda Ivanova [Wed, 9 Jun 2010 09:03:32 +0000 (12:03 +0300)]
Added guids for the validated writes.
Volker Lendecke [Tue, 16 Mar 2010 20:03:34 +0000 (21:03 +0100)]
s3: Fix bug 7253
acct_ctrl is 32 bit in LOGIN_CACHE, but "w" as a format specifier for
tdb_unpack only writes 16 bits. Okay on x86, not okay on Solaris.
Thanks to Vladimir.Marek@Sun.COM!
Volker
Jeremy Allison [Wed, 9 Jun 2010 04:20:07 +0000 (21:20 -0700)]
Fix a valgrind error found by SMB2-COMPOUND test.
If a file is closed we must also NULL out all chained_fsp
pointers when the fsp is freed to prevent invalid pointer
access.
Jeremy.
Jeremy Allison [Wed, 9 Jun 2010 00:44:05 +0000 (17:44 -0700)]
Second part of fix for 7501 - SMB2: CREATE request replies getting mangled.
Based on code from Ira Cooper <samba@ira.wakeful.net>, and also
advice on refactoring the patch into a function call. outbuf vectors
can be reallocated by smb2 processing code, so when returning interim
responses we must not make assumptions about vector size.
Jeremy
Ira Cooper [Tue, 8 Jun 2010 18:20:23 +0000 (11:20 -0700)]
Fix for bug 7501 - SMB2: CREATE request replies getting mangled.
Code for dup_smb2_req() was duplicating the wrong vector (i, instead
of i+2) when returning a non-minimal SMB2 response.
Günther Deschner [Tue, 8 Jun 2010 12:34:20 +0000 (14:34 +0200)]
s3-selftest: disable domain creds smbclient_s3 tests for now.
Not sure they were ever working before.
With this patch, make selftest is down to 4 failures from 259 tests.
(two times LOCK9 from s3 smbtorture, one spoolss notify test and
samba3.posix_s3.unix.info2).
Guenther
Günther Deschner [Tue, 8 Jun 2010 09:25:00 +0000 (11:25 +0200)]
s3-netdomjoin-gui: Fix Bug #7500. Fix 'not a string literal' warning in netdomjoin-gui.
Patch from Buchan Milne <bgmilne@mandriva.org>.
Thanks!
Guenther
Volker Lendecke [Tue, 8 Jun 2010 08:26:43 +0000 (10:26 +0200)]
Revert "s3:smbd Fix segfault if register_existing_vuid() fails"
This reverts commit
8f1cec5faf4e26de8b9797777059e99f2a66558b.
Volker Lendecke [Tue, 8 Jun 2010 08:26:35 +0000 (10:26 +0200)]
Revert "s3:smbd Give the kerberos session key a parent"
This reverts commit
4a7f45b7e1cef13bc28d7ee50dd4b5519bdec397.
Volker Lendecke [Tue, 8 Jun 2010 08:26:08 +0000 (10:26 +0200)]
Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"
This reverts commit
edba46ce94c335411ab337eeb4ef6f88fb3aae80.
Conflicts:
source3/auth/auth_ntlmssp.c
Günther Deschner [Tue, 8 Jun 2010 08:56:41 +0000 (10:56 +0200)]
s3-waf: fix the the waf build.
Guenther
Jeremy Allison [Mon, 7 Jun 2010 23:26:30 +0000 (16:26 -0700)]
Make aio_ex owned by a talloc context, not neccessarily on the null context.
Jeremy Allison [Mon, 7 Jun 2010 23:25:18 +0000 (16:25 -0700)]
Move "write_though" into aio_ex struct.
Simo Sorce [Mon, 7 Jun 2010 18:08:05 +0000 (14:08 -0400)]
s3:smbd add utility function to check if there are open pipes
Simo Sorce [Mon, 7 Jun 2010 20:02:14 +0000 (16:02 -0400)]
s3:rpc make num_pipe_handles get an actual pipe as argument
Let the function abstract out how handles are counted
Simo Sorce [Sun, 6 Jun 2010 20:33:28 +0000 (16:33 -0400)]
s3:rpc handles are used by all pipes, use better name
Simo Sorce [Mon, 7 Jun 2010 19:07:38 +0000 (15:07 -0400)]
s3:rpc fix potential out of bound memory access
memcpy copies memory unconditionally, we are passing "" in some cases here.
Use strncpy which will stop reading from src if the null byte is found and
will fill with nulls the destination.
Björn Jacke [Mon, 7 Jun 2010 21:06:28 +0000 (23:06 +0200)]
s3: fix build on platforms without st_blocks and st_blksize stat struct members
This fixes bug 7474.
Matthias Dieter Wallnöfer [Mon, 7 Jun 2010 19:26:33 +0000 (21:26 +0200)]
ldb:pyldb.c - we cannot use "ldb_dn_compare" if both message DNs are NULL in "py_ldb_msg_compare"
Discovered by the testcase.
Matthieu Patou [Fri, 7 May 2010 00:16:11 +0000 (04:16 +0400)]
s4 python: add more unit tests to verify the compare tests
Matthias Dieter Wallnöfer [Mon, 7 Jun 2010 18:46:59 +0000 (20:46 +0200)]
s4:objectclass_attrs LDB module - move the single-valued attribute check into this module
It seems to me more consistent (and also to keep the same behaviour on all
backends).
Also the DRS hack should therefore not be needed anymore since the
"repl_meta_data" module launches requests behind "objectclass_attrs".
Matthias Dieter Wallnöfer [Mon, 7 Jun 2010 18:31:22 +0000 (20:31 +0200)]
s4:rdn_name LDB module - move the "distinguishedName" write prevent check here
In my eyes it fits better here than in the TDB backend code.
Andrew Bartlett [Wed, 2 Jun 2010 12:52:56 +0000 (22:52 +1000)]
s3:auth add hooks to indicate if signing or sealing is desired with NTLMSSP
This allows the right hooks to be called in GENSEC when s3compat
implements the auth_ntlmssp interface. Otherwise, we can't do the
signing or sealing as we have not negoitated it's use.
Andrew Bartlett
Andrew Bartlett [Wed, 2 Jun 2010 12:35:53 +0000 (22:35 +1000)]
s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
It's nicer to have an NTSTATUS return, and in s3compat there may be a
reason other than 'no memory' why this can fail.
Andrew Bartlett
Andrew Bartlett [Thu, 3 Jun 2010 11:05:57 +0000 (21:05 +1000)]
s3:named pipe proxy Improve error messages when named pipes fail to forward
I hope this helps the next person who needs to debug this.
Andrew Bartlett
Andrew Bartlett [Thu, 3 Jun 2010 11:15:33 +0000 (21:15 +1000)]
s3:smbd Give the kerberos session key a parent
I can't see what would free this, so this should prevent a memory leak.
Andrew Bartlett
Andrew Bartlett [Thu, 3 Jun 2010 10:59:25 +0000 (20:59 +1000)]
named_pipe_auth Always lower case the incoming pipe name
Windows connects to an upper case NETLOGON pipe, and we can't find the
socket to connect to until we lower case the name.
Andrew Bartlett
Andrew Bartlett [Tue, 1 Jun 2010 09:19:01 +0000 (19:19 +1000)]
s3:smbd Fix segfault if register_existing_vuid() fails
The register_existing_vuid() call will handle both the ntlmssp_end and
vuid invalidation internally, so we don't want to do it again.
Andrew Bartlett