1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

38410 Commits

Author SHA1 Message Date
Stefan Metzmacher
7c405fd92c s3:libsmb: make use of cli_state_max_requests() in cli_push_send()
metze
2011-09-13 18:12:23 +02:00
Stefan Metzmacher
c5072534bc s3:libsmb: make use of cli_state_max_requests() in cli_pull_send()
metze
2011-09-13 18:12:23 +02:00
Stefan Metzmacher
dafeef47b4 s3:libsmb: add cli_state_max_requests()
metze
2011-09-13 18:12:23 +02:00
Stefan Metzmacher
38206f16bd s3:libsmb: make sure cli->max_mux is valid in the return of the server
metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
90d95f34f3 s3:libsmb: set the MID to 0 in cli_setup_packet_buf()
It's allocated when sending the request.

metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
53c0f001f2 s3:libsmb: check that max_xmit is not less than 1024
metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
09547b24ff s3:libsmb: better expect a max_xmit of 1024 instead of 0xFFFF for the CORE protocol
metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
eaccea9e29 s3:torture: there's no need to alter cli->max_xmit in order to test large writes
metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
80d2c2b00d s3:libsmb: don't mix smb2 share capabilities with smb1 capabilities
metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
b7a1fd95a6 s3:libsmb: the smb2 server capabilities from the session setup are 32-bit
metze
2011-09-13 18:12:22 +02:00
Stefan Metzmacher
924b2d5b7f s3:torture: use CLI_BUFFER_SIZE instead of cli->max_xmit
The max_data parameter of trans2/nttrans calls are not bound
to cli->max_xmit. Even with cli->max_xmit, which means the max
size of the whole SMB pdu, we would get fragmented trans2/nttrans
replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 13 14:52:35 CEST 2011 on sn-devel-104
2011-09-13 14:52:35 +02:00
Stefan Metzmacher
a4548efe67 s3:libsmb: make use of cli_state_available_size() in cli_smbwrite()
metze
2011-09-13 13:16:09 +02:00
Stefan Metzmacher
96fc0d6018 s3:libsmb: make use of cli_state_available_size() in cli_write_max_bufsize()
metze
2011-09-13 13:16:09 +02:00
Stefan Metzmacher
c887e37275 s3:libsmb: make use of cli_state_available_size() in cli_read_max_bufsize()
metze
2011-09-13 13:16:09 +02:00
Stefan Metzmacher
a15fd83767 s3:libsmb: make use of cli_state_available_size() in cli_list_old_send()
metze
2011-09-13 13:16:08 +02:00
Stefan Metzmacher
76c1164406 s3:libsmb: make use of cli_state_available_size() in cli_sesssetup_blob_send()
metze
2011-09-13 13:16:08 +02:00
Stefan Metzmacher
afda15aa86 s3:libsmb: make use of cli_state_available_size() in cli_trans_format()
metze
2011-09-13 13:16:08 +02:00
Stefan Metzmacher
2a5f8daa3e s3:libsmb: add cli_state_available_size()
metze
2011-09-13 13:16:07 +02:00
Stefan Metzmacher
58482494fd s3:clitar: remove unused/not existing extern variables
metze
2011-09-13 13:16:07 +02:00
Volker Lendecke
e63d0c5f0c s3: Fix Coverity ID 2613 -- UNINIT
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Sep 13 12:39:10 CEST 2011 on sn-devel-104
2011-09-13 12:39:10 +02:00
Volker Lendecke
67605bfc55 s3: Fix Coverity ID 2614 -- UNINIT 2011-09-13 11:00:15 +02:00
Volker Lendecke
ad85bd8003 s3: Make saf_join_key() use talloc 2011-09-13 11:00:14 +02:00
Volker Lendecke
0e5a876aa7 s3: Make saf_key() use talloc 2011-09-13 11:00:14 +02:00
Volker Lendecke
f55f4b8ce5 s3: Disentangle resolve_name() a bit 2011-09-13 11:00:13 +02:00
Volker Lendecke
6344482f00 s3: Remove a reference to smbd_server_conn 2011-09-13 11:00:13 +02:00
Volker Lendecke
3e8a8d08e3 s3: Remove a reference to smbd_server_conn 2011-09-13 11:00:13 +02:00
Volker Lendecke
d911bd5c69 s3: Remove a reference to smbd_server_conn 2011-09-13 11:00:13 +02:00
Volker Lendecke
d08885b0c4 s3: Remove a reference to smbd_server_conn 2011-09-13 11:00:12 +02:00
Volker Lendecke
2b32918117 s3: Remove a reference to smbd_server_conn 2011-09-13 11:00:12 +02:00
Volker Lendecke
f6fa51ddf7 s3: Fix some nonempty blank lines 2011-09-13 11:00:12 +02:00
Andrew Bartlett
85598e6850 s3-selftest use a more portable shell syntax
"$10" evaulates to $1 and 0, not the 10th argument.

