summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: rename talloc_sub_advanced() to talloc_sub_full()Ralph Boehme2019-11-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lib: Remove #define serverid_equal server_id_equalVolker Lendecke2019-11-061-2/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove some unused includesVolker Lendecke2019-04-111-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: add twrp args to filename_convert()Ralph Boehme2018-11-271-0/+2
| | | | | | | | | All existing callers pass NULL, no change in behaviour. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Rename server_messaging_context() to global_messaging_context()Christof Schmitt2018-09-071-2/+2
| | | | | | | | | | | This reflects that the messaging context is also used outside of the server processes. The command used for the rename: find . -name '*.[hc]' -print0 | xargs -0 sed -i 's/server_messaging_context/global_messaging_context/' Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbd: Pass "share_mode_data" to share_entry_forall callbackVolker Lendecke2018-07-261-30/+28
| | | | | | | Quite a bit of the contents have been passed explicitly anyway. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server/srvsvc: _srvsvc_NetSetFileSecurity form_junctions() to use ↵Stefan Metzmacher2018-06-141-16/+7
| | | | | | | create_conn_struct_tos_cwd() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server/srvsvc: _srvsvc_NetGetFileSecurity() to use ↵Stefan Metzmacher2018-06-141-16/+7
| | | | | | | create_conn_struct_tos_cwd() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server/srvsvc: add an explicit talloc_stackframe() to ↵Stefan Metzmacher2018-06-141-7/+6
| | | | | | | | | _srvsvc_NetSetFileSecurity() This makes further changes simpler. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server/srvsvc: add an explicit talloc_stackframe() to ↵Stefan Metzmacher2018-06-141-7/+6
| | | | | | | | | _srvsvc_NetGetFileSecurity() This makes further changes simpler. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* printing: remove unused arguments from delete_and_reload_printers()Stefan Metzmacher2018-06-141-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server: Fix size types in srvsvcAndreas Schneider2018-03-201-4/+4
| | | | | | | This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* srvsvc: Avoid a dependency on share_mode_entry->idVolker Lendecke2018-02-131-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Pass "file_id" explicitly into share_mode_entry_to_message()Volker Lendecke2018-02-131-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* srvsvc: Use the passed-in file_idVolker Lendecke2018-02-131-1/+1
| | | | | | | The one in share_mode_entry will go Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Pass in "file_id" into share_mode_str()Volker Lendecke2018-02-131-3/+2
| | | | | | | This used to directly access share_entry->id, which will go Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* srvsvc: Use the passed-in file id, not the one from share_mode_entryVolker Lendecke2018-02-131-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Pass "file_id" through share_entry_forallVolker Lendecke2018-02-131-1/+5
| | | | | | | It's also in the share_entry, but that is redundant and will go Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use messaging_send_all instead of message_send_allVolker Lendecke2017-12-051-4/+4
| | | | | | | Just a global search&replace Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging: Remove the "n_sent" arg from message_send_allVolker Lendecke2017-12-051-5/+3
| | | | | | | | The only user of this is an informative message in smbcontrol. I don't think that's worth the effort. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Updated error message text and reduced its debug levelMarc Muehlfeld2017-10-121-2/+2
| | | | | | | | | | | Previously, "net rpc share add|remove" commands failed if no "add|delete share command" parameter was set in smb.conf. However, the error was only logged at level 10 and not very clear. This patch updates the error message text and sets the log level of this error to 1 to make it more obvious what is missing. Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: VFS: Change SMB_VFS_CHDIR to use const struct smb_filename * instead of ↵Jeremy Allison2017-07-011-21/+10
| | | | | | | | | | 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>
* s3: smbd: We can now remove the 'bool dfs_path' parameter from ↵Jeremy Allison2017-05-221-2/+0
| | | | | | | filename_convert(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* lib: Add lib/util/server_id.hVolker Lendecke2017-01-221-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* Update smbrun to allow for settings environment variables.Trever L. Adams2016-10-131-3/+6
| | | | | | | | | Signed-off-by: Trever L. Adams <trever.adams@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 13 04:26:26 CEST 2016 on sn-devel-144
* werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in ↵Günther Deschner2016-09-281-9/+9
| | | | | | | | | source3/rpc_server/ Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_NET_NAME_NOT_FOUND with WERR_NERR_NETNAMENOTFOUND in ↵Günther Deschner2016-09-281-6/+6
| | | | | | | | | source3/rpc_server/srvsvc/srv_srvsvc_nt.c Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_OBJECT_PATH_INVALID with WERR_BAD_PATHNAME in ↵Günther Deschner2016-09-281-2/+2
| | | | | | | | | source3/rpc_server/ Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in ↵Günther Deschner2016-09-281-1/+1
| | | | | | | | | source3/rpc_server/ Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_NO_SUCH_SHARE with WERR_BAD_NET_NAME in ↵Günther Deschner2016-09-281-1/+1
| | | | | | | | | source3/rpc_server/srvsvc/srv_srvsvc_nt.c Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/rpc_server/Günther Deschner2016-09-281-17/+17
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/rpc_client/Günther Deschner2016-09-281-3/+3
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Move "message_send_all" to serverid.cVolker Lendecke2016-07-281-0/+1
| | | | | | | | | Trying to trim down messages.c a bit: Sending to all processes that are registered in serverid.tdb and filtering to me is not really logic of general messaging but more of the serverid code. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/rpc_server/srvsvc/srv_srvsvc_nt.c: change snum to signed intAurelien Aptel2016-03-041-1/+2
| | | | | | | | | | | snum is used to store the result of the find_service() call which returns a signed int, with -1 being an error. with an uint32_t the error check (< 0) is always false. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Jeremy Allison <jra@samba.org>
* access based share enum: handle permission set in configuration filesAlberto Maria Fiaschi2016-03-021-5/+12
| | | | | | | | | | | change function is_enumeration_allowed to check permissions set by fields: valid users, invalid users, only user. BUG: https://bugzilla.samba.org/show_bug.cgi?id=8093 Signed-off-by: Alberto Maria Fiaschi <alberto.fiaschi@estar.toscana.it> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: smbd: Remove lp_posix_pathnames() checks on paths sent in via old Win9X ↵Jeremy Allison2015-12-231-2/+2
| | | | | | | | | RPC calls. No unix client makes these. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: In srv_srvsvc_nt.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if ↵Jeremy Allison2015-12-231-2/+2
| | | | | | | lp_posix_pathnames() requested. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <rb@sernet.de>
* s3: smbd: In srv_srvsvc_nt.c Use ucf_flags variable instead of passing as ↵Jeremy Allison2015-12-231-2/+4
| | | | | | | | | | parameter. This will allow us to move lp_posix_pathnames() out of unix_convert() later. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <rb@sernet.de>
* s3:smbstatus: add stream name to share_entry_forall()Ralph Boehme2015-10-121-6/+15
| | | | | | | | | | Add stream name argument to share_entry_forall machinery so smbstatus can print the stream name of a file. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11550 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Covert all uint32/16/8 to _t in source3/rpc_server.Richard Sharpe2015-05-151-10/+10
| | | | | | | This can be committed regardless of the state of the PIDL changes. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpc_server/srvsvc: Fix CID 241162 Logically dead codeAnoop C S2015-04-171-1/+1
| | | | | | Signed-off-by: Anoop C S <achiraya@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs: add create tags to SMB_VFS_CREATEFILERalph Boehme2014-12-041-2/+4
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* srv_srvsvc_nt: remove unneeded get_share_params() callDavid Disseldorp2014-11-261-8/+3
| | | | | | | | The snum and share name are already determined via the prior find_service() call. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:locking: allow early return for share_entry_forall()Volker Lendecke2014-10-311-20/+26
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Rename share_mode_forall->share_entry_forallVolker Lendecke2014-10-311-4/+4
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* vfs3: Pass "lease" through SMB_VFS_CREATE_FILEVolker Lendecke2014-08-111-0/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* printing: only reload printer shares on client enumDavid Disseldorp2014-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, automatic printer share updates are handled in the following way: - Background printer process (BPP) forked on startup - Parent smbd and per-client children await MSG_PRINTER_PCAP messages - BPP periodically polls the printing backend for printcap data - printcap data written to printer_list.tdb - MSG_PRINTER_PCAP sent to all smbd processes following update - smbd processes all read the latest printer_list.tdb data, and update their share listings This procedure is not scalable, as all smbd processes hit printer_list.tdb in parallel, resulting in a large spike in CPU usage. This change sees smbd processes only update their printer share lists only when a client asks for this information, e.g. via NetShareEnum or EnumPrinters. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Suggested-by: Volker Lendecke <vl@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: srvsvc pipe - We should return WERR_BADFILE in _srvsvc_NetShareAdd if ↵Jeremy Allison2014-04-221-0/+11
| | | | | | | | | | | the path does not exist. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Apr 22 22:19:18 CEST 2014 on sn-devel-104
* s3: rpc_server/srvsvc: count open files in NetConnEnumShekhar Amlekar2014-04-031-11/+47
| | | | | | | | | Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 3 21:19:43 CEST 2014 on sn-devel-104
* s3: rpc_server/srvsvc: count share connections in NetConnEnumShekhar Amlekar2014-04-031-9/+45
| | | | | | Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>