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

51 Commits

Author SHA1 Message Date
Ralph Boehme
25043ebb2e source3: move lib/substitute.c functions out of proto.h
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14897

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-11-11 13:49:32 +00:00
Jeremy Allison
ca6cad5f00 s3: VFS: expand_msdfs: Since we moved to SMB_VFS_READ_DFS_PATHAT() this module has looked at the wrong function.
Fix it to work as a redirection of SMB_VFS_READ_DFS_PATHAT()
instead of SMB_VFS_READLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
2021-02-13 00:17:31 +00:00
Ralph Boehme
c4cbe0610c vfs: make dirfsp arg to SMB_VFS_READLINKAT() const
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-23 07:56:32 +00:00
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
Ralph Boehme
4736623c24 s3: rename talloc_sub_advanced() to talloc_sub_full()
We currently have the following substitution functions:

  talloc_sub_basic()
  talloc_sub_advanced()

talloc_sub_basic() currently substitutes a subset of talloc_sub_advanced().

We'll need a function X that only substitutes what talloc_sub_advanced()
substitutes *without* what talloc_sub_basic() does.

To get there rename talloc_sub_advanced() to talloc_sub_full(). A subsequent
commit will then bring back talloc_sub_advanced() as described above.

Examples with fictional replacement letters A and B. Currently:

  talloc_sub_basic:    A
  talloc_sub_advanced: AB

New:

  talloc_sub_basic:    A
  talloc_sub_advanced:  B
  talloc_sub_full:     AB

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13745

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-11-07 14:16:41 +00:00
Jeremy Allison
5fe9845b31 s3: VFS: vfs_expand_msdfs. Remove readlink_fn(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2019-08-23 18:49:36 +00:00
Jeremy Allison
de17e762ea s3: VFS: vfs_expand_msdfs. Implement readlinkat().
Currently identical to readlink().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2019-08-23 18:49:35 +00:00
Christof Schmitt
4003736a3d vfs: Use static_decl_vfs in all VFS modules
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Dec 18 13:32:00 CET 2017 on sn-devel-144
2017-12-18 13:31:59 +01:00
Jeremy Allison
6ae2d86b9c s3: VFS: Change SMB_VFS_READLINK to use const struct smb_filename * instead of const char *.
We need to migrate all pathname based VFS calls to use a struct
to finish modernising the VFS with extra timestamp and flags parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2017-06-18 02:49:25 +02:00
Jeremy Allison
306783d6f5 lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Not currently used - no logic changes inside.

This will make it possible to pass down a long-lived talloc
context from the loading function for modules to use instead
of having them internally all use talloc_autofree_context()
which is a hidden global.

Updated all known module interface numbers, and added a
WHATSNEW.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2017-04-22 01:17:00 +02:00
Andreas Schneider
1115f152de s3:vfs_expand_msdfs: Do not open the remote address as a file
The arguments get passed in the wrong order to read_target_host().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12687

Signed-off-by: Andreas Schneider <asn@samba.org>
2017-03-15 01:31:23 +01:00
Volker Lendecke
9d12b01496 vfs: expand_msdfs xfile->stdio
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-12-11 11:17:23 +01:00
Volker Lendecke
df9e7c7ae5 lib: Remove global xfile.h includes
This makes it more obvious where this legacy code is used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Nov 20 06:23:19 CET 2016 on sn-devel-144
2016-11-20 06:23:19 +01: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
Richard Sharpe
422494a8e6 vfs: Make function pointer names consistent. They all end in _fn
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-12-12 04:58:40 +01:00
Andrew Bartlett
128ae06a61 s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_info
This makes auth3_session_info identical to auth_session_info

The logic to convert the info3 to a struct auth_user_info is
essentially moved up the stack from the named pipe proxy in
source3/rpc_server to create_local_token().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
9289537993 s3-auth Use struct auth_user_info_unix for unix_name and sanitized_username
This is closer to the layout of struct auth_session_info in auth.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10: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
cbec251f9a s3-vfs: Replace client_id in exand msdfs.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:34 +10:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Günther Deschner
bd471d3004 s3-auth: vfs modules need auth.h
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
45364f5e69 s3-vfs: include smbd/smbd.h in vfs modules.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +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
Volker Lendecke
e1055701ff s3: Remove smbd_server_fd from expand_msdfs_target 2010-08-26 22:35:52 +02:00
Volker Lendecke
17150dfa9a s3: Lift smbd_server_fd() from read_target_host 2010-08-16 21:33:22 +02:00
Volker Lendecke
96ae457023 s3: Remove get_client_fd() 2010-08-16 13:13:10 +02:00
Günther Deschner
0f8e032628 s3-netlogon: remove global include of netlogon.h.
This reduces precompiled headers by another 4 MB and also slightly speeds up the
build.

Guenther
2010-08-06 15:46:16 +02:00
Simo Sorce
d9cffc01be s3:auth use info3 in auth_serversupplied_info
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:53 +02:00
Volker Lendecke
e00e6a2c96 s3: Simplify the code a bit: Catch (len==0) early 2010-02-03 12:34:25 -08:00
Jeremy Allison
de24209f0a Fix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)
Fix inspired by idea from Eric Horst <erich@cac.washington.edu>.

Jeremy.
2010-02-02 16:43:41 -08:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04: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
ff215c4f81 Remove current_user_info reference from vfs_expand_msdfs.c
(This used to be commit 05a66980a9)
2008-06-19 15:53:43 +02:00
Volker Lendecke
50ab871813 Remove some references to get_current_username() and current_user_info
(This used to be commit 344d69f95e)
2008-05-25 11:43:57 +02:00
Volker Lendecke
5bda9a8af0 Remove "user" from connection_struct
(This used to be commit 368454a27c)
2008-05-10 11:17:01 +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
Jeremy Allison
8829875944 Remove pstring from modules directory.
Jeremy.
(This used to be commit 977dc3accb)
2007-11-16 17:07:11 -08: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
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -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
Herb Lewis
55ed1d5945 r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings
(This used to be commit c60687db11)
2007-10-10 12:16:37 -05:00
Herb Lewis
791f48f167 r20124: clean up nested extern declaration warnings
(This used to be commit ac3eb7813e)
2007-10-10 12:16:26 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
74dd9f1186 r4864: Remove unused var.
Jeremy.
(This used to be commit 9fd5d633e6)
2007-10-10 10:54:00 -05:00
Volker Lendecke
4ee66eb4c3 Without words...
(This used to be commit 9cb6b10efa)
2004-03-29 11:54:34 +00:00
Volker Lendecke
f6d86af4a2 Some fixes to expand_msdfs module.
Volker
(This used to be commit 558b5bc1d8)
2004-03-29 11:40:43 +00:00