summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Factor code out of check_user_ok() into a call to check_user_share_access().Jeremy Allison2013-01-091-34/+7
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Initialize stack variables. Prelude to factoring out calls to ↵Jeremy Allison2013-01-091-2/+2
| | | | | | | | check_user_share_access(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add check_user_share_access() which factors out the share security and ↵Jeremy Allison2013-01-092-0/+60
| | | | | | | | | | | read_only flag setting code. Allows this to be called from both make_connection_snum() as well as check_user_ok(). Gives a consistent share security check function. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Correctly setup the conn->share_access based on the current user token.Jeremy Allison2013-01-091-12/+22
| | | | | | | | | | Also use this to set conn->read_only. Cache the share_access in the struct vuid_cache_entry struct so we only evaluate this once per new user access on this share. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Change API for create_share_access_mask() - remove conn struct.Jeremy Allison2013-01-092-7/+7
| | | | | | | | | Eventually this will be indepentent of conn, just pass in the readonly flag. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Change API for create_share_access_mask() to pass in the token.Jeremy Allison2013-01-092-4/+9
| | | | | | | | Don't automatically use the one from conn->session_info->security_token. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix API for create_share_access_mask().Jeremy Allison2013-01-092-9/+12
| | | | | | | | | Return the uint32_t share_access rather than directly changing the conn struct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove static from create_share_access_mask().Jeremy Allison2013-01-092-1/+2
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add uint32_t share_access to vuid_cache_entry.Jeremy Allison2013-01-093-0/+4
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Clean up struct connection_struct, make struct vuid_cache a pointer not inline.Jeremy Allison2013-01-094-10/+15
| | | | | | | | Change VFS ABI to 31 for 4.1.0. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove unneeded variable "const struct auth_session_info *session_info"Jeremy Allison2013-01-091-3/+1
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove dead code now vuser can no longer be NULL.Jeremy Allison2013-01-091-8/+0
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove the second set of {} braces, no longer needed.Jeremy Allison2013-01-091-20/+18
| | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove one set of enclosing {} braces, no longer needed.Jeremy Allison2013-01-091-9/+7
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Move the definition of struct vuid_cache_entry *ent outside blocks.Jeremy Allison2013-01-091-4/+2
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Start to tidy-up check_user_ok().Jeremy Allison2013-01-091-3/+2
| | | | | | | | | Now we have removed "security=share" we cannot be called with vuid == UID_FIELD_INVALID. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture/vfstest.c: Always use create_conn_struct(). Don't hand create ↵Jeremy Allison2013-01-091-10/+22
| | | | | | | | connection structs. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* source3/smbd/pysmbd.c: Always use create_conn_struct(). Don't hand create ↵Jeremy Allison2013-01-091-24/+10
| | | | | | | | connection structs. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd/posix_acls.c: Use create_conn_struct(). Don't hand-create connection ↵Jeremy Allison2013-01-091-19/+11
| | | | | | | | structs. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Allow create_conn_struct() to be called with snum == -1.Jeremy Allison2013-01-091-4/+9
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Rework create_conn_struct to use conn_new()Andrew Bartlett2013-01-091-22/+18
| | | | | | | | | | | This avoids issues with required structure elements not being initialised. In particular, once conn->vuid_cache becomes a pointer, this ensures that it is initalised in all cases. Andrew Bartlett Reviewed by: Jeremy Allison <jra@samba.org>
* smbd: Fix bug 9549 -- Memleak in the async echo handlerVolker Lendecke2013-01-081-1/+1
| | | | | | | Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jan 8 23:30:41 CET 2013 on sn-devel-104
* samba-tool Add --service argument to samba-tool ntacl get/setAndrew Bartlett2013-01-081-6/+10
| | | | | | | | | | | This also ensures a VFS connect is done to the correct service. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jan 8 03:39:21 CET 2013 on sn-devel-104
* pysmbd: Change to keyword based argumentsAndrew Bartlett2013-01-072-27/+47
| | | | Reviewed-by: Jeremy Allison <jra@samba.org>
* scripting-provision: Set sysvol ACLs on the sysvol shareAndrew Bartlett2013-01-071-14/+23
| | | | | | | | | | This allows us to correctly load any modules that have been specified by the smb.conf for [sysvol] and issue a VFS connect operation which may be required by some VFS modules. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* scripting-ntacls: Optionally allow the service to be specified.Andrew Bartlett2013-01-071-6/+6
| | | | | | | | | | Providing a service allows a VFS connect to be issued on the correct service, and so ensures that the correct modules are loaded rather than just what is specified in [globals]. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* pysmbd: Convert pysmbd to take an optional service to connect toAndrew Bartlett2013-01-072-127/+159
| | | | | | | | | This uses create_conn_struct to correctly call VFS_CONNECT(), but only if a service has been specified. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Fix calls to create_conn_struct_cwd to be correctly indented.Andrew Bartlett2013-01-073-44/+44
| | | | | | | | 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-074-21/+58
| | | | | | | | | | | 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>
* spoolss: add stubs for new JobNamedProperty dcerpc calls.Günther Deschner2013-01-073-0/+101
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 7 19:06:25 CET 2013 on sn-devel-104
* spoolss: add SPOOLSS_DRIVER_VERSION_2012 (4) define to IDL.Günther Deschner2013-01-071-1/+2
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* spoolss: add Windows ARM architecture defines to IDL.Günther Deschner2013-01-071-0/+4
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* tdb: Fix undefined prototype warningsVolker Lendecke2013-01-071-0/+2
| | | | | | | | | | These functions are deliberately left without prototypes according to 3fdeaa399, but without prototypes we get warnings. Reviewed-by: Rusty Russell <rusty@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jan 7 11:20:19 CET 2013 on sn-devel-104
* tdb: Fix \n in error messagesVolker Lendecke2013-01-071-2/+2
| | | | Reviewed-by: Rusty Russell <rusty@samba.org>
* s3-net: Fix rpc_service_list_internal() null pointer passing.Andreas Schneider2013-01-021-2/+13
| | | | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Found by Coverity. Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Jan 2 14:19:50 CET 2013 on sn-devel-104
* s3-rpcclient: Fix cmd_eventlog_loginfo() null pointer passing.Andreas Schneider2013-01-021-2/+8
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Found by Coverity.
* s3-rpcclient: Fix cmd_eventlog_readlog() null pointer passing.Andreas Schneider2013-01-021-7/+8
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Found by Coverity.
* s3-idmap: Check return value of string_to_sid().Andreas Schneider2013-01-021-1/+6
| | | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* docs: Fix typo in vfs_tsmsm.8.xml.Samba-JP oota2013-01-021-1/+1
| | | | | | | Reviewed-by: Karolin Seeger <kseeger@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Wed Jan 2 12:12:12 CET 2013 on sn-devel-104
* docs: Remove superfluous bracket.Samba-JP oota2013-01-021-1/+1
| | | | Reviewed-by: Karolin Seeger <kseeger@samba.org>
* s4:drsuapi: try to behave more like windows for usn order (bug #9508)Stefan Metzmacher2013-01-011-11/+18
| | | | | | | | | | | | | | We don't behave completely like a Windows server, but it's much more identical than before. The partition head is always the first object followed by the rest sorted by uSNChanged. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jan 1 21:09:42 CET 2013 on sn-devel-104
* s4:drsuapi: make use of LDB_TYPESAFE_QSORT() and pass getnc_stateStefan Metzmacher2013-01-011-10/+14
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: make sure we report the meta data from the cycle start (bug #9508)Stefan Metzmacher2013-01-011-9/+38
| | | | | | | | | | | We should build the final highwatermark and uptodatevector of a replication cycle at the start of the cycle. Before we search for the currently missing objects. Otherwise we risk that some objects get lost. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: check the source_dsa_invocation_id (bug #9508)Stefan Metzmacher2013-01-011-0/+15
| | | | | | | | The given highwatermark is only valid relative to the specified source_dsa_invocation_id. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: make sure we never return the same highwatermark twice in a ↵Stefan Metzmacher2013-01-011-0/+36
| | | | | | | | | | | replication cycle (bug #9508) If the highwatermark given by the client is not the one we expect, we need to start a new replication cycle. Otherwise the destination dsa skips objects and linked attribute values. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: add drsuapi_DsReplicaHighWaterMark_cmp()Stefan Metzmacher2013-01-011-0/+20
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: always use the current uptodateness_vectorStefan Metzmacher2013-01-011-11/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: avoid a ldb_dn_copy() and use talloc_move() insteadStefan Metzmacher2013-01-011-3/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: remove unused 'highest_usn' from drsuapi_getncchanges_stateStefan Metzmacher2013-01-011-4/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:drsuapi: move struct drsuapi_getncchanges_state to the top of getncchanges.cStefan Metzmacher2013-01-011-17/+17
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>