Günther Deschner [Thu, 4 Jun 2009 19:14:25 +0000 (21:14 +0200)]
s4-smbtorture: fix comment in RPC-SAMR-LARGE-DC test.
Andrew, I think you wanted to print this instead.
Guenther
Kai Blin [Thu, 4 Jun 2009 18:14:28 +0000 (20:14 +0200)]
nsstest: Relicense header file to LGPLv3+
Jeremy Allison [Thu, 4 Jun 2009 18:14:20 +0000 (11:14 -0700)]
Add NTLMSSP SPNEGO to smb2 auth. Tested with Win7.
Jeremy.
Volker Lendecke [Thu, 4 Jun 2009 15:48:17 +0000 (17:48 +0200)]
Increase tevent version for tevent_req_notify_callback()
Volker Lendecke [Thu, 4 Jun 2009 15:26:23 +0000 (17:26 +0200)]
Add tevent_req_notify_callback
This is necessary for requests that have multiple results. Examples would be
SMBEcho and ldap_search.
Stefan Metzmacher [Thu, 4 Jun 2009 15:12:40 +0000 (17:12 +0200)]
nss_wrapper: call the nwrap_files_*() from nwrap_files_*_r()
We should not call the public functions, as this could lead
to a recursive loop when we have multiple nwrap backends
in future.
This also fixes the build if --enable-nss-wrapper was not
given to ./configure.
metze
Volker Lendecke [Thu, 4 Jun 2009 10:02:38 +0000 (12:02 +0200)]
Only err on readability if writev_send was explicitly asked to do so
A socket might be readable for other reasons
Günther Deschner [Wed, 3 Jun 2009 19:09:52 +0000 (21:09 +0200)]
nss_wrapper: more coherence tests for group membership.
Guenther
Günther Deschner [Wed, 3 Jun 2009 12:31:20 +0000 (14:31 +0200)]
nss_wrapper: add coherency tests for get{gr,pw}{nam,id}.
Guenther
Günther Deschner [Tue, 2 Jun 2009 10:24:43 +0000 (12:24 +0200)]
nss_wrapper: refactor test_nwrap_membership_user() in testsuite.
Guenther
Günther Deschner [Tue, 2 Jun 2009 10:20:54 +0000 (12:20 +0200)]
nss_wrapper: make full talloced copies of struct passwd and group in testsuite.
Guenther
Andrew Bartlett [Thu, 4 Jun 2009 08:12:59 +0000 (18:12 +1000)]
s4:torture Cut the RPC-SAMR-LARGE-DC test down to size
This removes the validation of the estimated number of accounts,
because MS-SAMR 3.1.5.5.1.1 makes clear the number returned cannot be
relied apon.
I've also converted a bit more of the test to use torture_assert(),
and where that is impractical, to print error messages when things
fail.
Andrew Bartlett
Andrew Bartlett [Thu, 4 Jun 2009 05:10:36 +0000 (15:10 +1000)]
s4:torture assert that we get a Mailslot allocated before we dereference
Andrew Bartlett [Thu, 4 Jun 2009 04:14:14 +0000 (14:14 +1000)]
socket_wrapper Cope with SOCK_CLOEXEC and SOCK_NONBLOCK flags
Heimdal will, on supporting systems, set these flags in the type
argument of socket(), causing breakage when combined with
socket_wrapper.
For background on these flags, see http://lwn.net/Articles/281965/
Andrew Bartlett
Andrew Tridgell [Thu, 4 Jun 2009 04:07:35 +0000 (14:07 +1000)]
changed the auth path to use extended DN ops to avoid non-indexed searches
Logs showed that every SAM authentication was causing a non-indexed
ldb search for member=XXX. This was previously indexed in Samba4, but
since we switched to using the indexes from the full AD schema it now
isn't.
The fix is to use the extended DN operations to allow us to ask the
server for the memberOf attribute instead, with with the SIDs attached
to the result. This also means one less search on every
authentication.
The patch is made more complex by the fact that some common routines
use the result of these user searches, so we had to update all
searches that uses user_attrs and those common routines to make sure
they all returned a ldb_message with a memberOf filled in and the SIDs
attached.
Andrew Tridgell [Thu, 4 Jun 2009 03:52:40 +0000 (13:52 +1000)]
fixed ldb rename now that we have unique indexes
With unique indexes, any rename of a record that has an attribute that
is uniquely indexed needs to be done as a delete followed by an add,
otherwse you'll get an error that the attribute value already exists.
Andrew Tridgell [Tue, 2 Jun 2009 07:27:37 +0000 (17:27 +1000)]
add gendb_search_single_extended_dn()
This function searches for a single record using a given filter,
adding the extended-dn control so that any returned DNs will have the
GUID and SID fields returned. This will be used in the sam auth code
to prevent us doing a member= search for the groups, which invokes an
unindexed search.
Andrew Tridgell [Tue, 2 Jun 2009 07:25:47 +0000 (17:25 +1000)]
add NT_STATUS_HAVE_NO_MEMORY_AND_FREE()
In many places we use NT_STATUS_HAVE_NO_MEMORY() to auto-return when a
memory allocation fails. In quite a few places where we use this, we
end up leaving a tmp_ctx behind, which creates a memory leak.
This macro takes a memory context to free when returning the error
Andrew Bartlett [Tue, 2 Jun 2009 02:09:05 +0000 (12:09 +1000)]
Don't run the RPC-SAMR-LARGE-DC test multiple times
Andrew Bartlett [Thu, 4 Jun 2009 01:13:05 +0000 (11:13 +1000)]
s4:torture Make Samba4 build on hosts with an older libnetapi
For example, Samba4 would not build (for the last week) on Fedora 10,
with samba-common 3.2.11 installed.
Andrew Bartlett
Jeremy Allison [Wed, 3 Jun 2009 21:12:18 +0000 (14:12 -0700)]
Note that the delaytime for update has changed betweek w2k3 and w2k8.
We must eventually parameterize this.
Jeremy.
Jeremy Allison [Wed, 3 Jun 2009 18:28:52 +0000 (11:28 -0700)]
Fix S3 "make install". Don't build cifs.upcall.c in S4 as there are no
checks to see if the required include file is available.
Jeremy.
Jeremy Allison [Wed, 3 Jun 2009 17:45:44 +0000 (10:45 -0700)]
Make the path to this uglyness complete so people can find the guilty party..
Jeremy.
Jeremy Allison [Wed, 3 Jun 2009 16:44:49 +0000 (09:44 -0700)]
Fix bug #2356 - smbclient -t <term code> no longer works.
Removed code and docs.
Jeremy.
Björn Jacke [Wed, 3 Jun 2009 16:03:36 +0000 (18:03 +0200)]
s3: correct check for usleep value boundaries
Stefan Metzmacher [Wed, 27 May 2009 23:28:34 +0000 (01:28 +0200)]
s3:smbd: implement SMB2 Write
This only works on file shares.
metze
Stefan Metzmacher [Tue, 2 Jun 2009 10:38:37 +0000 (12:38 +0200)]
s3:smbd: implement SMB2 Read
This only works works on file shares.
metze
Stefan Metzmacher [Tue, 2 Jun 2009 10:06:34 +0000 (12:06 +0200)]
s3:smbd: implement SMB2 Flush
This works only on file shares yet.
metze
Stefan Metzmacher [Tue, 2 Jun 2009 11:42:28 +0000 (13:42 +0200)]
s3:smbd: implement SMB2 Close
metze
Stefan Metzmacher [Wed, 27 May 2009 22:07:26 +0000 (00:07 +0200)]
s3:smbd: implement a simple version of SMB2 Create
It only work on file shares and
just ignores any additional Create Context Values.
metze
Stefan Metzmacher [Tue, 2 Jun 2009 09:54:00 +0000 (11:54 +0200)]
s3:smbd: add smbd_smb2_fake_smb_request()
metze
Stefan Metzmacher [Wed, 3 Jun 2009 09:31:43 +0000 (11:31 +0200)]
s3:smbd: return more details in the SMB2 Tree Connect response
metze
Stefan Metzmacher [Wed, 27 May 2009 16:40:42 +0000 (18:40 +0200)]
s3:smbd: create a connection_struct in SMB2 Tree Connect
metze
Stefan Metzmacher [Wed, 27 May 2009 16:33:45 +0000 (18:33 +0200)]
s3:smbd: create a user_struct for compat in SMB2 Session Setup
metze
Stefan Metzmacher [Wed, 27 May 2009 16:28:56 +0000 (18:28 +0200)]
s3:smbd: add a lazy mode for conn_new() and conn_free() for SMB2
metze
Stefan Metzmacher [Wed, 27 May 2009 16:26:15 +0000 (18:26 +0200)]
s3:smbd: make make_connection_snum() non static
metze
Stefan Metzmacher [Wed, 27 May 2009 09:15:44 +0000 (11:15 +0200)]
s3:smbd: move tcon specific globals to struct smbd_server_connection
metze
Stefan Metzmacher [Tue, 26 May 2009 14:38:45 +0000 (16:38 +0200)]
s3:smbd: move more session specific globals to struct smbd_server_connection
metze
Stefan Metzmacher [Tue, 26 May 2009 13:21:16 +0000 (15:21 +0200)]
s3:smbd: move some session specific globals to struct smbd_server_connection
metze
Stefan Metzmacher [Tue, 26 May 2009 13:20:36 +0000 (15:20 +0200)]
s3:smbd: move already_got_session to struct smbd_server_connection
metze
Stefan Metzmacher [Tue, 26 May 2009 12:56:08 +0000 (14:56 +0200)]
s3:smbd: move max_recv to struct smbd_server_connection
metze
Stefan Metzmacher [Tue, 26 May 2009 10:48:58 +0000 (12:48 +0200)]
s3:smbd: move negprot related globals to struct smbd_server_connection
metze
Stefan Metzmacher [Tue, 26 May 2009 10:07:16 +0000 (12:07 +0200)]
s3:smbd: move pending_auth_data list to struct smbd_server_connection
metze
Björn Jacke [Wed, 3 Jun 2009 15:39:50 +0000 (17:39 +0200)]
s3:torture: fix password timestamp checks on NetBSD
The Open Group says:
"The useconds argument [of usleep] must be less than 1,000,000."
NetBSD takes this seriously. usleep of more than 999999 are effectless.
Jelmer Vernooij [Wed, 3 Jun 2009 15:16:56 +0000 (17:16 +0200)]
selftest: Add script that can take a subunit stream and format it.
Jelmer Vernooij [Wed, 3 Jun 2009 15:16:25 +0000 (17:16 +0200)]
selftest/plain: Allow caller to not specify the number of expected
testsuites to run.
Jelmer Vernooij [Wed, 3 Jun 2009 14:22:20 +0000 (16:22 +0200)]
selftest: Run tests for Samba4 target in the samba 4 testsuite.
Jelmer Vernooij [Wed, 3 Jun 2009 14:09:16 +0000 (16:09 +0200)]
selftest: Fix target/Samba4 tests.
Jelmer Vernooij [Wed, 3 Jun 2009 14:07:06 +0000 (16:07 +0200)]
Remove empty unit test.
Jelmer Vernooij [Thu, 21 May 2009 15:21:41 +0000 (17:21 +0200)]
selftest/README: Fix formatting.
Jelmer Vernooij [Wed, 13 May 2009 18:10:57 +0000 (20:10 +0200)]
selftest: Factor generic functionality for buildfarm output into a
separate perl module.
Jelmer Vernooij [Wed, 13 May 2009 17:57:58 +0000 (19:57 +0200)]
Support reporting current time in selftest output.
Jelmer Vernooij [Wed, 13 May 2009 17:42:41 +0000 (19:42 +0200)]
selftest: Add subunit output format.
Jelmer Vernooij [Wed, 13 May 2009 16:48:44 +0000 (18:48 +0200)]
Rename harness2subunit.pl -> tap2subunit to be consistent with the
subunit tools.
Jelmer Vernooij [Wed, 13 May 2009 16:20:34 +0000 (18:20 +0200)]
README: Fix indentation of bullet point.
README.Coding: Use consistent header.
Jelmer Vernooij [Wed, 3 Jun 2009 00:16:57 +0000 (02:16 +0200)]
Move findstatic.pl script to top-level.
Stefan Metzmacher [Wed, 3 Jun 2009 12:11:37 +0000 (14:11 +0200)]
s4:torture/libnetapi: fix netapi detection
We need to set SMB_ENABLE(TORTURE_LIBNETAPI,NO) first
to overwrite the default of YES for MODULES and
then only set it to YES if netapi was found.
metze
Stefan Metzmacher [Tue, 2 Jun 2009 09:54:31 +0000 (11:54 +0200)]
s3:smbd: remove old comment, we support SMB2 signing now
metze
Stefan Metzmacher [Wed, 27 May 2009 15:48:23 +0000 (17:48 +0200)]
s3:smbd: allow SMB2 only if we don't use security = share
metze
Stefan Metzmacher [Wed, 3 Jun 2009 08:49:44 +0000 (10:49 +0200)]
SMB2-CONNECT: make it possible to specific the max write size via --option=torture:smb2maxwrite=12345
metze
Jelmer Vernooij [Tue, 2 Jun 2009 21:07:59 +0000 (23:07 +0200)]
Move mount.cifs/umount.cifs to the top level and remove the outdated copy
in Samba 4.
Volker Lendecke [Thu, 28 May 2009 22:20:10 +0000 (00:20 +0200)]
Support getting gpfs birthtime
Jelmer Vernooij [Tue, 2 Jun 2009 13:00:41 +0000 (15:00 +0200)]
Fix unresolved symbol in python messaging module.
Jelmer Vernooij [Tue, 2 Jun 2009 11:57:08 +0000 (13:57 +0200)]
Fix pythonpath so subunit can be found.
Brad Hards [Mon, 1 Jun 2009 14:26:43 +0000 (16:26 +0200)]
Add support for double type in pidl.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Thu, 23 Apr 2009 09:23:06 +0000 (11:23 +0200)]
Fix finding the LDB header files in the system in pyldb_util.
Jelmer Vernooij [Thu, 23 Apr 2009 09:22:07 +0000 (11:22 +0200)]
Build modules statically by default, as there still seem to be a lot of
issues with those even if shared libs work.
Jelmer Vernooij [Wed, 22 Apr 2009 23:21:47 +0000 (01:21 +0200)]
Fix more unresolved symbols.
Jelmer Vernooij [Wed, 22 Apr 2009 23:20:20 +0000 (01:20 +0200)]
python: Move helper functions for using param into a separate file rather
than linking against the python module.
Jelmer Vernooij [Mon, 20 Apr 2009 16:14:17 +0000 (18:14 +0200)]
Split up Python code a little bit so we don't hav eto link python modules
to each other.
Jelmer Vernooij [Mon, 20 Apr 2009 11:47:31 +0000 (13:47 +0200)]
Build libsamba-util as a shared library.
Jelmer Vernooij [Mon, 20 Apr 2009 10:28:02 +0000 (12:28 +0200)]
Fix dependencies when using shared libraries.
Mathias Dietz [Wed, 27 May 2009 10:03:12 +0000 (12:03 +0200)]
Store winattrs in GPFS
1. Store win attributes in gpfs instead of posix bits.
2. use of path based winattr calls of gpfs.
Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
Günther Deschner [Tue, 2 Jun 2009 12:52:53 +0000 (14:52 +0200)]
nss_wrapper: prefix function pointer names in struct nwrap_ops.
Guenther
Günther Deschner [Tue, 2 Jun 2009 10:18:59 +0000 (12:18 +0200)]
torture: minor fixes to torture macro text output.
Guenther
Günther Deschner [Sun, 31 May 2009 00:20:29 +0000 (02:20 +0200)]
nss_wrapper: resort calls to move public calls to the end.
Guenther
Günther Deschner [Sat, 30 May 2009 23:01:13 +0000 (01:01 +0200)]
nss_wrapper: add nwrap_ops function pointer table.
Guenther
Günther Deschner [Sat, 30 May 2009 22:54:56 +0000 (00:54 +0200)]
nss_wrapper: make sure to return after calling real_{set,end}{gr,pw}ent.
Guenther
Günther Deschner [Sat, 30 May 2009 22:50:42 +0000 (00:50 +0200)]
nss_wrapper: fix typo while checking for getgrid_r support.
Metze, this has been in here for a long time, please check.
Guenther
Volker Lendecke [Mon, 2 Feb 2009 10:52:08 +0000 (11:52 +0100)]
Add a "connectpath" operation to the shadow_copy2 module
Volker Lendecke [Thu, 28 May 2009 17:20:14 +0000 (19:20 +0200)]
Add SMB_VFS_CONNECTPATH operation
This is required for the shadow_copy2 module and "wide links = no". The file
system snapshots by nature are typically outside of share directory. So the
REALPATH result fails the wide links = no test.
Volker Lendecke [Fri, 30 Jan 2009 14:04:44 +0000 (15:04 +0100)]
Remove a variable used just once
Jeremy Allison [Mon, 1 Jun 2009 21:36:34 +0000 (14:36 -0700)]
Fix bug #6419 - smbclient -L 127.0.0.1" displays "netbios name" instead of "workgroup"
Unify the handling of the sessionsetup parsing so we don't get different
results when parsing a guest reply than an ntlmssp reply.
Jeremy.
Andrew Tridgell [Mon, 1 Jun 2009 12:04:00 +0000 (22:04 +1000)]
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Andrew Tridgell [Mon, 1 Jun 2009 12:03:20 +0000 (22:03 +1000)]
use the unique flag on ldb attributes to optimise & clauses
When a attribute is marked unique we know that if we find a match
it will be the only possible match. This means that in a list of
subtrees connected by an &, it is best to first load the index values
for the unique entries, as if they find something then we know we
won't have to look any further.
This helps with searches like this:
(&(objectclass=user)(samaccountname=tridge))
the old code would first have loaded the very large index for the
objectclass=user attribute, and then loaded the single entry for
samaccountname=tridge. Now we load the samaccountname=tridge entry
first, notice that it gives us a single result, and stop, thereby
skipping the load of the objectclass=user index record completely.
Andrew Kroeger [Mon, 1 Jun 2009 09:36:50 +0000 (04:36 -0500)]
s4:mkproto: Add NET_API_STATUS return type.
The recently added LIBNETAPI torture tests use NET_API_STATUS as a return type
for some functions. The torture/libnetapi/proto.h private header that was being
generated by mkproto.pl did not include a prototype for the test_netuseradd()
function, as it did not know how to handle the NET_API_STATUS return type.
Andrew Kroeger [Mon, 1 Jun 2009 00:36:55 +0000 (19:36 -0500)]
gitignore: Ignore additional auto-generated file
Andrew Tridgell [Mon, 1 Jun 2009 06:37:28 +0000 (16:37 +1000)]
we don't need the unique checks in the samldb code now
These attributes now use the unique indexing flag
Andrew Tridgell [Mon, 1 Jun 2009 06:36:56 +0000 (16:36 +1000)]
mark samAccountName, objectGUID and objectSID as unique indexed
Andrew Tridgell [Mon, 1 Jun 2009 06:36:21 +0000 (16:36 +1000)]
added support for unique indexing in ldb
When a attribute is marked as LDB_ATTR_FLAG_UNIQUE_INDEX then attempts
to add a 2nd record that has the same attribute value for this
attribute as another record will fail.
This provides a much more efficient mechanism for ensuring that
attributes like objectGUID are unique
Andrew Tridgell [Mon, 1 Jun 2009 03:42:51 +0000 (13:42 +1000)]
fix uninitialised use of samctx
Andrew Tridgell [Mon, 1 Jun 2009 03:13:07 +0000 (13:13 +1000)]
overallocate all records by 25%
This greatly reduces the fragmentation of databases where records
tend to grow slowly by a small amount each time. The case where this
is most seen is the ldb index records. Adding this overallocation
reduced the size of the resulting database by more than 20x when
running a test that adds 10k users.
Andrew Tridgell [Mon, 1 Jun 2009 03:11:39 +0000 (13:11 +1000)]
auto-repack in transactions that expand the tdb
The idea behind this is to recover from badly fragmented free
lists. Choosing the point where the file expands is fairly arbitrary,
but seems to work well.
Andrew Tridgell [Mon, 1 Jun 2009 02:58:48 +0000 (12:58 +1000)]
when comp_num is zero, the case folded DN is always ""
This fixes a bug where we would look at an uninitialised
dn->linearized
Andrew Tridgell [Mon, 1 Jun 2009 00:39:30 +0000 (10:39 +1000)]
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Volker Lendecke [Sun, 31 May 2009 09:14:06 +0000 (11:14 +0200)]
Fix some nonempty blank lines
Volker Lendecke [Sun, 31 May 2009 09:06:23 +0000 (11:06 +0200)]
Fix a C++ warning
Günther Deschner [Sat, 30 May 2009 20:43:17 +0000 (22:43 +0200)]
nss_wrapper: try to fix the build of nss_wrapper on solaris.
Guenther
Jeremy Allison [Sat, 30 May 2009 20:28:03 +0000 (13:28 -0700)]
Fix bug #6421 - POSIX read-only open fails on read-only shares.
The change to smbd/trans2.c opens up
SETFILEINFO calls to POSIX_OPEN only. The change to first smbd/open.c closes 2
holes that would have been exposed by allowing POSIX_OPENS on readonly shares,
and their ability to set arbitrary flags permutations. The O_CREAT ->
O_CREAT|O_EXCL change removes an illegal combination (O_EXCL without O_CREAT)
that previously was being passed down to the open syscall.
Jeremy.
Volker Lendecke [Sat, 30 May 2009 16:24:14 +0000 (18:24 +0200)]
Move a comment where it belongs