summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server/srvsvc
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* s3: rpc_server/srvsvc: added routines to compute opens on share connections.Shekhar Amlekar2014-04-031-0/+49
| | | | | | | | | Added routines count_share_opens() and share_file_fn() to count opens on share connections. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3: rpc_server/srvsvc: Added routines to count share connections.Shekhar Amlekar2014-04-031-0/+64
| | | | | | | | | Added routines count_share_conns() and share_conn_fn() to count connections to a share. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* param: change fstype to use a constant stringGarming Sam2014-02-121-1/+1
| | | | | | | | Substitution isn't really necessary for this parameter. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: rename lp function and variable from "delete_share_cmd" to ↵Garming Sam2014-02-071-2/+2
| | | | | | | | "delete_share_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "change_share_cmd" to ↵Garming Sam2014-02-071-3/+3
| | | | | | | | "change_share_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "add_share_cmd" to ↵Garming Sam2014-02-071-2/+2
| | | | | | | | "add_share_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "serverstring" to "server_string"Garming Sam2014-02-071-2/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from 'guestaccount' to 'guest_account'Garming Sam2014-02-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: rpc_server/srvsvc: NetShareSetInfo - let CSC policy be settable.Shekhar Amlekar2014-02-061-8/+24
| | | | | | | | | | The current code simply denies changing the csc policy through RPC calls. Change that to allow changing the csc policy and call the 'change share command' when a SetInfo RPC call changes the setting. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3: rpc_server/srvsvc: NetShareSetInfo - Correctly initialize ↵Shekhar Amlekar2014-02-061-0/+2
| | | | | | | | max_connections for info levels != 2 before calling the change share script. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* loadparm: rename lp[cfg]_print_ok to lp[cfg]_printable for consistency with docsMichael Adam2014-02-031-3/+3
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* loadparm: rename lp[cfg]_pathname to lp[cfg]_path for consistency with docsMichael Adam2014-02-031-13/+13
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s3: rpc_server/srvsvc: Avoiding the loop around locking tdb traversal.Shekhar Amlekar2014-01-181-49/+6
| | | | | | | | | | | | | | | | The current code for determining the number of open files iterates over the session list and for each session it traverses the locking tdb to get the open files. This scales badly for a large server with many sessions and open files. Instead, get the list of sessions first, and then determine the number of open files on all sessions in a single traversal of locking tdb. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> 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): Sat Jan 18 01:11:32 CET 2014 on sn-devel-104
* s3: rpc_server/srvsvc: Adding functions to determine open files on all sessions.Shekhar Amlekar2014-01-171-0/+55
| | | | | | | | | Introduce helper functions for counting the number of open files on an array of sessions. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: rpc_server/srvsvc: Ensure we don't continually realloc inside ↵Jeremy Allison2014-01-171-11/+22
| | | | | | | | | init_srv_sess_info_1(). Just allocate the return value directly. Makes iteration of open files much easier. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpc_server: Fix a typoVolker Lendecke2013-10-301-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Add brl_num_locks access functionVolker Lendecke2013-09-111-1/+1
|
* s3: rpc_server/srvsvc: use find_sessions() in NetSessDelShekhar Amlekar2013-09-101-17/+14
| | | | | | | | instead of using list_sessions(), use find_sessions() that builds the list of only the sessions of interest. Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Slightly simplify enum_file_close_fnVolker Lendecke2013-09-061-2/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 6 15:29:55 CEST 2013 on sn-devel-104
* s3: smbd/connection: added routines to compute share connectionsShekhar Amlekar2013-08-131-1/+47
| | | | | | | | | | | Added routines to compute share connections and used it in srvsvc NetShareEnum call. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 13 07:42:23 CEST 2013 on sn-devel-104
* srvsvc: Use a symbolic constant where we have oneVolker Lendecke2013-07-111-1/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server/srvsvc check access before doing workShekhar Amlekar2013-05-141-10/+10
| | | | | | | | | | | | Before doing the (potentially) costly enumerations, check if the user has necessary privileges first Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Tue May 14 16:22:24 CEST 2013 on sn-devel-104
* smbd: Fix calls to create_conn_struct_cwd to be correctly indented.Andrew Bartlett2013-01-071-10/+10
| | | | | | | | These are whitespace changes only, left out of the previous commit to preserve clarity. Andrew Bartlett. Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Split create_conn_struct into a fn that does not change the working dirAndrew Bartlett2013-01-071-2/+2
| | | | | | | | | | | The python bindings do not want the current working directory changed during operations, so we provide two functions, one providing the original behaviour, and other providing the python bindings with just the memory allocation and initilisation stuff. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server/srvsvc: remove function net_enum_pipes()Gregor Beck2012-10-191-97/+0
| | | | | | | | The relevant records are not written to connections.tdb since commit a781b78417b6d7b875230dd2edcb932445aa4197 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* rpc_server:srvsvc Remove psd variable that was no longer set by ↵Andrew Bartlett2012-10-111-5/+3
| | | | | | | | | | | SMB_VFS_FGET_NT_ACL This fixes up an error introduced by c8ade07760ae0ccfdf2d875c9f3027926e62321b. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Oct 11 07:53:36 CEST 2012 on sn-devel-104
* smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett2012-10-111-8/+8
| | | | | | | | | | | This makes it clear which context the returned SD is allocated on, as a number of callers do not want it on talloc_tos(). As the ACL transformation allocates and then no longer needs a great deal of memory, a talloc_stackframe() call is used to contain the memory that is not returned further up the stack. Andrew Bartlett
* Make sure the returned sd is on the right context, and if not it's always freed.Jeremy Allison2012-10-091-1/+3
| | | | | Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 9 23:35:50 CEST 2012 on sn-devel-104
* Move setting of psd->dacl->revision and protect against null SD's.Jeremy Allison2012-10-091-2/+4
|
* Change the other two places where we set a security descriptor given by the ↵Jeremy Allison2012-08-301-20/+1
| | | | | | client to got through set_sd(), the canonicalize sd function.
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-48/+49
| | | | | | | | | | 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>
* s3-rpc_server: Make it possible to use more rpc exceptions.Andreas Schneider2012-07-061-35/+35
|
* s3:util: rename procid_equal() to serverid_equal()Michael Adam2012-06-211-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:lib: split things into a conn_tdb.hStefan Metzmacher2012-06-051-0/+1
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jun 5 19:28:35 CEST 2012 on sn-devel-104
* s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'Stefan Metzmacher2012-05-241-2/+8
| | | | metze
* lib/util: Remove dummy wrapper for getpwnam().Jelmer Vernooij2012-03-241-1/+1
|
* s3:smbd: use connections_snum_used() instead of conn_snum_used() for ↵Stefan Metzmacher2011-12-131-1/+1
| | | | | | | | | load_usershare_shares() Before removing the share security descriptor, we should make sure there're really no active users anymore. metze
* s3:param: don't reference conn_snum_used directly in load_usershare_shares()Stefan Metzmacher2011-12-131-1/+1
| | | | | | This uses the same logic as lp_killunused(). metze
* s3: Use autogenerated open_files.idlVolker Lendecke2011-12-021-0/+1
|
* s3:rpc_server: convert srvsvc to only use dbwrap wrapper functionsMichael Adam2011-10-111-2/+5
| | | | Avoid direct use of the db_record and db_context structs.
* s3: Remove the smbd_server_conn ref from create_conn_structVolker Lendecke2011-09-261-6/+6
|
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett2011-07-201-12/+12
| | | | | | | | | | | | | | | | 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>
* s3: Return "granted" from share_access_checkVolker Lendecke2011-07-051-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Fix an enum/int mixupVolker Lendecke2011-07-041-9/+10
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Jul 4 18:47:59 CEST 2011 on sn-devel-104
* s3-param Remove 'announce version' parameterAndrew Bartlett2011-06-231-4/+4
| | | | | | | | The only users I can find of this on the internet involve confused users, and our own documentation recommends never setting this. Don't confuse our users any longer. Andrew Bartlett
* tdb_traverse/tdb_traverse_read: check returns for negative, not -1.Rusty Russell2011-06-201-1/+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>