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

41 Commits

Author SHA1 Message Date
Volker Lendecke
636daef0fe smbd: Hide the SMB1 posix symlink behaviour behind UCF_LCOMP_LNK_OK
This will be used in the future to also open symlinks as reparse
points, so this won't be specific to only SMB1 posix extensions.

I have tried to avoid additional flags for several weeks by making
openat_pathref_fsp or other flavors of this to always open fsp's with
symlink O_PATH opens, because I think NT_STATUS_OBJECT_NAME_NOT_FOUND
with a valid stat is a really bad and racy way to express that we just
hit a symlink, but I miserably failed. Adding additional flags (another one
will follow) is wrong, but I don't see another way right now.

Signed-off-by: Volker Lendecke <vl@samba.org>
2022-12-22 19:50:34 +00:00
Stefan Metzmacher
bf8f225849 s3:locking: move get_existing_share_mode_lock() to share_mode_lock.[ch]
This should be where get_share_mode_lock() is located.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-08-19 18:41:34 +00:00
David Mulder
88b07d3b7f smbd: Move send_trans2_replies to smb1_trans2.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:30 +00:00
David Mulder
34feb41881 smbd: Move smb1_utils.h include to smbd.h
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:30 +00:00
David Mulder
7e1ff0ff35 smbd: Move process.c -> smb1_process.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:30 +00:00
David Mulder
7439d7eb7d smbd: Move signing.c -> smb1_signing.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
0ad4a38a47 smbd: Move make_connection to smb1_service.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
3daa70d7a7 smbd: Move reply.c -> smb1_reply.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
c350372110 smbd: Move reply_open_pipe_and_X to smb1_pipes.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
bb34663958 smbd: Move new_break_message_smb1 to smb1_oplock.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
feb6c59378 smbd: Move nttrans.c -> smb1_nttrans.c
nttrans.c now contians only smb1 code

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
1139ad7b8b smbd: Move negprot.c -> smb1_negprot.c
negprot.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
d42a78f63a smbd: Move ipc.c -> smb1_ipc.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
c510bd332e smbd: Move schedule_aio_read_and_X to smb1_aio.c
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
e00b09ce49 smbd: Move lanman.c -> smb1_lanman.c
lanman.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
92b6efe3ab smbd: Move sesssetup.c -> smb1_sesssetup.c
sesssetup.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
David Mulder
2266fd4cce smbd: Move message.c -> smb1_message.c
message.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-07 17:37:29 +00:00
Jeremy Allison
6493d39b67 s3: smbd: UCF_ALWAYS_ALLOW_WCARD_LCOMP 0x00000002 is no longer used.
Hurrah !

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-12-11 07:17:29 +00:00
Ralph Boehme
28f43fdadc smbd: add fd_handle.[c|h]
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-16 09:08:30 +00:00
Ralph Boehme
537069b6e0 smbd: mark UCF_UNIX_NAME_LOOKUP as unused
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-23 07:56:33 +00:00
Jeremy Allison
5547cc803c s3: smbd: SMB1 comment out unused UCF_COND_ALLOW_WCARD_LCOMP flag.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-09-30 20:46:39 +00:00
Ralph Boehme
9edd7268b6 smbd: remove struct privilege_paths
The last user of this had been removed by
d485c43cc7.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 31 19:32:12 UTC 2020 on sn-devel-184
2020-03-31 19:32:11 +00:00
Jeremy Allison
d875f60e97 s3: smbd: Remove UCF_SAVE_LCOMP flag. Note it is no longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-30 14:45:31 +00:00
Jeremy Allison
aa72d09b31 s3: smbd: Add UCF_GMT_PATHNAME, which represents FLAGS2_REPARSE_PATH.
This must be set by a client to use shadow copy (@GMT) paths.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2017-05-22 18:41:16 +02:00
Jeremy Allison
0fbf5b644d s3: smbd: Add UCF_DFS_PATHNAME which tracks the flags2 FLAGS2_DFS_PATHNAMES bit.
Set inside ucf_flags_from_smb_request(). This will allow us to
remove the req->flags2 & FLAGS2_DFS_PATHNAMES parameter from
filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2017-05-22 18:41:15 +02:00
Richard Sharpe
6abd986704 Convert all uses of uint8/16/32 to _t in source3/smbd.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-06 04:14:14 +02:00
Jeremy Allison
874318a978 smbd: change flag name from UCF_CREATING_FILE to UCF_PREP_CREATEFILE
In preparation to using it for all open calls.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-09 09:48:48 -08:00
Volker Lendecke
aef8aad638 smbd: Fix a profile problem
When trying to read a profile, under certain circumstances Windows tries
to read with its machine account first. The profile previously written
was stored with an ACL that only allows access for the user and not
the machine. Windows should get an NT_STATUS_ACCESS_DENIED when using
the machine account, making it retry with the user account (which would
then succeed).

Samba under these circumstances erroneously gives
NT_STATUS_OBJECT_PATH_NOT_FOUND, which makes Windows give up and not
retry. The reasons is the "dropbox" patch in unix_convert, turning EACCESS
on the last path component to OBJECT_PATH_NOT_FOUND. This patch makes
the dropbox behaviour only kick in when we are creating a file. I think
this is an abstraction violation. unix_convert() should not have to know
about the create_disposition, but given that we have pathname resolution
separated from the core open code right now this is the best we can do.

Signed-off-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-09 12:22:00 -07:00
Stefan Metzmacher
8defcb8bd1 Revert "s3:smbd: include smbXsrv.h before smbd/proto.h to have the smbXsrv_ structs available"
This reverts commit 98ccca8dca.

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 10 17:35:38 CEST 2012 on sn-devel-104
2012-08-10 17:35:38 +02:00
Stefan Metzmacher
0e76bbc520 Revert "s3:smbd: Include smbXsrv.h before vfs.h (in smbd.h) so that the smbXsrv structures are available"
This reverts commit e332bfaff5.
2012-08-10 15:56:33 +02:00
Volker Lendecke
ff701ceae2 s3: Add vfs_aio_posix
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:41:36 -07:00
Michael Adam
e332bfaff5 s3:smbd: Include smbXsrv.h before vfs.h (in smbd.h) so that the smbXsrv structures are available
This is currently needed for files_struct and connection_struct
that contain backlinks to smbXsrv_open and smbXsrv_tcon, respectively.
Finally, these backlinks to the smb level structures should be removed.
2012-07-03 13:39:41 +02:00
Michael Adam
98ccca8dca s3:smbd: include smbXsrv.h before smbd/proto.h to have the smbXsrv_ structs available 2012-07-03 13:39:40 +02:00
Stefan Metzmacher
21e6db8f7e s3:smbd: change trans_state->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
9e2e3708aa s3:smbd: move forward declaration of struct aio_extra to smbd.h
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
5306c18f2c s3:smbd: move UCF_ defines to smbd.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
5fc502c624 s3:include: move struct connection_struct (and sub structs) to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
44482ad452 s3:smbd: move struct trans_state to smbd.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
ce41497769 s3:smbd: move struct privilege_paths to smbd.h
metze
2012-06-06 10:18:37 +02:00
Günther Deschner
2377039738 s3-locking: move locking prototypes out of proto.h.
Will later become part of locking.h

Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
ef990a1701 s3-smbd: add smbd.h and move smbd prototypes to smbd/proto.h.
Guenther
2011-03-30 01:13:08 +02:00