Thanks to Amitay for pointing this out!

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 13 09:34:49 CEST 2011 on sn-devel-104
2011-09-13 09:34:49 +02:00
Jeremy Allison
fad5e3be5e Move the talloc_move call until *after* the check on status. Don't want to move something that might be invalid.
Makes the code match what is currently in 3.6.x.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Sep 12 22:21:24 CEST 2011 on sn-devel-104
2011-09-12 22:21:24 +02:00
Stefan Metzmacher
85332eb1c7 s3:libsmb: check the wct of the incoming SMBnegprot responses
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep 12 20:50:27 CEST 2011 on sn-devel-104
2011-09-12 20:50:27 +02:00
Stefan Metzmacher
1dc3ac242a s3:libsmb: let cli_pull_raw_error() return NT_STATUS_OK as DOS-Error success
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep 12 19:12:21 CEST 2011 on sn-devel-104
2011-09-12 19:12:21 +02:00
Sumit Bose
81b965af89 s3-auth: fix uninitialized server_info
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Sep 12 17:44:46 CEST 2011 on sn-devel-104
2011-09-12 17:44:46 +02:00
Sumit Bose
456aee80f5 s3-lsa: Add conversion for auth info structs
struct lsa_TrustDomainInfoAuthInfo and struct
trustAuthInOutBlob can store the same information for different usage. The added
routines can convert one struct into the other.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Sep 12 15:52:17 CEST 2011 on sn-devel-104
2011-09-12 15:52:17 +02:00
Andrew Bartlett
28ad50e5fd s3-selftest: Set path to bin/net and bin/wbinfo in command line to test scripts
This makes it easier to reproduce these tests outside the test
environment, as we rely less on environment variables.

Andrew Bartlett
2011-09-12 20:42:22 +10:00
Andrew Bartlett
fc6bb5d47a lib/util/charset: add back loading of charset modules
For autoconf builds these remain as modules, for waf builds they are
built into the charset library.

This is required to provide the CP850 charset when iconv is not available.

The charset modules static for the waf builds because with proper
shared libs, there isn't the same need for these to be in seperate .so
files.  The modules are also not produced if a system iconv is found,
except for developers, to allow testing of both code paths.

Andrew Bartlett
2011-09-10 14:18:06 +02:00
Stefan Metzmacher
258ffddf1c libcli/smb: s/FLAGS2_UNKNOWN_BIT4/FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Sep 10 00:34:50 CEST 2011 on sn-devel-104
2011-09-10 00:34:50 +02:00
Andreas Schneider
a9dc2c81ad s3-spoolss: Fix bug #8351 forms migration.
Don't fail if the form already exists (or is builtin now).

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Sep  9 03:21:42 CEST 2011 on sn-devel-104
2011-09-09 03:21:42 +02:00
Jeremy Allison
e30b8c72de Second part of fix for bug #8443 - Default user entry is set to minimal permissions on incoming ACL change with no user specified.
Be smarter about setting default permissions when a ACL_USER_OBJ isn't given. Use the principle of least surprises for the user.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Sep  9 00:26:08 CEST 2011 on sn-devel-104
2011-09-09 00:26:08 +02:00
Jeremy Allison
793bd527fd First part of fix for bug #8443 - Default user entry is set to minimal permissions on incoming ACL change with no user specified.
create_default_mode() is not needed - it's taken care of by code
inside ensure_canon_entry_valid().
2011-09-08 13:54:04 -07:00
Jeremy Allison
3131948eab Fix bug #8203 - winbindd needs to reset the DC connection if an RPC times out.
Based on Volker's original code.
(cherry picked from commit 5b5ef7f20d)

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep  8 21:29:53 CEST 2011 on sn-devel-104
2011-09-08 21:29:53 +02:00
Stefan Metzmacher
fe11e9b2c6 s3:torture: make use of CLI_FULL_CONNECTION_DONT_SPNEGO
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep  8 19:23:32 CEST 2011 on sn-devel-104
2011-09-08 19:23:32 +02:00
Stefan Metzmacher
173e323cd9 s3:torture: make use of CLI_FULL_CONNECTION_FORCE_DOS_ERRORS
metze
2011-09-08 17:51:30 +02:00
Stefan Metzmacher
a7e418dd45 s3:libsmb: add CLI_FULL_CONNECTION_FORCE_ASCII
metze
2011-09-08 17:51:30 +02:00
Stefan Metzmacher
db79aa7260 s3:libsmb: add CLI_FULL_CONNECTION_FORCE_DOS_ERRORS
metze
2011-09-08 17:51:29 +02:00
Stefan Metzmacher
189266d8ee s3:libsmb: don't handle CLI_FULL_CONNECTION_* flags in cli_full_connection()
This is already done by cli_state_create().

