summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/util: Drop unnecessary use of talloc_tos()Volker Lendecke2014-09-201-6/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib/util: Return some functions to util_str.cMartin Schwenke2014-09-192-55/+55
| | | | | | | | | | | These were moved in commit 8e704e4107b284bfc1e43f4c698ac0e6c5ae1800 when util_str.c was not shared. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Sep 19 20:34:05 CEST 2014 on sn-devel-104
* lib/util: Move next_token* functions to util_str.cMartin Schwenke2014-09-192-146/+145
| | | | | | | | | | | | | | | This is part of an attempt to untangle charset from util.c. Most of this was moved from util_str.c in commit 55903e6f9120f1ec58a8554813229975c3028a09. next_token() was moved from charset to util.c in commit 4be643d4ce33d5ce2bf9deacc3f6d0fde90cf626 so that it would be alongside next_token_talloc(). Now that util_str.c is in shared lib/util it is no longer necessary to have these in util.c. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/util: Move idr_get_new_random() to new source file idtree_random.cMartin Schwenke2014-09-196-63/+176
| | | | | | | | | | | This function depends on genrand.c, which depends on lib/crypto. This way the other IDR tree code can be used without lib/crypto. While doing this, create idtree.h and idtree_random.h and clean up the includes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* debug: Standalone compile without includes.hMartin Schwenke2014-09-192-3/+14
| | | | | | | | | | | | | Compiling utilities with includes.h is confusing because includes.h could come from source3, source4 or ctdb. Utilities should be independent of such things. Add a minimal set of fined-grained includes that attempts to avoid the catch-all samba_util.h. A comment indicates what is used from samba_util.h so that future clean-ups are easier. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb_wrap: Standalone compile without includes.hMartin Schwenke2014-09-192-4/+5
| | | | | | | | | | | Compiling this generic code is confusing because it uses includes.h, which could come from source3, source4 or ctdb. Generic code should be independent of such things. Drop include of param.h since nothing from that file is used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb_wrap: tdb_wrap.h doesn't need struct loadparm_contextMartin Schwenke2014-09-191-2/+0
| | | | | | | Not since commit d6db35d7a564ee556b74131ef4c3a3cdb8097e14. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: tdb.h needs bool typeMartin Schwenke2014-09-191-0/+1
| | | | | | | Due to introduction of tdb_runtime_check_for_robust_mutexes(). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/crypto: Protect crypto.h against multiple inclusionMartin Schwenke2014-09-191-0/+4
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* charset: Avoid compiler warnings with --enable-developerMartin Schwenke2014-09-191-2/+2
| | | | | | | | | | | | These: [ 44/309] Compiling ../lib/util/charset/util_unistr_w.c ../../lib/util/charset/util_unistr_w.c: In function ‘strlower_w’: ../../lib/util/charset/util_unistr_w.c:182:127: warning: right-hand operand of comma expression has no effect [-Wunused-value] COPY_UCS2_CHAR(s,&v); Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* replace: Fix includes of unistd.hMartin Schwenke2014-09-193-4/+9
| | | | | | | | This should always be conditional. system/passwd.h wants it too so that uid_t is defined. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* dynconfig: Remove include of nsswitch/winbind_struct_protocol.hMartin Schwenke2014-09-191-1/+0
| | | | | | | | Nothing declared in this file is used in dynconfig.c. It appears that WINBINDD_SOCKET_DIR used to come from there. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* util: Fix indentationMartin Schwenke2014-09-191-1/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* nsswitch: Skip groups we were not able to map.Andreas Schneider2014-09-191-0/+5
| | | | | | | | | | | | | | If we have configured the idmap_ad backend it is possible that the user is in a group without a gid set. This will result in (uid_t)-1 as the gid. We return this invalid gid to NSS which is wrong. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10824 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Sep 19 17:57:14 CEST 2014 on sn-devel-104
* s3:torture: use cli_state_client_guid in run_smb2_multi_channel()Stefan Metzmacher2014-09-191-0/+6
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 19 11:40:15 CEST 2014 on sn-devel-104
* s3:libsmb: add 'cli_state_client_guid'Stefan Metzmacher2014-09-192-1/+10
| | | | | | | This can be used by tests to use the same client guid for multiple connections. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_sesssetup: we don't need to do a 2nd smb2srv_session_lookup()Stefan Metzmacher2014-09-191-3/+7
| | | | | | | | For the continuation of a SMB2 SessionSetup we already have the smb2req->session (with NT_STATUS_MORE_PROCESSING_REQUIRED). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: add smbd_smb2_signing_key() helper functionStefan Metzmacher2014-09-191-5/+24
| | | | | | | | | | This will find the correct signing key for the connection. If there's already a channel session key, we need to use that otherwise we need to use the global session key. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbXsrv_session: add smbXsrv_session_find_channel()Stefan Metzmacher2014-09-192-0/+22
| | | | | | | | This function can check if a smbXsrv_connection is already bound to a smbXsrv_session. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbXsrv_session: remember the smbXsrv_connection on channel attached to a ↵Stefan Metzmacher2014-09-192-0/+2
| | | | | | | | | session A session will be usable from multiple connections in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: split out a smbd_add_connection() helper function.Stefan Metzmacher2014-09-192-159/+244
| | | | | | | This attaches a smbXsrv_connection to a smbXsrv_client structure. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: remove now unused smbd_server_connection->connStefan Metzmacher2014-09-192-6/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_lock: iterate over all sconn->client->connectionsStefan Metzmacher2014-09-191-81/+109
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_lock: always use tevent_req_defer_callback() if we go asyncStefan Metzmacher2014-09-191-1/+1
| | | | | | | | | | | | process_blocking_lock_queue_smb2() can call reprocess_blocked_smb2_lock() multiple times, which results in multiple tevent_req_done() calls. As we could disconnect the connection from there, process_blocking_lock_queue_smb2() could crash as the local state might be destroyed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_glue: remove chained fsps from all connections in ↵Stefan Metzmacher2014-09-191-8/+15
| | | | | | | remove_smb2_chained_fsp() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_break: use fsp->conn->sconn->client->connections to send SMB2 oplock ↵Stefan Metzmacher2014-09-191-1/+8
| | | | | | | | | | | | breaks This means we use the first connection for now. TODO: we may need to use the connection on which the SMB2 create was done and fallback to other connections. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_break: pass smbXsrv_connection to smbd_smb2_send_oplock_break()Stefan Metzmacher2014-09-193-4/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_create: pass smbXsrv_connection to *deferred*_smb2Stefan Metzmacher2014-09-193-15/+14
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: pass smbXsrv_connection to schedule_deferred_open_message_smb()Stefan Metzmacher2014-09-193-5/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: pass smbXsrv_connection to remove_deferred_open_message_smb()Stefan Metzmacher2014-09-193-4/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: pass smbXsrv_connection to open_was_deferred()Stefan Metzmacher2014-09-196-15/+16
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move smbXsrv_{session,tcon,open} tables to smbXsrv_clientStefan Metzmacher2014-09-197-54/+73
| | | | | | | | These should be per client (based on the SMB >= 2.1 client_guid), this is a preparation for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use tevent_loop_wait() in the parent smbd process.Michael Adam2014-09-191-9/+41
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: use tevent_loop_wait() in the child process event loopMichael Adam2014-09-192-26/+28
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbXsrv_session: change smbXsrv_session->connection to ↵Stefan Metzmacher2014-09-193-8/+9
| | | | | | | | | smbXsrv_session->client A session will be usable from multiple connections in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use fsp->conn->sconn->client->connections to send SMB1 oplock breaksStefan Metzmacher2014-09-191-1/+6
| | | | | | | This means we use the first and only connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use sconn->client->connections in keepalive_fn()Stefan Metzmacher2014-09-191-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use sconn->client->connections in reload_services()Stefan Metzmacher2014-09-191-5/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: remove now unused smbXsrv_connection->sconnStefan Metzmacher2014-09-192-2/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbXsrv_open: use xconn->client->sconn in smb1srv_open_table_init()Stefan Metzmacher2014-09-191-2/+2
| | | | | | | conn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbXsrv_session: use xconn->client->sconn in smbXsrv_session_logoff()Stefan Metzmacher2014-09-191-5/+7
| | | | | | | conn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: use xconn->client->sconn in smbd_smb2_request_next_incoming()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: use xconn->client->sconn in smbd_smb2_request_create()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: use xconn->client->sconn in smbd_smb2_first_negprot()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: use xconn->client->sconn in smbd_smb2_io_handler()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use xconn->client->sconn in make_connection_snum()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use xconn->client->sconn in smb1_parse_chain()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use xconn->client->sconn in construct_reply()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use xconn->client->sconn in reply_special()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use xconn->client->sconn in process_smb()Stefan Metzmacher2014-09-191-1/+1
| | | | | | | xconn->sconn will go away soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>