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

38036 Commits

Author SHA1 Message Date
Amitay Isaacs
4201d6fd68 s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:56 +10:00
Jeremy Allison
a6d06c0697 Fix bug #8370 - vfs_chown_fsp broken -- returns in the wrong directory
Ensure we always use vfs_ChDir() to keep the singleton cache coherent.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Aug 19 00:43:05 CEST 2011 on sn-devel-104
2011-08-19 00:43:04 +02:00
Björn Jacke
dcb5720ad0 s3/ldap: don't continue if we couldn't get the domain info on startup
while some things work without the domain info, some important things don't,
which is highly irritating. As even calls like EnumTrustDom fail and
thus clients' domain logins fail we are sufficiently broken to refuse to go on.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Aug 18 12:48:37 CEST 2011 on sn-devel-104
2011-08-18 12:48:37 +02:00
Volker Lendecke
3c0b882756 s3: Next step to fix MIT trusts
aa3f10c was not complete in the sense that it did not fully cover some
conditions that led to invalid domains in the winbind parent

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Aug 17 13:59:06 CEST 2011 on sn-devel-104
2011-08-17 13:59:05 +02:00
Volker Lendecke
31ee78fea9 s3: Increase a debug level in ads_find_dc
This message can happen with AD trusts that winbind can not cope with. The
message is not really clear and not worth spamming syslog always.
2011-08-17 12:30:08 +02:00
Volker Lendecke
8fd5e0ff2e Replace calls to sid_equal with calls to dom_sid_equal 2011-08-17 12:30:08 +02:00
Simo Sorce
102f39ae3e s3-messaging: IDMAP_ messages belongs to the Winbind range
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Aug 16 22:27:05 CEST 2011 on sn-devel-104
2011-08-16 22:27:05 +02:00
Volker Lendecke
6c8ee02e17 s3: Use ZERO_STRUCT where appropriate
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug 16 13:59:55 CEST 2011 on sn-devel-104
2011-08-16 13:59:55 +02:00
Michael Adam
689f42af29 s3:registry: enhance debugging of deletekey_recursive
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Aug 15 19:34:44 CEST 2011 on sn-devel-104
2011-08-15 19:34:44 +02:00
Michael Adam
7eeb168523 s3:dbwrap_ctdb: improve transaction start/commit/cancel debugging
* also log nesting transaction start/commit/cancel
* unify transaction log messages slightly
2011-08-15 17:15:15 +02:00
Michael Adam
0aa85ec43a s3:lib: fix a comment in tdb_unpack() 2011-08-15 17:15:15 +02:00
Michael Adam
32b7411104 s3:registry: fix regdb_key_exists: the record has to contain at least the 4-byte subkey counter
More precisley, we return false if the record does not match the required
structure of a leading 4-byte subkey counter followed by the corresponding
number zero-terminated strings.
2011-08-15 17:15:14 +02:00
Gregor Beck
8a36e72140 s3: avoid reading past the end of buffer in tdb_unpack 'f' if zero termination is missing
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-15 17:15:14 +02:00
Gregor Beck
39f9c854ae s3: avoid reading past the end of buffer in tdb_unpack 'P' if zero termination is missing
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-15 17:15:14 +02:00
Andrew Bartlett
043c521932 build: link pys3param against pytalloc-util not pytalloc
pytalloc is the python module, pytalloc-util is the library that we can depend on

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Aug 15 09:54:02 CEST 2011 on sn-devel-104
2011-08-15 09:54:02 +02:00
Andrew Bartlett
3df9e62c97 s3-passdb Use supplied pdb_methods in default passdb search handlers 2011-08-15 08:26:06 +02:00
Simo Sorce
2e5fc83350 s3-prefork: Do not use mmap/mremap/munmap directly
Use the wrappers in util.h as they deal with trying to do the best they can on
platfroms that do not support mmap extensions.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Mon Aug 15 04:13:51 CEST 2011 on sn-devel-104
2011-08-15 04:13:50 +02:00
Volker Lendecke
1022c28e15 s3: Fix bug 8360
OS/2 sends an unexpected write&x/read&x chain

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Aug 14 08:48:58 CEST 2011 on sn-devel-104
2011-08-14 08:48:58 +02:00
Andrew Bartlett
d2d2e7ab02 s3-passdb: Fix python < 2.6 build errors in passdb python wrapper
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104
2011-08-14 03:59:48 +02:00
Simo Sorce
b120c5f288 torture: use tevent_ functions names instead of the legacy event_ ones 2011-08-13 09:54:15 -04:00
Andrew Bartlett
daa78ead19 s3-smbd Avoid races creating 'ncaclrpc dir' with epmd in a child process 2011-08-13 20:18:41 +10:00
Amitay Isaacs
1c1f7df956 s3-passdb: Added python method to get_global_sam_sid
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:31:09 +10:00
Amitay Isaacs
e580f33b13 s3-passdb: Return dom_sid and guid with correct python types.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:31:09 +10:00
Amitay Isaacs
a252e69db2 passdb: Move python wrapper for passdb in samba3 python package 2011-08-13 12:31:07 +10:00
Amitay Isaacs
6d139d6b0f s3-param: Add python wrapper for s3 parameters
This provids a get_context() method to return s3 context as s4 context type.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:50 +10:00
Amitay Isaacs
6a18664d51 s3-passdb: Connect to specified samdb if location is provided, otherwise use default
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:50 +10:00
Amitay Isaacs
d7ab07e86f s3-passdb: Fix the error messages and return correct NTSTATUS
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:50 +10:00
Amitay Isaacs
8e4e408e3a s3-param: Make sure we have talloc stack frame before calling in s3 code
When loading parameters as s4 context in s3 code, ensure we have a
talloc stack frame. This is required for python wrapping s3 params.
2011-08-13 12:30:50 +10:00
Andrew Bartlett
7c9ecf35fa param: Add smb.conf loading support to s3/s4 loadparm bridge 2011-08-13 12:30:49 +10:00
Andrew Bartlett
93e8d3b381 s4-scripting Rename passdb upgrade routine to avoid conflict with upgradeprovision 2011-08-13 12:30:49 +10:00
Andrew Bartlett
00364e4e0d s3-passdb Add support for pdb_add_sam_account() and password hashes to pdb_samba4
This will help when using this as part of the Samba3 passdb -> Samba4
ldb database upgrade script.

