1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

54126 Commits

Author SHA1 Message Date
Stefan Metzmacher
7a0895b8e8 s3:smbd: split smbd_smb2_read() into tevent_req based *_send()/_recv() functions
metze
2009-06-05 13:00:33 +02:00
Stefan Metzmacher
1b806d83b7 s3:smbd: make smbd_server_connection_terminate() a macro
metze
2009-06-05 11:31:15 +02:00
Stefan Metzmacher
160ead46dc s3:smbd: implement smbd_smb2_request_error/done() as macros on top of the _ex() function
metze
2009-06-05 11:31:03 +02:00
Stefan Metzmacher
96de8766fc s3:smbd: add support for printers to SMB2 Create
This is not tested, but the code looks like the
for SMB1, so it's likely to work:-)

metze
2009-06-05 10:50:17 +02:00
Slava Semushin
ecd1fe2456 source3/torture/vfstest.c(process_file): fixed file descriptor leak.
Found by cppcheck:
[./source3/torture/vfstest.c:400]: (error) Resource leak: file
2009-06-05 10:17:09 +02:00
Volker Lendecke
53f007193f Fix a couple of warnings in log2pcaphex.c 2009-06-05 10:12:11 +02:00
Volker Lendecke
c8d63d47cd Fix bug 6392: Exit log2pcaphex if a requested output file can't be opened
Thanks to Slava Semushin <php-coder@altlinux.org> for reporting!
2009-06-05 10:12:11 +02:00
Andrew Tridgell
fcc7372975 fixed handling of change notify buffer overruns
When the notify buffer overruns and there are no pending notify
requests, the notify buffer doesn't actually get destroyed, it just
gets put in a state where new notifies are discarded and the next
notify change request will return 0 changes.
2009-06-05 16:25:44 +10:00
Andrew Bartlett
e53ee27091 pidl Fix samba4.pidl.typelist test after addition of 'double' 2009-06-05 10:29:46 +10:00
Jelmer Vernooij
b65ba0e26c clikrb5: Prefer krb5_free_keytab_entry_contents to krb5_kt_free_entry.
Both functions exist in MIT Kerberos >= 1.7, but only
krb5_free_keytab_entry_contents has a prototype.
2009-06-04 23:43:31 +02:00
Stefan Metzmacher
7f097368ed s3:smbd: ignore NTCREATEX_OPTIONS_SYNC_ALERT and NTCREATEX_OPTIONS_ASYNC_ALERT for SMB2 Create
This should make the Windows Explorer happier.

metze
2009-06-04 22:41:17 +02:00
Stefan Metzmacher
e545b253d8 s3:smbd: call set_current_service() when a SMB2 tcon will be used
metze
2009-06-04 22:41:17 +02:00
Stefan Metzmacher
427235eb0e s3:smbd: fix potential fsp leak if print_fsp_open() fails
metze
2009-06-04 22:41:16 +02:00
Kai Blin
5e67aa92f6 libwbclient: Attempt to fix build on AIX 2009-06-04 22:32:50 +02:00
Björn Jacke
e1eb48bc6b s3: map NetBSD's errno on posix open calls for symlinks
This is well undocumented but NetBSD returns EFTYPE on O_NOFOLLOW open calls on
symlinks.
2009-06-04 22:09:10 +02:00
Jeremy Allison
73e3c85aba Change smbd_smb2_request_error() to add a __location__.
This allows quick identification of smb2 parsing errors.
Jeremy.
2009-06-04 12:47:17 -07:00
Günther Deschner
930ea7c8a8 nss_wrapper: remove getgrouplist from nwrap_ops table.
Guenther
2009-06-04 21:23:39 +02:00
Günther Deschner
46e2bbd141 gitignore: remove traces of source4/libcli/auth.
This makes it possible clean up a master checkout with git clean -x -f -d and
build samba4 afterwards.

Guenther
2009-06-04 21:18:20 +02:00
Günther Deschner
abbcd574db s4-smbtorture: fix comment in RPC-SAMR-LARGE-DC test.
Andrew, I think you wanted to print this instead.

