summaryrefslogtreecommitdiffstats
path: root/source3/smbd/proto.h
Commit message (Collapse)AuthorAgeFilesLines
* vfs: remove unused function vfs_pread_data()Michael Adam2014-06-131-2/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Convert samba_private_attr_name() to a public functionRalph Boehme2014-06-131-0/+1
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbd: Remove open_file_fchmod().Jeremy Allison2014-05-021-3/+0
| | | | | | | | | | | | | | No longer used (hurrah!). Bug 10564 - Lock order violation and file lost https://bugzilla.samba.org/show_bug.cgi?id=10564 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 2 23:47:38 CEST 2014 on sn-devel-104
* smbd: Pass timespec_current through the notify_callbackVolker Lendecke2014-04-231-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Move full_path_tos to util_str.cVolker Lendecke2014-04-231-3/+0
| | | | | | | This can be useful elsewhere Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: let srvstr_pull_req_talloc() take 'const uint8_t *src'Stefan Metzmacher2014-04-021-1/+1
| | | | | | | | | | This is the correct thing to do the smb request buffer contains just bytes (uint8_t). It also avoids strange casting in the callers. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Implement and use full_path_tosVolker Lendecke2013-12-141-0/+3
| | | | | | | | Yes, this looks like a hack, but talloc_asprintf does show up high in profiles called from these routines Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-lib: smbclient shows no error if deleting a directory with del failedJeremy Allison2013-11-141-1/+0
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260 Move dir_check_ftype() to util.c Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-smbd: smbclient shows no error if deleting a directory with del failedJeremy Allison2013-11-141-1/+1
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260 Remove unneeded conn argument to dir_check_ftype(). Move to correct uint32_t types. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-smbd: Do not declare change_to_root_user() twice.Andreas Schneider2013-10-291-1/+0
| | | | | | | This is already in include/proto.h for smbd_shim. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-smbd_shim: Add become_authenticated_pipe_user().Andreas Schneider2013-10-291-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Remove separate oplock_type parameter from set_file_oplockVolker Lendecke2013-10-241-1/+1
| | | | | | | | This avoids the question where it could happen that something else but fsp->oplock_type might be useful as an argument here. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Make release_file_oplock staticVolker Lendecke2013-10-241-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3:smbd/session: Added a routine find_sessions()Shekhar Amlekar2013-09-101-0/+2
| | | | | | | | this routine builds a list of sessions from a particular remote machine or user. Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Apply some const to message_to_share_mode_entryVolker Lendecke2013-09-061-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Remove unused should_notify_deferred_opensVolker Lendecke2013-09-061-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Make break_level2_to_none_async staticVolker Lendecke2013-08-161-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Add the ability to send an NTSTATUS result back with a trans2 reply so we ↵Jeremy Allison2013-07-191-0/+1
| | | | | | | | | | | | | can return a parameter block with an error code. This is needed when returning a STATUS_INVALID_NAME result (tested from Windows 2012). Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: We don't use DEFERRED_OPEN_ENTRY anymoreVolker Lendecke2013-04-261-2/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused reply_to_oplock_break_requestsVolker Lendecke2013-04-261-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Cleanup. Remove unused function dptr_DirCacheAdd(). Make DirCacheAdd() static.Jeremy Allison2013-04-161-2/+0
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Apr 16 12:05:13 CEST 2013 on sn-devel-104
* s3:smbd: convert srvstr_pull_req_talloc() into a functionRalph Wuerthner2013-04-101-0/+2
| | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: add some const to req_is_in_chain()Stefan Metzmacher2013-03-201-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: s/struct timed_event/struct tevent_timerStefan Metzmacher2013-02-191-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: s/struct event_context/struct tevent_contextStefan Metzmacher2013-02-191-4/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: split out file_fsp_get from file_fsp_smb2David Disseldorp2013-01-161-0/+3
| | | | | | | Obtain the files_struct from smb2req, persistent_id and volatile_id. Reviewed by: Jeremy Allison <jra@samba.org>
* Move create_share_access_mask() from smbd/service.c to smbd/uid.c.Jeremy Allison2013-01-091-3/+0
| | | | | | | | Make it static. Only called from uid.c now. 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-091-0/+4
| | | | | | | | | | | 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>
* Change API for create_share_access_mask() - remove conn struct.Jeremy Allison2013-01-091-2/+2
| | | | | | | | | 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-091-1/+3
| | | | | | | | 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-091-1/+1
| | | | | | | | | 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-091-0/+1
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pysmbd: Convert pysmbd to take an optional service to connect toAndrew Bartlett2013-01-071-2/+3
| | | | | | | | | 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: Split create_conn_struct into a fn that does not change the working dirAndrew Bartlett2013-01-071-2/+9
| | | | | | | | | | | 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>
* Remove unused append_parent_acl().Jeremy Allison2012-12-041-3/+0
| | | | | | | | | | Get rid of a large chunk of unused code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Dec 4 11:59:30 CET 2012 on sn-devel-104
* smbd: Remove NT4 compatability handling in posix -> NT ACL conversionAndrew Bartlett2012-11-131-1/+0
| | | | | | | | | | | | | | | | | NT4 is long dead, and we should not change which ACL we return based on what we think the client is. The reason we should not do this, is that if we are using vfs_acl_xattr then the hash will break if we do. Additionally, it would require that the python VFS interface set the global remote_arch to fake up being a modern client. This instead seems cleaner and removes untested code (the tests are updated to then handle the results of the modern codepath). The supporting 'acl compatability' parameter is also removed. Andrew Bartlett Reviewed by: Jeremy Allison <jra@samba.org>
* Change get_nt_acl_no_snum() to return an NTSTATUS, not a struct ↵Andrew Bartlett2012-11-131-1/+2
| | | | | | | | | | | security_descriptor *. Internally change the implementation to use SMB_VFS_GET_NT_ACL() instead of SMB_VFS_FGET_NT_ACL() with a faked-up file struct. Andrew Bartlett Reviewed by: Jeremy Allison <jra@samba.org>
* s3:smbd: pass the current time to make_connection[_smb1]()Stefan Metzmacher2012-11-051-0/+1
| | | | | | | | | | Otherwise smbstatus reports the wrong time for tree connects. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Mon Nov 5 20:43:23 CET 2012 on sn-devel-104
* Fix bug #9329 - Directory listing with SeBackup can crash smbd.Jeremy Allison2012-10-291-0/+1
| | | | | | | | | | | | | | | | | | When we do a become_root()/unbecome_root() pair to temporarily raise privilege, this NULLs out the NT token. If we're within a become_root()/unbecome_root() pair then return the previous token on the stack as our NT token. This is what we should be using to check against NT ACLs in the file server. This copes with security context changing when removing a file on close under the context of another user (when 2 users have a file open, one sets delete on close and then the other user has to actually do the delete). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Oct 29 16:26:20 CET 2012 on sn-devel-104
* s3:smbd: remove unused claim_connection/yield_connectionStefan Metzmacher2012-10-191-2/+0
| | | | | | metze Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd: remove smbd_server_connection argument from session_claim()Gregor Beck2012-10-191-1/+1
| | | | | | | retrieve the server connection from the smbXsrv_session argument instead. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd: pass smbXsrv_session instead of user_struct to session_claim() and ↵Gregor Beck2012-10-191-2/+3
| | | | | | | session_yield() Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:count_current_connections: do not clear orphaned entries from connections.tdbGregor Beck2012-10-191-1/+1
| | | | | | | This removes one of the last callers of connetions_forall. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd/utmp: remove ip address from utmp recordStefan Metzmacher2012-10-191-4/+2
| | | | | | | | | | | 1. This was broken since Samba 3.2. when ipv6 support was added, it only worked for ipv6 addresses. 2. userspace tools only display the hostname field. 3. This is not really portable metze Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd: remove duplicate prototypes for sys_utmp_claim() an sys_utmp_yield()Michael Adam2012-10-191-6/+0
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd: add exit_server to the smbd_shim hooksStefan Metzmacher2012-10-191-2/+5
| | | | | | | | | This is in preparation of moving sessionid_tdb and conn_tdb to smbd exclusively. metze Signed-off-by: Michael Adam <obnox@samba.org>
* vfs: Implement a sys_acl_blob_get_{fd,file} for POSIX ACL backendsAndrew Bartlett2012-10-111-0/+10
| | | | | | | | | | | | | This simply linearlises the SMB_ACL_T (default and access acl for directories) and the file owner, group and mode into a blob. It will be useful for an improved vfs_acl_common.c that uses this sets that, rather than the hash of the NT ACL, in the xattr This will in turn insulate the stored hash from changes in the ACL mapping. Andrew Bartlett
* smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett2012-10-111-1/+4
| | | | | | | | | | | 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
* s3: make recursive_rmdir function non-staticBjörn Baumbach2012-10-011-0/+3
|
* Add bool use_privs parameter to smbd_check_access_rights()Jeremy Allison2012-09-141-0/+1
| | | | | If this is set we should use it in preference to blindly assuming root can do anything. Currently set to 'false' in (most) callers.