metze
2011-09-08 17:51:29 +02:00
Stefan Metzmacher
39ffa0b789 s3:libsmb: don't handle CLI_FULL_CONNECTION_* flags in cli_start_connection()
This is already done by cli_state_create().

metze
2011-09-08 17:51:29 +02:00
Andrew Tridgell
0ba52e97bf s3-loadparm: fixed re-application of cmdline parametric options
this ensures that cmdline parametric options are re-applied when we
reload smb.conf

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 15:09:54 +02:00
Andrew Tridgell
e16f004dc0 s3-loadparm: fixed a memory leak in parametric options
before we memset the Globals structure we need to free any global
parametrics

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 15:09:54 +02:00
Volker Lendecke
ab2ca882e1 s3: Fix a debug message
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Sep  8 15:08:43 CEST 2011 on sn-devel-104
2011-09-08 15:08:43 +02:00
Volker Lendecke
12f0624a85 s3: Fix a typo 2011-09-08 13:38:27 +02:00
Andrew Bartlett
3346af1675 build: netapi does not depend on TOKEN_UTIL
This means we avoid dupliate symbols between libgpo and netapi.

Andrew Bartlett
2011-09-08 19:33:13 +10:00
Stefan Metzmacher
3e227d8544 s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep  8 10:21:50 CEST 2011 on sn-devel-104
2011-09-08 10:21:50 +02:00
Stefan Metzmacher
cdca1e0ac3 s3:libsmb: pass CLI_FULL_CONNECTION_* flags to cli_state_create()
metze
2011-09-08 08:51:48 +02:00
Jeremy Allison
de710cee37 Revert "Part 4 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid argument)"
This belongs as part of the bugfix for bug #8443 - Default user entry is set to minimal permissions on incoming ACL change with no user specified.

Not as part of #7509.

This reverts commit 2a1453e231.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep  8 08:50:12 CEST 2011 on sn-devel-104
2011-09-08 08:50:12 +02:00
Jeremy Allison
0aa6751e91 Tidy up previous patch for bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.
aceType is an enum field, not a bitmask.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep  8 03:34:39 CEST 2011 on sn-devel-104
2011-09-08 03:34:39 +02:00
Ira Cooper
600451da33 Fix bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.
Thanks to Youzhong Yang for discovering this issue.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep  7 22:56:06 CEST 2011 on sn-devel-104
2011-09-07 22:56:06 +02:00
Michael Adam
8745c70dfa s3:winbind: put winbindd_cache into the state dir, not the cache dir
Despite the name, in winbind offline logon mode, this is a database
that contains valuable information and should not be cleared.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Sep  7 21:17:37 CEST 2011 on sn-devel-104
2011-09-07 21:17:37 +02:00
Gregor Beck
350d8e56db s3:dbwrap_ctdb: improve error message in transaction destructor
Signed-off-by: Michael Adam <obnox@samba.org>
2011-09-07 19:50:05 +02:00
Gregor Beck
9c0252446f s3: let g_lock_unlock() return more specific status codes on failure
Signed-off-by: Michael Adam <obnox@samba.org>
2011-09-07 19:50:05 +02:00
Volker Lendecke
14876e65ea s3: Fix Coverity ID 2611, UNINIT
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Sep  7 19:47:49 CEST 2011 on sn-devel-104
2011-09-07 19:47:49 +02:00
Volker Lendecke
74cdddea1b s3: Fix Coverity ID 2612, UNINIT 2011-09-07 18:20:22 +02:00
Stefan Metzmacher
9005e0f7b3 s3:smb2cli: let smb2cli_req_create() use the give pid, uid and tid values
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep  7 18:19:43 CEST 2011 on sn-devel-104
2011-09-07 18:19:43 +02:00
Stefan Metzmacher
2ec0634f28 s3:smb2cli: pass the uid to the SMB2_SESSION_SETUP to support multi-leg-auth
metze
2011-09-07 16:48:46 +02:00
Christian Ambach
0aa558718a s3:idmap/autorid add a small alloc pool to autorid
this is needed to allocate gids for BUILTIN\Users and
BUILTIN\Administrators

