summaryrefslogtreecommitdiff
path: root/source3/smbd/proto.h
AgeCommit message (Collapse)AuthorFilesLines
2013-04-16Cleanup. Remove unused function dptr_DirCacheAdd(). Make DirCacheAdd() static.Jeremy Allison1-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
2013-04-10s3:smbd: convert srvstr_pull_req_talloc() into a functionRalph Wuerthner1-0/+2
Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-03-20s3:smbd: add some const to req_is_in_chain()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-02-19s3:smbd: s/struct timed_event/struct tevent_timerStefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:smbd: s/struct event_context/struct tevent_contextStefan Metzmacher1-4/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-01-16smbd: split out file_fsp_get from file_fsp_smb2David Disseldorp1-0/+3
Obtain the files_struct from smb2req, persistent_id and volatile_id. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-09Move create_share_access_mask() from smbd/service.c to smbd/uid.c.Jeremy Allison1-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>
2013-01-09Add check_user_share_access() which factors out the share security and ↵Jeremy Allison1-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>
2013-01-09Change API for create_share_access_mask() - remove conn struct.Jeremy Allison1-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>
2013-01-09Change API for create_share_access_mask() to pass in the token.Jeremy Allison1-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>
2013-01-09Fix API for create_share_access_mask().Jeremy Allison1-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>
2013-01-09Remove static from create_share_access_mask().Jeremy Allison1-0/+1
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-07pysmbd: Convert pysmbd to take an optional service to connect toAndrew Bartlett1-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>
2013-01-07smbd: Split create_conn_struct into a fn that does not change the working dirAndrew Bartlett1-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>
2012-12-04Remove unused append_parent_acl().Jeremy Allison1-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
2012-11-13smbd: Remove NT4 compatability handling in posix -> NT ACL conversionAndrew Bartlett1-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>
2012-11-13Change get_nt_acl_no_snum() to return an NTSTATUS, not a struct ↵Andrew Bartlett1-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>
2012-11-05s3:smbd: pass the current time to make_connection[_smb1]()Stefan Metzmacher1-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
2012-10-29Fix bug #9329 - Directory listing with SeBackup can crash smbd.Jeremy Allison1-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
2012-10-19s3:smbd: remove unused claim_connection/yield_connectionStefan Metzmacher1-2/+0
metze Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: remove smbd_server_connection argument from session_claim()Gregor Beck1-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>
2012-10-19s3:smbd: pass smbXsrv_session instead of user_struct to session_claim() and ↵Gregor Beck1-2/+3
session_yield() Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:count_current_connections: do not clear orphaned entries from connections.tdbGregor Beck1-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>
2012-10-19s3:smbd/utmp: remove ip address from utmp recordStefan Metzmacher1-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>
2012-10-19s3:smbd: remove duplicate prototypes for sys_utmp_claim() an sys_utmp_yield()Michael Adam1-6/+0
Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: add exit_server to the smbd_shim hooksStefan Metzmacher1-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>
2012-10-11vfs: Implement a sys_acl_blob_get_{fd,file} for POSIX ACL backendsAndrew Bartlett1-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
2012-10-11smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett1-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
2012-10-01s3: make recursive_rmdir function non-staticBjörn Baumbach1-0/+3
2012-09-14Add bool use_privs parameter to smbd_check_access_rights()Jeremy Allison1-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.
2012-09-11s3:proto.h: remove duplicate disk_quotas prototypesBjörn Jacke1-10/+0
2012-09-08s3:vfs_default: add basic support for durable handle request and reconnectMichael Adam1-0/+17
We only grant durable handles for CIFS/SMB2 only access, that means "kernel oplocks", "kernel share modes" and "posix locking" need to be set to "no". For now we also don't grant durable handles if delete on close is active on the handle. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Volker Lendecke <vl@samba.org>
2012-09-08s3:smbd: make fd_open() publicMichael Adam1-0/+2
2012-09-04s3: Make "open_match_attributes" staticVolker Lendecke1-6/+0
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-08-30Re-add set_sd(), called from set_sd_blob(). Allows us to centralize all ACL ↵Jeremy Allison1-0/+2
canonicalization.
2012-08-30Rename set_sd() to set_sd_blob() - this describes what it does.Jeremy Allison1-1/+1
2012-08-23s3-smbd: Add security_info_wanted argument to get_nt_acl_no_snumAndrew Bartlett1-1/+1
I need to get at the owner, group, DACL and SACL when testing correct ACL storage. Andrew Bartlett
2012-07-31s3: Make request_timed_out() staticVolker Lendecke1-2/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-19s3-aio: Panic if we try to close a fsp with outstanding aio requestsVolker Lendecke1-1/+0
The core smbd must have taken care of this. If we don't do this properly, we have a race of the close(2) against a pwrite(2). We might end up writing to the wrong file. Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jul 19 03:40:17 CEST 2012 on sn-devel-104
2012-07-18s3: Fix the buildVolker Lendecke1-0/+1
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-aio: Remove unused VFS functions and moreVolker Lendecke1-3/+0
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3: Properly handle shutdown with the _send/_recv based aioVolker Lendecke1-0/+1
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-12Add an optimization to pthread aio writes to also do fsync if requested.Jeremy Allison1-0/+1
Should help by ensuring complete writes done in sub-thread, not in the main thread.
2012-07-12s3: Factor out "mark_file_modified"Volker Lendecke1-0/+1
This is in preparation of making us survive base-delaywrite with async I/O activated Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-09Make check_same_stat() and check_same_dev_ino() common functions.Jeremy Allison1-2/+0
2012-07-03s3:smbd:smb2: fix prototype of make_connection_smb2() to use smbXsrv_tconMichael Adam1-2/+1
instead of internal smbXsrv_tcon0.
2012-06-30Don't allow asynchronous creates to be canceled in SMB2.Jeremy Allison1-0/+1
Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 30 04:10:02 CEST 2012 on sn-devel-104
2012-06-30Make schedule_deferred_open_message_smb() return an indication of success.Jeremy Allison1-1/+1
2012-06-29s3:smbd: make use of smbXsrv_open for smb1/2/3Stefan Metzmacher1-1/+0
This makes sure we generate unique persistent file ids, which are stored in smbXsrv_open_global.tdb. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 29 21:01:11 CEST 2012 on sn-devel-104
2012-06-25s3:smbd: remove now unused invalidate_all_vuids()Stefan Metzmacher1-1/+0
Pair-Programmed-With: Michael Adam <obnox@samba.org> metze