Andrew Bartlett
2011-08-13 12:30:49 +10:00
Andrew Bartlett
2993113a56 s4-dsdb Add ability to force a particular SID in the upgrade case 2011-08-13 12:30:49 +10:00
Andrew Bartlett
add8505fde s3-passdb Make pdb_element_is_changed available to all passdb modules
This will allow pdb_samba4 to use this

Andrew Bartlett
2011-08-13 12:30:49 +10:00
Amitay Isaacs
65e12c0501 passdb: Allocate talloc stackframe before calling in pdb functions. 2011-08-13 12:30:48 +10:00
Amitay Isaacs
ae9a3274bc passdb: Call with correct backend methods instead of default methods
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:48 +10:00
Amitay Isaacs
2e0ccc4772 passdb: Added python wrapper to passdb
- Added python wrapper for samu structure.

 - Added python wrapper for passdb methods:

   domain_info(), getsampwnam(), getsampwsid(), create_user(),
   delete_user(), add_sam_account(), delete_sam_account(),
   update_sam_account(), rename_sam_account(), search_users()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:44 +10:00
Amitay Isaacs
08ccc6ed51 passdb: Add a function to read secrets db from a specified path
This allows to load secrets db from a different location. The original
secrets_init() now calls secrets_init_path() with lp_private_dir().
2011-08-13 10:25:06 +10:00
Amitay Isaacs
6f21f556c1 passdb: Add a function to expose loaded backend list.
This function is used in python wrapper to list available python backends.
2011-08-13 10:25:06 +10:00
Stefan Metzmacher
eeb0298ac1 s3:smb2cli: pass more fields to smb2cli_req_create()/smb2cli_req_send()
The caller should take care of the global cli_state values.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 19:38:27 CEST 2011 on sn-devel-104
2011-08-12 19:38:27 +02:00
Stefan Metzmacher
28c4d2d0f3 s3:smb2cli: allow 32bit dyn_len in smb2cli_req_create()/smb2cli_req_send()
metze
2011-08-12 18:06:44 +02:00
Stefan Metzmacher
b41d44eda3 s3:libsmb: keep a cli_smb_state->one_way
This moves the SMB1 specific stuff to cli_smb_req_create(),
instead of having it in the core dispatching code.

metze
2011-08-12 18:06:28 +02:00
Stefan Metzmacher
c485df9530 s3:libsmb: abstract the incoming dispatch function via a function pointer
This will allow handling of SMB2 in future.

metze
2011-08-12 18:06:04 +02:00
Stefan Metzmacher
58003b5a77 s3:libsmb: split out cli_state_dispatch_smb1() from cli_smb_received()
metze
2011-08-12 17:54:04 +02:00
Stefan Metzmacher
9b15963695 s3:libsmb: add missing TALLOC_FREE(frame) to cli_smb_received()
metze
2011-08-12 17:54:04 +02:00
Stefan Metzmacher
42cde0480b s3:smb2_server: make sure we prefer responses over requests on the client socket
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 16:46:43 CEST 2011 on sn-devel-104
2011-08-12 16:46:43 +02:00
Stefan Metzmacher
0d1a7fda1e s3:libsmb: keep the request order in cli_smb_req_unset_pending()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 12:36:03 CEST 2011 on sn-devel-104
2011-08-12 12:36:03 +02:00
Stefan Metzmacher
edeb41aa20 s3:libsmb: use tevent_req_defer_callback() unless there's only one request in cli_smb_received()
Callers of tevent_req_done() (or similar functions) have to return directly.
Otherwise the callback could invalidate the current stack state,
which is likely to trigger segfaults.

If there was only one pending request and we just got the response
for that one, we can use tevent_req_done() directly.

Otherwise there're more pending requests and we need to call
cli_state_receive_next() or we got the response for chained requests.
Both means that we have to use tevent_req_defer_callback().

metze
2011-08-12 11:08:00 +02:00
Stefan Metzmacher
02cb2052d8 s3:libsmb: make use of cli_state_receive_next() in cli_smb_received()
metze
2011-08-12 11:08:00 +02:00
Stefan Metzmacher
56d3c91af7 s3:libsmb: notify all request about failures in cli_smb_req_set_pending()
It's up to the caller to notify the current request,
but we have to notify all other pending requests if
we're not able to read the next response from the server.

metze
2011-08-12 11:08:00 +02:00
Stefan Metzmacher
4335a4f1c6 s3:libsmb: split out cli_state_receive_next() from cli_smb_req_set_pending()
metze
2011-08-12 11:08:00 +02:00