gids are stored at the start of the first domain
as RIDs start with values over 500, we have some room there
so we do not need to allocate a range

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed Sep  7 15:15:09 CEST 2011 on sn-devel-104
2011-09-07 15:15:09 +02:00
Amitay Isaacs
78c2eca811 build: Replace mkbuildoptions-waf awk script with waf target 2011-09-07 12:16:40 +02:00
Stefan Metzmacher
9bc4decc1c s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_FIND/QUERY_DIRECTORY
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep  7 12:15:51 CEST 2011 on sn-devel-104
2011-09-07 12:15:51 +02:00
Stefan Metzmacher
1bc93c2605 s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_CREATE
metze
2011-09-07 10:38:08 +02:00
Stefan Metzmacher
68b33aa61a s3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCON
metze
2011-09-07 10:38:08 +02:00
Stefan Metzmacher
1a726b88ec s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_write.c
metze
2011-09-07 10:38:08 +02:00
Stefan Metzmacher
3643a05ba6 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_setinfo.c
metze
2011-09-07 10:38:07 +02:00
Stefan Metzmacher
f3a8d65bdf s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_read.c
metze
2011-09-07 10:38:07 +02:00
Stefan Metzmacher
c6480366e5 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_notify.c
metze
2011-09-07 10:38:07 +02:00
Stefan Metzmacher
a358eee2d8 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_lock.c
metze
2011-09-07 10:38:06 +02:00
Stefan Metzmacher
22d479f757 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_keepalive.c
metze
2011-09-07 10:38:06 +02:00
Stefan Metzmacher
29b3601c02 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_ioctl.c
metze
2011-09-07 10:38:06 +02:00
Stefan Metzmacher
880eafd7e8 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_getinfo.c
metze
2011-09-07 10:38:05 +02:00
Stefan Metzmacher
440f702aa9 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_flush.c
metze
2011-09-07 10:38:05 +02:00
Stefan Metzmacher
bc95ab99dc s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_find.c
metze
2011-09-07 10:38:05 +02:00
Stefan Metzmacher
251815bfd3 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_create.c
metze
2011-09-07 10:38:04 +02:00
Stefan Metzmacher
e09b3940a7 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_close.c
metze
2011-09-07 10:38:04 +02:00
Stefan Metzmacher
9da2f72d47 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_break.c
metze
2011-09-07 10:38:04 +02:00
Stefan Metzmacher
02f7c37e67 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_tcon.c
metze
2011-09-07 10:38:03 +02:00
Stefan Metzmacher
d280d9f945 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_sesssetup.c
metze
2011-09-07 10:38:03 +02:00
Stefan Metzmacher
7ec3a35d2a s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_negprot.c
metze
2011-09-07 10:38:03 +02:00
Stefan Metzmacher
6985a1378b s3:smb2_server: add smbd_smb2_request_verify_sizes()
metze
2011-09-07 10:38:02 +02:00
Stefan Metzmacher
fcd0c0e19e s3:torture: relax TRANS2 midmight time checking
It's possible that the test runs on a full hour, e.g. Tue Sep  6 03:00:00 2011.

So better check that the a_time is different from the current time.

metze
2011-09-07 10:38:02 +02:00
Stefan Metzmacher
674f9cc1d9 s3:smb2cli: fix marshalling of smb2_create_blobs in smb2cli_create()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep  7 10:21:55 CEST 2011 on sn-devel-104
2011-09-07 10:21:55 +02:00
Stefan Metzmacher
013d2abc75 s3:smb2cli: don't terminate the pathname in smb2cli_query_directory()
Windows generates NT_STATUS_OBJECT_NAME_INVALID otherwise.

metze
2011-09-07 08:33:41 +02:00
Stefan Metzmacher
96a3ec51b4 s3:smb2cli: don't terminate the pathname in smb2cli_create()
Windows generates NT_STATUS_OBJECT_NAME_INVALID otherwise.

metze
2011-09-07 08:33:41 +02:00
Stefan Metzmacher
817bb1f8f2 s3:smb2cli: don't terminate the pathname in smb2cli_tcon()
Windows generates NT_STATUS_BAD_NETWORK_NAME otherwise.

metze
2011-09-07 08:33:40 +02:00
Stefan Metzmacher
884a5a620f s3:smb2cli: SMB2_TCON needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze
2011-09-07 08:33:38 +02:00
Stefan Metzmacher
85b393a199 s3:smb2cli: SMB2_WRITE needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze
2011-09-07 08:33:15 +02:00
Stefan Metzmacher
42609036be s3:smb2cli: SMB2_READ needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze
2011-09-07 08:32:45 +02:00
Stefan Metzmacher
fbcba9fa8f s3:smb2cli: SMB2_QUERY_DIRECTORY needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze
2011-09-07 08:32:42 +02:00
Stefan Metzmacher
b57fb1e1a4 s3:smb2cli: SMB2_CREATE needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze
2011-09-07 08:32:08 +02:00
Stefan Metzmacher
35d4afc3e0 s3:smb2cli: SMB2_SESSION_SETUP needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze
2011-09-07 08:32:05 +02:00
Jeremy Allison
9646d802b7 Revert "Part 5 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid argument)"
This reverts commit 17f6e02723.

Using the existing default permissions for group access is incorrect
when no such permissions are given in the incoming ACL.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep  7 03:50:21 CEST 2011 on sn-devel-104
2011-09-07 03:50:21 +02:00