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

113 Commits

Author SHA1 Message Date
Ralph Boehme
b5c6964a50 s3:param: make "servicename" a substituted option
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:37 +00:00
Volker Lendecke
e8ce1c6483 smbd: Remove some unused includes
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-04-11 23:35:15 +00:00
Stefan Metzmacher
d4f369c470 s3:smbd: remove unused claim_connection/yield_connection
metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19 12:15:03 +02:00
Gregor Beck
d9ea786c86 s3:smbd/connection: use smbXsrv_tcon_traverse to count connections
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19 12:15:00 +02:00
Gregor Beck
77906e7cdf s3:count_current_connections: do not clear orphaned entries from connections.tdb
This removes one of the last callers of connetions_forall.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19 12:14:59 +02:00
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Michael Adam
ba1699463b s3:smb: introduce a name TID_FIELD_INVALID for the invalid value for a cnum/tid
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-06 19:37:14 +02:00
Stefan Metzmacher
8693a4fff9 s3:lib: split things into a conn_tdb.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jun  5 19:28:35 CEST 2012 on sn-devel-104
2012-06-05 19:28:35 +02:00
Stefan Metzmacher
704cf10645 s3:smbd: avoid using sconn_server_id()
metze
2011-12-16 13:19:32 +01:00
Stefan Metzmacher
cefb797434 s3:smbd: add connections_snum_used()
This works similar to conn_snum_used(), but instead of
looking at the current connection only, it looks at
all active connections in "connections.tdb".

metze
2011-12-13 15:45:36 +01:00
Michael Adam
43a13b55fc s3:smbd: convert connections.c to use only dbrwap wrapper functions
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Andrew Bartlett
6d741e918f s3-auth Use *unix_token rather than utok in struct auth3_session_info
This brings this structure one step closer to the struct auth_session_info.

A few SMB_ASSERT calls are added in some key places to ensure that
this pointer is initialised, to make tracing any bugs here easier in
future.

NOTE: Many of the users of this structure should be reviewed, as unix
and NT access checks are mixed in a way that should just be done using
the NT ACL.  This patch has not changed this behaviour however.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andreas Schneider
d99acd26a2 s3-smbd: Replace client_id in smbd connection.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:18 +10:00
Rusty Russell
5a7874e119 tdb_traverse/tdb_traverse_read: check returns for negative, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for < 0 instead of == -1.

Also, there's no tdb_traverse_read in TDB2: we don't try to make
traverse reliable any more, so there are no write locks anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Volker Lendecke
df6b877cc2 s3: Fix connecting to ctdb as non-root
This is at least one instance which I could identify

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jun 14 19:06:39 CEST 2011 on sn-devel-104
2011-06-14 19:06:39 +02:00
Volker Lendecke
2817eed741 s3: Fix count_current_connections
"False" is not really a valid return value for "int"..
2011-06-14 17:55:30 +02:00
Günther Deschner
af300a9fcb s3-auth: smbd needs auth.h
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Andrew Bartlett
2e69e89456 s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.

The structure is also not ideal for it's current purpose.  Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session.  This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.

(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-22 16:20:10 +11:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Volker Lendecke
6d10684556 s3: Remove unneeded "client_address" from connection_struct 2010-08-18 11:18:23 +02:00
Volker Lendecke
13a4922ae6 s3: Remove a conn NULL check from claim_connection
We've already dereferenced conn before
2010-08-14 12:27:17 +02:00
Volker Lendecke
5387d6ee16 s3: Remove procid_self() from claim_connection() 2010-07-05 11:06:25 +02:00
Volker Lendecke
33242471e5 s3: Remove NULL checks from claim_connection()
Nowadays this is only called from make_connection_snum() where we always
provide a connection_struct.
2010-07-05 11:06:25 +02:00
Volker Lendecke
23a31becac s3: Remove unused msg_flags from connections.tdb
This breaks rolling code upgrade!
2010-07-04 21:49:03 +02:00
Volker Lendecke
b0c83d50f9 s3: Replace register_message_flags() with serverid_register_msg_flags()
message_send_all is now done by walking the serverid.tdb, not the
connections.tdb anymore.

Günther, Simo, please check!
2010-07-04 21:49:03 +02:00
Volker Lendecke
747a0b440f s3: Remove unused "mypid" from count_current_connections() state 2010-03-01 12:18:12 +01:00
Volker Lendecke
2238260aa3 s3: Use talloc_tos() in yield_connection() 2010-02-28 20:45:21 +01:00
Volker Lendecke
5c40aa59d7 s3: Remove unused count_all_current_connections() 2010-02-28 20:45:21 +01:00
Volker Lendecke
a781b78417 Remove smb_np_struct 2008-10-13 20:59:33 +02:00
Volker Lendecke
f0a2706486 Make use of talloc_tos() 2008-10-11 09:02:18 +02:00
Volker Lendecke
200b0deaef Fix some nonempty blank lines 2008-10-11 09:02:18 +02:00
Volker Lendecke
40f5eab5eb Wrap the unix token info in a unix_user_token in auth_serversupplied_info
No functional change, this is a preparation for more current_user ref removal
(This used to be commit dcaedf345e)
2008-06-19 18:51:37 +02:00
Volker Lendecke
53a623d8a6 Remove the unix token info from connection_struct
(This used to be commit 2834dacc8d)
2008-05-10 11:17:01 +02:00
Alexander Bokovoy
68694369fc Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb)
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbb)
2008-01-16 12:09:48 +03:00
Volker Lendecke
3cc3b9e187 use talloc_tos in a few more places
(This used to be commit 65dd869bea)
2008-01-10 13:19:58 +01:00
Jeremy Allison
5b0b4f23ef Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc76852)
2007-11-03 23:20:10 -07:00
Jeremy Allison
25074433f4 I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5)
2007-11-03 18:41:26 -07:00
Jeremy Allison
6658165d5e Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
(This used to be commit e848506c85)
2007-11-03 18:15:45 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
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 f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Volker Lendecke
456305325c r24268: Fix two crashes for spoolss
strlcpy does not like a NULL source. Fix a use-after-free.
(This used to be commit c2a2145017)
2007-10-10 12:29:22 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
3a931bc8fc r23221: Fix a bad merge, avoid a memory leak and tdb lock problem
(This used to be commit 2e2415655d)
2007-10-10 12:22:55 -05:00
Volker Lendecke
054bf2fc8b r23171: Convert connections.tdb to dbwrap
(This used to be commit 80a1f43825)
2007-10-10 12:22:52 -05:00
Volker Lendecke
14e25f10d6 r23168: Move the lp_max_connections() into service.c.
(This used to be commit 4afe37d431)
2007-10-10 12:22:51 -05:00
Volker Lendecke
f3c477c631 r23167: Remove an unused parameter
(This used to be commit 3452a870d5)
2007-10-10 12:22:51 -05:00
Volker Lendecke
4aa44f7475 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
(This used to be commit e43e94cda1)
2007-10-10 12:21:55 -05:00