summaryrefslogtreecommitdiffstats
path: root/source3/smbd/open.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass fsp to dptr_CloseDir(). Cope with setting the fd if we're closing an fd ↵Jeremy Allison2011-02-081-0/+3
| | | | that opendir knows about.
* If possible (O_DIRECTORY exists) open an fd for a directory open.Jeremy Allison2011-02-081-0/+15
| | | | | | | | | | | Start of the move towards handle-based code for directory access. Currently makes fstat/fchown code work for directories rather than falling back to pathnames. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 8 06:34:41 CET 2011 on sn-devel-104
* Fix leak in error path.Jeremy Allison2011-02-071-0/+1
|
* Move the "oplock file with byte range locks" check to the correct place, ↵Jeremy Allison2011-02-051-0/+15
| | | | | | | where we're making oplock decisions. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 01:18:14 CET 2011 on sn-devel-104
* Based on a conversation with Volker, refactor some of the oplock code to ↵Jeremy Allison2011-02-021-71/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | make it comprehensible. delay_for_oplocks() did 4 things. 1). Validation of existing oplock types. 2). Check for compatibility with batch oplocks (pass 1). 3). Check for compatibility with exclusive oplocks (pass 2). 4). Set the correct oplock type from the requested value. Refactor into 4 separate functions: 1). find_oplock_types() - does validation of oplock types and returns pointers to specific values. 2). delay_for_batch_oplocks() - the pass 1 phase above. 3). delay_for_exclusive_oplocks() - the pass 2 phase above 4). grant_fsp_oplock_type() - Set the correct oplock type from the requested value. Now separated out this code should be much easier to understand and modify. This also fixes an erroneous SMB_ASSERT which was hidden by the previous complexity of the single delay_for_oplocks() code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 2 01:52:21 CET 2011 on sn-devel-104
* Fix bug #7928 - Samba problems with kernel oplocks option set to "no"Pavel Shilovsky2011-01-311-1/+4
| | | | | We should not grant levelII oplocks on a file with existing byte range locks.
* Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved.Jeremy Allison2011-01-251-4/+8
| | | | | | Do this by keeping a linked list of delete on close tokens, one for each filename that identifies a path to the dev/inode. Use the jenkins hash of the pathname to identify the correct token.
* Fix bug #7892 - open_file_fchmod() leaves a stale lock.Jeremy Allison2010-12-291-36/+4
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Dec 29 02:15:23 CET 2010 on sn-devel-104
* Keep track of the sparse status of an open file handle. Allows bypass ofJeremy Allison2010-12-211-0/+9
| | | | | | | | strict allocation on sparse files. Files opened as POSIX opens are always sparse. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 21 04:12:22 CET 2010 on sn-devel-104
* Fix a typo - should be '&&' not '&' when checking for privileges.Jeremy Allison2010-12-011-1/+1
| | | | Jeremy.
* s3: Remove an unused prototypeVolker Lendecke2010-11-041-17/+0
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Nov 4 17:44:09 UTC 2010 on sn-devel-104
* Revert "Wrap security_token_has_privilege() with a check for ↵Jeremy Allison2010-10-221-2/+2
| | | | | | | | | | | | lp_enable_privileges(). Needed" Not needed - privileges code prevents "enable privileges = no" from adding privileges anyway. This reverts commit a8b95686a7bde3f96f141b6938e24e101567ef54. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
* Wrap security_token_has_privilege() with a check for lp_enable_privileges(). ↵Jeremy Allison2010-10-221-2/+2
| | | | | | | | | | | Needed to maintain compatibility with smb.conf manpage. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
* Add code to implement SeSecurityPrivilege in net rpc rights, and in theJeremy Allison2010-10-211-21/+8
| | | | | | | | | open and get/set NT security descriptor code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Oct 21 00:15:57 UTC 2010 on sn-devel-104
* Fix bug #7734 - When creating files with "inherit ACLs" set to true, we ↵Jeremy Allison2010-10-151-1/+1
| | | | | | neglect to apply appropriate create masks. Jeremy.
* Fix bug #7733 - Invalid client DOS attributes on create can cause incorrect ↵Jeremy Allison2010-10-151-0/+9
| | | | | | | | | | | unix mode_t to be generated. It turns out a client can send an NTCreateX call for a new file, but specify FILE_ATTRIBUTE_DIRECTORY in the attribute list. Windows silently strips this, but we don't - causing the unix_mode() function to go through the "mode bits for new directory" codepath, instead of the "mode bits for new file" codepath. Jeremy.
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* s3: Remove smbd_server_conn from msg_file_was_renamedVolker Lendecke2010-10-031-1/+8
|
* s3: Remove smbd_server_conn from validate_my_share_entriesVolker Lendecke2010-10-031-3/+5
|
* s3: Lift smbd_server_conn from file_find_di_firstVolker Lendecke2010-09-281-2/+3
|
* s3: Lift smbd_server_conn from file_find_difVolker Lendecke2010-09-281-1/+1
|
* s3:auth Remove NT_USER_TOKENAndrew Bartlett2010-09-111-1/+1
| | | | | | | | | The all UPPER case typedef is no longer the preferred Samba style and this makes it easier to see that this is the IDL-derivied structure Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-build: only include "fake_file.h" where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3: Avoid an unnecessary ftruncate callVolker Lendecke2010-07-291-1/+1
| | | | | If we just created the file, it has length 0 by definition. This is still done while holding the share mode lock, so no race around wrt other cifs clients.
* s3-smbd: Migrated to new spoolss functions for printing.Simo Sorce2010-07-271-2/+3
| | | | Signed-off-by: Jim McDonough <jmcd@samba.org>
* s3: Remove procid_self() from fill_deferred_open_entry()Volker Lendecke2010-07-051-5/+10
|
* s3: Remove smbd_messaging_context() from send_break_message()Volker Lendecke2010-07-051-1/+1
|
* s3-security: use shared SECINFO_DACL define.Günther Deschner2010-06-031-3/+3
| | | | Guenther
* s3-security: use shared SECINFO_SACL define.Günther Deschner2010-06-031-1/+1
| | | | Guenther
* s3-security: use shared SECINFO_GROUP define.Günther Deschner2010-06-031-3/+3
| | | | Guenther
* s3-security: use shared SECINFO_OWNER define.Günther Deschner2010-06-031-3/+3
| | | | Guenther
* s3-build: only use ndr_security.h where needed.Günther Deschner2010-05-311-0/+1
| | | | Guenther
* Be more forgiving on client oplock break failure (as Windows does). Remove a ↵Jeremy Allison2010-05-131-1/+1
| | | | | | global. Jeremy.
* Treat an open of stream ::$DATA as an open of the base file.Jeremy Allison2010-05-131-1/+23
| | | | | | This fixes a class of SMB_ASSERT failures when doing stream tests. Jeremy.
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-0/+1
| | | | | | | | | | | | | | | | | This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
* s3-smbd: group print relate data in own structureSimo Sorce2010-04-231-2/+2
|
* Allow smb2 create requests to be cancelled.Jeremy Allison2010-04-231-9/+18
| | | | Jeremy.
* Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison2010-04-221-1/+1
| | | | | | | | Makes SMB2Create call re-entrant internally. Now this infrastructure is in place, oplocks will follow shortly. Tested with Win7 client and with W2K8R2. Jeremy.
* Move to using 64-bit mid values in our internal open file database.Jeremy Allison2010-04-121-6/+8
| | | | | | | This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
* Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison2010-04-091-26/+26
| | | | | | | | Rename functions to be internally consistent. Next step is to cope queueing single (non-compounded) SMB2 requests to put some code inside the stubs. Jeremy.
* Switch over to using get_currect_XXX() accessor functions.Jeremy Allison2010-03-151-3/+3
| | | | Jeremy.
* Rever e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 "Remove more uses of "extern ↵Jeremy Allison2010-03-151-3/+3
| | | | | | | | struct current_user current_user;"." As requested by Volker, split this into smaller commits. Jeremy.
* Missed a couple more uses of conn->server_info->ptok that need to be ↵Jeremy Allison2010-03-121-19/+22
| | | | | | | | | get_current_nttok(conn) Centralize the root check into smb1_file_se_access_check() so this is used by modules/vfs_acl_common.c also. Jeremy.
* Remove more uses of "extern struct current_user current_user;".Jeremy Allison2010-03-121-3/+3
| | | | | | | | | | | | | Use accessor functions to get to this value. Tidies up much of the user context code. Volker, please look at the changes in smbd/uid.c to familiarize yourself with these changes as I think they make the logic in there cleaner. Cause smbd/posix_acls.c code to look at current user context, not stored context on the conn struct - allows correct use of these function calls under a become_root()/unbecome_root() pair. Jeremy.
* Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison2010-03-051-19/+36
| | | | | | | | | | Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
* Add helpful debug of DACL for errors on ACL access.Jeremy Allison2009-12-161-2/+10
| | | | Jeremy.
* Make sure we're not using the old smb_fname data.Jeremy Allison2009-12-031-1/+1
| | | | Jeremy.
* Remove smb_fname duplicates that just keep the same information as in ↵Jeremy Allison2009-12-031-13/+11
| | | | | | | | fsp->fsp_name. Moving towards making VFS_OPEN/VFS_MKDIR/VFS_RMDIR handle based... Jeremy.
* Remove unneeded argument from can_set_delete_on_close(). EnsureJeremy Allison2009-12-021-2/+2
| | | | | | can_set_delete_on_close() is correctly called before any setting of the disposition bit (clean up the do_unlink() call). Jeremy.
* Fix crash due to uninitialized pointer (not a problem in 3.4.x or below).Jeremy Allison2009-11-251-2/+1
| | | | Jeremy.