Guenther
2009-06-04 21:18:14 +02:00
Kai Blin
9f94c40885 nsstest: Relicense header file to LGPLv3+ 2009-06-04 20:15:31 +02:00
Jeremy Allison
e53ca4845e Add NTLMSSP SPNEGO to smb2 auth. Tested with Win7.
Jeremy.
2009-06-04 11:14:20 -07:00
Volker Lendecke
d0aedeb46e Increase tevent version for tevent_req_notify_callback() 2009-06-04 17:50:44 +02:00
Volker Lendecke
c6f39b46a7 Add tevent_req_notify_callback
This is necessary for requests that have multiple results. Examples would be
SMBEcho and ldap_search.
2009-06-04 17:29:48 +02:00
Stefan Metzmacher
9dad0536d6 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
2009-06-04 17:18:12 +02:00
Volker Lendecke
74330085ec Only err on readability if writev_send was explicitly asked to do so
A socket might be readable for other reasons
2009-06-04 12:05:00 +02:00
Günther Deschner
8def5cb352 nss_wrapper: more coherence tests for group membership.
Guenther
2009-06-04 10:30:58 +02:00
Günther Deschner
dc9b705667 nss_wrapper: add coherency tests for get{gr,pw}{nam,id}.
Guenther
2009-06-04 10:30:51 +02:00
Günther Deschner
c49f6b7bc6 nss_wrapper: refactor test_nwrap_membership_user() in testsuite.
Guenther
2009-06-04 10:30:44 +02:00
Günther Deschner
911624567a nss_wrapper: make full talloced copies of struct passwd and group in testsuite.
Guenther
2009-06-04 10:30:36 +02:00
Andrew Bartlett
a12b8571fe 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
2009-06-04 18:12:59 +10:00
Andrew Bartlett
44f762c30d s4:torture assert that we get a Mailslot allocated before we dereference 2009-06-04 15:10:36 +10:00
Andrew Bartlett
4c70a5b405 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
2009-06-04 14:19:17 +10:00
Andrew Tridgell
dfd56dd294 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.
2009-06-04 14:10:11 +10:00
Andrew Tridgell
0849c1ef77 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.
2009-06-04 14:10:11 +10:00
Andrew Tridgell
8ca8dabe46 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.
2009-06-04 14:10:11 +10:00
Andrew Tridgell
da3ee27900 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
2009-06-04 14:10:10 +10:00
Andrew Bartlett
3ce37ae750 Don't run the RPC-SAMR-LARGE-DC test multiple times 2009-06-04 11:22:52 +10:00
Andrew Bartlett
bef665baad 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
2009-06-04 11:13:05 +10:00
Jeremy Allison
0daf9a042c Note that the delaytime for update has changed betweek w2k3 and w2k8.
We must eventually parameterize this.
Jeremy.
2009-06-03 14:12:18 -07:00
Jeremy Allison
b11bf8b7cf 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.
2009-06-03 11:28:52 -07:00
Jeremy Allison
96cc821497 Make the path to this uglyness complete so people can find the guilty party..
Jeremy.
2009-06-03 10:45:44 -07:00
Jeremy Allison
ba4d51c521 Fix bug #2356 - smbclient -t <term code> no longer works.
Removed code and docs.
Jeremy.
2009-06-03 09:44:49 -07:00
Björn Jacke
7cdad30b96 s3: correct check for usleep value boundaries 2009-06-03 18:06:43 +02:00
Stefan Metzmacher
bfd1f5ddc6 s3:smbd: implement SMB2 Write
This only works on file shares.

metze
2009-06-03 17:54:40 +02:00
Stefan Metzmacher
4101f539bf s3:smbd: implement SMB2 Read
This only works works on file shares.

metze
2009-06-03 17:54:40 +02:00
Stefan Metzmacher
0ccef51cbe s3:smbd: implement SMB2 Flush
This works only on file shares yet.

metze
2009-06-03 17:54:40 +02:00
Stefan Metzmacher
ec0553bb6e s3:smbd: implement SMB2 Close
metze
2009-06-03 17:54:40 +02:00
Stefan Metzmacher
261c59e3a1 s3:smbd: implement a simple version of SMB2 Create
It only work on file shares and
just ignores any additional Create Context Values.

metze
2009-06-03 17:54:39 +02:00
Stefan Metzmacher
cfc8d4a1f4 s3:smbd: add smbd_smb2_fake_smb_request()
metze
2009-06-03 17:54:39 +02:00
Stefan Metzmacher
4b14ebb91d s3:smbd: return more details in the SMB2 Tree Connect response
metze
2009-06-03 17:54:39 +02:00