summaryrefslogtreecommitdiffstats
path: root/source3/smbd/conn.c
Commit message (Collapse)AuthorAgeFilesLines
* source3/smbd/conn.c: wean off string_set/string_freeRusty Russell2012-08-071-7/+3
| | | | | | | Use straight talloc strings. This is the only user outside loadparm.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3:smbd: make use of smbXsrv_tcon for smb1Stefan Metzmacher2012-06-251-118/+0
| | | | | | Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
* s3:include: change connection_struct->cnum to uint32_tMichael Adam2012-06-061-1/+1
| | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:connections: add a CNUM_OFFSET for mapping between cnum and the bitmap indexMichael Adam2012-06-061-4/+10
| | | | | | | | | This moves the start of the range of valid cnum values up from 0 to CNUM_OFFSET (currently 1), so that in a later step we can use 0 as invalid cnum value instead of the current -1. This will allow us to change the type of cnum to uint32_t from a mix of int and unsigned. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:smbd: let conn_clear_vuid_caches() take a uint64_t vuidStefan Metzmacher2012-06-061-2/+2
| | | | metze
* s3:smbd: keep 'num_connections' and 'connections' directly under ↵Stefan Metzmacher2012-03-061-84/+30
| | | | | | | | | smbd_server_connection The plan is to have connection_struct as some kind of low level abstraction for a smb1/smb2 tree connects, that can be used by SMB_VFS modules. metze
* s3:smbd:smb2: fix an assignment-instead-of-check bug conn_snum_used()Michael Adam2012-02-011-1/+1
| | | | | | | Accidential "=" instead of "==". Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Feb 1 17:10:15 CET 2012 on sn-devel-104
* lib/util Move bitmap.c to lib/utilAndrew Bartlett2011-07-081-0/+1
|
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-2/+2
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-091-2/+2
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3-smbd Split conn.c into 3 filesAndrew Bartlett2011-05-311-187/+35
| | | | | | | | | | The idea with this split is to make it easier to handle dependencies, avoiding having the loadparm code depend on the global server variables, without resorting to dummy functions and linker tricks. conn_clear_vuid_cache() is brought in from uid.c to make it static Andrew Bartlett
* s3-smbd provide struct smbd_server_connection * to conn_snum_usedAndrew Bartlett2011-05-311-3/+2
| | | | | | | | | | | | | | | | This provides the 'sconn' parameter to this key functions, that is currently duplicated in dummysmbd.c, which causes duplicate symbol issues in the waf build. This has natrually caused a number of consequential changes across the codebase, includning not passing a messaging context into initial reload_services(): This causes problems because the global smbd_server_connection isn't yet set up, as there isn't a connection here, just the initial process. Andrew Bartlett
* s3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin from.Günther Deschner2011-04-291-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 22:05:07 CEST 2011 on sn-devel-104
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* Add deadtime detection for SMB2. Correctly update lastused timestamp across ↵Jeremy Allison2010-10-191-17/+75
| | | | all active tcons. Should fix dfree cache not updating bug.
* Add SMB2 paths to smbd/conn.c. Except for conn_idle_all(), to be cleaned up ↵Jeremy Allison2010-10-191-32/+105
| | | | next.
* Copyright/whitespace/comment cleanup in preparation for adding SMB2 paths.Jeremy Allison2010-10-191-20/+27
|
* Move tcons.num_open from smb1 to sconn->num_tcons_open as this is needed for ↵Jeremy Allison2010-10-191-5/+4
| | | | SMB2 also.
* s3: Remove smbd_server_conn from msg_force_tdisVolker Lendecke2010-10-031-1/+7
|
* s3: Fix a segfault in the printer code using create_conn_structVolker Lendecke2010-08-301-1/+7
|
* Rename "allow_smb2" -> "using_smb2" and make the usage clearer.Jeremy Allison2010-06-091-3/+3
|
* s3:smbd add utility function to check if there are open pipesSimo Sorce2010-06-071-8/+3
|
* When tearing down the connection make sure we close all files beforeJeremy Allison2010-05-071-0/+7
| | | | | | | freeing the global context, as we close access to the locking db before freeing the global context. Jeremy.
* s3: Use bitmap_talloc for smb1 server tconsVolker Lendecke2010-03-281-3/+3
|
* Make conn_close_all() safe to call from SMB2 sessions (fix crash bug).Jeremy Allison2010-02-241-8/+19
| | | | | | | | Ensure we don't call close_cnum() with SMB2, also talloc_move the compat_conn pointer from the NULL context onto the tcon context in SMB2 as it's conceptually owned by that pointer. Jeremy.
* s3:smbd: remove dirptr and dirpath from connection_structStefan Metzmacher2009-08-071-2/+0
| | | | | | | They're both only used in the context of a function, so we can make them stack variables. metze
* s3:smbd: conn_free_internal() can be static nowStefan Metzmacher2009-08-071-2/+2
| | | | metze
* s3:smbd: add a smbd_server_connection pointer to connection_structStefan Metzmacher2009-08-071-8/+15
| | | | | | | This can be NULL for faked connection structs used in the rpc server or printing code. metze
* s3:smbd: add a lazy mode for conn_new() and conn_free() for SMB2Stefan Metzmacher2009-06-031-0/+15
| | | | metze
* s3:smbd: move tcon specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-33/+39
| | | | metze
* Make "struct policy" private to srv_lsa_hnd.cVolker Lendecke2009-04-191-1/+1
|
* Fix bug #6155 - "force group" is no longer working as expected.Jeremy Allison2009-03-031-0/+1
| | | | | | | We need to store the "force group" uid separately from the conn->server_info token as we need to apply it separately also. Volker PLEASE CHECK ! Jeremy.
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-6/+1
| | | | | | The goal is to move all this variables into a big context structure. metze
* Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.Jeremy Allison2008-10-011-1/+1
| | | | | | | | | | | | | | | | | This API is unusual in that if used to remove a non-list head it nulls out the next and prev pointers. This is what you want for debugging (don't want an entry removed from the list to be still virtually linked into it) but means there is no consistent idiom for use as the next and prev pointers get trashed on removal from the list, meaning you must save them yourself. You can use it one way when deleting everything via the head pointer, as this preserves the next pointer, but you *must* use it another way when not deleting everything via the head pointer. Fix all known uses of this (the main one is in conn_free_internal() and would not free all the private data entries for vfs modules. The other changes in web/statuspage.c and winbindd_util.c are not strictly neccessary, as the head pointer is being used, but I've done them for consistency. Long term we must revisit this as this API is too hard to use correctly. Jeremy.
* ensure we exit with non-zero status on EOF on socket, so the parentAndrew Tridgell2008-08-131-2/+5
| | | | | can trigger a brlock db cleanup (This used to be commit bbd49f9e1c4b50c4a596fb991f3306e1e90c0177)
* Move connection-specific vuid cache clear to uid.cVolker Lendecke2008-06-141-15/+2
| | | | (This used to be commit 1025f687910ce40283c7344ed67ebd5bf31217b7)
* Restructuring of code to fix #5460. Remove searchJeremy Allison2008-05-191-22/+0
| | | | | | | | by name code from conn, we were already doing the same check in the dfs_redirect() function, so move it into parse_dfs_path() instead. Jeremy. (This used to be commit 8a7c6df122c5e4a1d0f74ab0f1bc9376a0a8bcb1)
* Ensure we don't keep searching for sharename if it'sJeremy Allison2008-05-141-3/+3
| | | | | | not the start of the list. Jeremy. (This used to be commit 15857534b76bc66ad122510100aa224f17250465)
* Fix bug #5460. The problem is RHEL5.0 shipped a CIFS clientJeremy Allison2008-05-131-2/+23
| | | | | | | | | | | | | | | | | | that sets the DFS bit on pathnames but doesn't send DFS paths. This causes lookups to fail as the smbd/msdfs.c code now just eats the first two parts of the pathname and uses the rest as the local path. The previous hostname check used to protect us from that as we knew that when the hostname was invalid it was a local path (and a broken client). I didn't want to put that check back in, but came up with another idea - even though the hostname can be a different one, the sharename must be valid on this machine. So we can check for a valid sharename instead. Jeremy. (This used to be commit e1cda82f6f7de3306a653af920756c1640057f2d)
* Remove "user" from connection_structVolker Lendecke2008-05-101-2/+0
| | | | (This used to be commit 368454a27cb53a408ec416cbf37235b304592fb5)
* Replace nt_user_token with server_info in connection_structVolker Lendecke2008-05-101-0/+1
| | | | (This used to be commit a3738aef59e97d4533010b048534d937d36c0950)
* Next try at making the vuid cache circularVolker Lendecke2008-05-101-3/+6
| | | | | Jeremy, please check! (This used to be commit a34f73521712e3820d417f0d9ed811723b7681d6)
* Revert "Second half of 50c891d3: Correctly clear the vuid cache"Volker Lendecke2008-05-051-1/+1
| | | | | This reverts commit 0aea404b0a83736ba2884cc7cf00cd797aab1f56. (This used to be commit fa39f47f5fc2df0f1a59705e30a799518c353b45)
* Second half of 50c891d3: Correctly clear the vuid cacheVolker Lendecke2008-05-051-1/+1
| | | | (This used to be commit 0aea404b0a83736ba2884cc7cf00cd797aab1f56)
* Remove connection_struct->mem_ctx, connection_struct is its own parentVolker Lendecke2008-05-051-13/+4
| | | | (This used to be commit 559180f7d30606d1999399d954ceedc798c669a4)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-2/+2
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter2007-10-101-0/+1
| | | | (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r22942: Some message_register -> messaging_register conversionsVolker Lendecke2007-10-101-3/+6
| | | | (This used to be commit 65335a420645202fc79c599a1177838ec19a4075)