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

43 Commits

Author SHA1 Message Date
Ralph Boehme
b74653f2cd smbd: add twrp arg to synthetic_smb_fname()
Most places take twrp from a local struct smb_filename variable that the
function is working on. Some don't for various reasons:

o synthetic_smb_fname_split() is only called in very few places where we don't
  expect twrp paths

o implementations of SMB_VFS_GETWD(), SMB_VFS_FS_CAPABILITIES() and
  SMB_VFS_REALPATH() return the systems view of cwd and realpath without twrp info

o VFS modules implementing previous-versions support (vfs_ceph_snapshots,
  vfs_shadow_copy2, vfs_snapper) synthesize raw paths that are passed to VFS NEXT
  functions and therefor do not use twrp

o vfs_fruit: macOS doesn't support VSS

o vfs_recycle: in recycle_create_dir() we need a raw OS path to create a directory

o vfs_virusfilter: a few places where we need raw OS paths

o vfs_xattr_tdb: needs a raw OS path for SMB_VFS_NEXT_STAT()

o printing and rpc server: don't support VSS

o vfs_default_durable_reconnect: no Durable Handles on VSS handles, this might
  be enhances in the future. No idea if Windows supports this.

o get_real_filename_full_scan: hm.... FIXME??

o get_original_lcomp: working on a raw path

o msdfs: doesn't support VSS

o vfs_get_ntquota: synthesizes an smb_filename from ".", so doesn't support VSS
  even though VFS modules implement it

o fd_open: conn_rootdir_fname is a raw path

o msg_file_was_renamed: obvious

o open_np_file: pipes don't support VSS

o Python bindings: get's a raw path from the caller

o set_conn_connectpath: raw path

o set_conn_connectpath: raw path

o torture: gets raw paths from the caller

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-05 19:18:40 +00:00
Ralph Boehme
917b8a47ec s3/printing: realign synthetic_smb_fname() args in print_spool_open()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-05 19:18:39 +00:00
Ralph Boehme
cb996cd5a3 smbd: move files_struct.is_directory to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
65a4302474 smbd: move files_struct.modified to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
b95c62bc90 smbd: move files_struct.can_write to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
8b48969241 smbd: move files_struct.can_read to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
d22096961b smbd: move files_struct.can_lock to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +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
f7619ac22b smbdotconf: mark "path" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Jeremy Allison
364175b359 s3: smbd: printing: Re-implement delete-on-close semantics for print files missing since 3.5.x.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13457

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun  1 20:32:03 CEST 2018 on sn-devel-144
2018-06-01 20:32:03 +02:00
Gary Lockyer
3bc5685445 rpc: Always supply both the remote and local address to the auth subsystem
This ensures that gensec, and then the NTLM auth subsystem under it, always gets the
remote and local address pointers for potential logging.

The local address allows us to know which interface an authentication is on

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
2017-03-29 02:37:27 +02:00
Stefan Metzmacher
9b3937704d s3:printing: remove double PRINT_SPOOL_PREFIX define
We already have this in source3/include/printing.h
which is also included in source3/printing/printspoolss.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-12-21 18:35:12 +01:00
Jeremy Allison
dc5dad4813 s3: Filenames: Add uint32_t flags parameter to synthetic_smb_fname().
Get it from parent/deriving smb_filename if present.
Use 0 (as usually this a Windows-style lookup) if
not.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Richard Sharpe
1dd9d13e21 Convert all (remaining) uses of uint32/16/8 to _t in source3/printing.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-12 01:32:12 +02:00
Poornima Gurusiddaiah
72f9932d4f s3:printing: Fix a possible NULL dereference.
Coverity-Id: 710708

Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-24 09:51:31 +05:30
Michael Adam
d85bab275a loadparm: rename lp[cfg]_pathname to lp[cfg]_path for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:26:13 +13:00
Günther Deschner
6886cff0a7 s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_interface().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:29:59 +02:00
Volker Lendecke
235a309fc1 smbd: Convert print_spool_open to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:03 -07:00
Andreas Schneider
90cbfc96d1 Make sure to set umask() before calling mkstemp().
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Mar  6 01:16:34 CET 2013 on sn-devel-104
2013-03-06 01:16:34 +01:00
Günther Deschner
11fba10208 spoolss: make spoolss deal with ndr64 StartDocPrinter by using proper container object.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:25 +01:00
Andreas Schneider
c12cc3cf9c s3fs-printing: Fix RAW printing for normal users.
This fixes bug #8769.

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct  8 16:11:51 CEST 2012 on sn-devel-104
2012-10-08 16:11:51 +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
David Disseldorp
1cd2433e8d s3-spoolss: remove duplicate "." in smbd spooler path 2012-06-26 16:10:39 +02:00
Stefan Metzmacher
484cb4e43e s3:printing: let print_spool_open() take a uint64_t vuid
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
d1d7904182 s3:printing: add print_spool_rap_jobid()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
6d2d8f5444 s3:printing: make struct print_file_data private to printspoolss.c
metze
2012-06-06 10:18:37 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Volker Lendecke
740d4d7550 s3: files_struct->mode is only written, remove it
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Feb 14 19:14:29 CET 2012 on sn-devel-104
2012-02-14 19:14:29 +01:00
Andreas Schneider
541f3cf639 s3-rpc_server: Migrate rpc function to tsocket_address.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:58 +10:00
Günther Deschner
c9f3a2c83e s3-printing: run minimal_includes.pl.
Guenther
2011-05-05 02:05:27 +02:00
Günther Deschner
9824e2e5ee s3-rpc_client: add and use rpc_client/rpc_client.h.
Guenther
2011-04-13 22:23:59 +02:00
Volker Lendecke
0f08e9d922 s3: Fix print_spool_end
We have to use the spoolss pipe instance opened in print_spool_open, otherwise
the spoolss server won't be able to find the right printer and job.
2011-04-05 12:26:29 +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
Stefan Metzmacher
7a2fa9fc1c s3:printing: use dcerpc_spoolss_X() functions
metze

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Fri Jan 21 13:14:49 CET 2011 on sn-devel-104
2011-01-21 13:14:49 +01:00
Günther Deschner
94e83e385e s3-printing: fix crash bug in print_spool_open().
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 22 14:21:58 CET 2010 on sn-devel-104
2010-12-22 14:21:58 +01:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
480c97b5b1 s3-printing: fix print_spool_terminate().
Simo, Andreas, please check.

Guenther
2010-09-15 13:18:27 +02:00
Simo Sorce
8ec7aaef48 s3-rpc_server: Moved ncacn_np declarations in common header file.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
5685914344 s3-rpc_server: Convert rpc_connect_spoolss_pipe into a generic interface.
This way we have one common way to open internal pipes whether they
are shortcircuited or piped to an external process.
2010-09-15 12:53:42 +02:00
Simo Sorce
849cc65654 s3-smbd: Migrated to new spoolss functions for printing.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:13 -04:00
Simo Sorce
660506d359 s3-printing: Handled case when smbd spools a file on behalf of spoolss. 2010-07-27 10:27:13 -04:00
Simo Sorce
38d6274864 s3-smbd: Added code to print via spoolss. 2010-07-27 10:27:12 -04:00