Jeremy Allison
c23f1ee0c9
Allow an object to be deleted from a directory if the caller has DELETE_CHILD access
...
even if we don't have access to read the ACL on the object. Fixes bug #8673 - NT ACL issue.
Different fix needed for 3.6.x.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 20 22:13:51 CET 2011 on sn-devel-104
2011-12-20 22:13:51 +01:00
Jeremy Allison
b939144071
check_name() not needed in mkdir.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 17 02:44:55 CET 2011 on sn-devel-104
2011-12-17 02:44:55 +01:00
Jeremy Allison
1dfa3ee986
Ensure VALID_STAT before accessing fields.
2011-12-17 01:10:41 +01:00
Stefan Metzmacher
704cf10645
s3:smbd: avoid using sconn_server_id()
...
metze
2011-12-16 13:19:32 +01:00
Volker Lendecke
7000bb6933
s3: Add some const to find_oplock_types
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 16 09:10:07 CET 2011 on sn-devel-104
2011-12-16 09:10:06 +01:00
Volker Lendecke
2349c027c1
s3: Make open_file_ntcreate a bit easier to read
...
Move the declaration of "id" closer to its use
2011-12-16 07:34:48 +01:00
Volker Lendecke
ce30a7ae7b
s3: Make open_file_ntcreate a bit easier to read
...
Move the calculation of "new_file_created" closer to its use
2011-12-16 07:34:48 +01:00
Volker Lendecke
98f7ba52e3
s3: Make open_file_ntcreate a bit easier to read
...
Remove a negation where it's not necessary
2011-12-16 07:34:48 +01:00
Volker Lendecke
432ea5f5c6
s3: Slightly simplify delay_for_exclusive_oplocks
2011-12-16 07:34:48 +01:00
Volker Lendecke
b3d8ecaf52
s3: Slightly simplify delay_for_batch_oplocks
2011-12-16 07:34:47 +01:00
Jeremy Allison
c5cbe481a7
Third part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
...
smbd_check_access_rights() - we can always delete a symlink.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 16 03:32:15 CET 2011 on sn-devel-104
2011-12-16 03:32:15 +01:00
Jeremy Allison
8eca223123
First part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
...
Remove two unneeded check_name() calls. They have already been done
in order to get here.
2011-12-15 16:31:51 -08:00
Volker Lendecke
c889c8d705
s3: Slightly simplify the logic in defer_open
...
Doing 3 &&ed conditions in a single if-statement is easier to understand to me
than continuing out separately.
2011-12-14 17:34:21 +01:00
Volker Lendecke
f7e84f2809
s3: Remove UNUSED_SHARE_MODE_ENTRY
2011-12-14 17:34:21 +01:00
Stefan Metzmacher
940f21e5c6
s3:smbd/open: use talloc_get_type_abort() as private_data can't be NULL
...
metze
2011-12-14 12:00:07 +01:00
Volker Lendecke
2d2d72e479
s3: Remove an else{} in remove_deferred_open_entry
2011-12-13 17:27:26 +01:00
Stefan Metzmacher
e09c675596
s3:smbd/open: pass smbd_server_connection as private_data to msg_file_was_renamed()
...
metze
2011-12-13 12:36:35 +01:00
Volker Lendecke
1c46fb5c3e
s3: Use autogenerated open_files.idl
2011-12-02 22:43:05 +01:00
Jeremy Allison
de3ab9bd05
Move setting the inherited ACL into the main open code path. Next will
...
remove it from the ACL modules.
2011-11-22 12:33:27 -08:00
Jeremy Allison
6795432f27
Move the "set SD" code into provided SD and "inherit acls" branches.
2011-11-22 11:53:51 -08:00
Jeremy Allison
7b275c551b
Only add the SD if it's not a new stream file.
2011-11-22 10:37:56 -08:00
Jeremy Allison
12514bf008
Move the add security descriptor code to *after* all the other meta-data is
...
updated. We may be adding an SD that restricts our own access.
2011-11-22 10:28:52 -08:00
Jeremy Allison
bbcb589ef5
No longer do the pre-check on DELETE_ACCESS - we're correctly checking the ACL every time now.
2011-11-04 15:56:15 -07:00
Jeremy Allison
b988a3233f
Remove can_access_file_acl(). We no longer need this duplicate code (hurrah!).
2011-11-04 15:55:11 -07:00
Jeremy Allison
60b741415d
Remove can_access_file_data() - make it use the standard smbd_check_access_rights() instead.
2011-11-04 15:45:13 -07:00
Jeremy Allison
4851219333
Add const to the smb_filename argument of smbd_check_access_rights().
2011-11-04 15:39:55 -07:00
Jeremy Allison
a30f84a21c
Expose smbd_check_access_rights() to other modules.
2011-11-04 14:37:26 -07:00
Jeremy Allison
32edc1d047
Rename smbd_check_open_rights() to smbd_check_access_rights() as we're going to remove the static from this.
2011-11-04 14:28:08 -07:00
Jeremy Allison
0c886eeb89
Replace smb1_file_se_access_check() with just se_access_check().
2011-11-04 14:21:35 -07:00
Jeremy Allison
55b9ba79f8
Move root check out of smb1_file_se_access_check() in preparation for deleting this function.
2011-11-04 14:16:51 -07:00
Jeremy Allison
07edf6c65e
smb1_file_se_access_check() is now static to smbd/open.c
2011-11-04 14:16:37 -07:00
Jeremy Allison
1fab17de94
Revert "Change function signature of check_parent_access() to take char * instead of struct smb_filename."
...
This reverts commit a11c0a41a35aa2b1c14333552045a65e3e50df1e.
Not needed.
2011-11-04 14:15:47 -07:00
Jeremy Allison
a11c0a41a3
Change function signature of check_parent_access() to take char * instead of struct smb_filename.
...
Expose it so it can be called from directory code.
2011-11-01 16:38:14 -07:00
Jeremy Allison
3bd6513884
Remove the order dependency in parent_override_delete(), just check for & not ==.
2011-10-28 12:16:42 -07:00
Jeremy Allison
8a65e2c747
Remove unused "struct security_descriptor" parameter from check_parent_access()
2011-10-28 12:16:42 -07:00
Jeremy Allison
ea195b6cd2
Finally do all the open checks inside open_file(). Checks inside
...
vfs_acl_common can now be removed.
2011-10-28 12:16:42 -07:00
Jeremy Allison
8a3070a7c9
Simplify smbd_check_open_rights() and move all the special casing inside it.
2011-10-28 12:16:42 -07:00
Jeremy Allison
18df3aedb9
Move parent_override_delete() to before I need to use it.
2011-10-28 12:16:42 -07:00
Jeremy Allison
1619de3080
Make smbd_check_open_rights() static.
2011-10-28 12:16:42 -07:00
Jeremy Allison
62ccae3229
Factor out the code checking if a parent should override DELETE_ACCESS into a function.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 26 23:15:05 CEST 2011 on sn-devel-104
2011-10-26 23:15:05 +02:00
Jeremy Allison
4ec2c2a5e8
Remove another level of indentation - deal with !NT_STATUS_OK individually.
2011-10-26 12:29:19 -07:00
Jeremy Allison
4b9bdee167
Add early return on stat open without O_CREAT if file doesn't exist.
...
Reduces one level of indentation.
2011-10-26 12:08:51 -07:00
Jeremy Allison
30fb5e9969
Refactor to create check_parent_access() which can be called for file creation too.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Oct 20 20:29:22 CEST 2011 on sn-devel-104
2011-10-20 20:29:22 +02:00
Jeremy Allison
ff8fa5aa2b
Make mkdir_internal() check the parent ACL for SEC_DIR_ADD_SUBDIR rights.
2011-10-20 09:07:46 -07:00
Jeremy Allison
f64f91f96f
Fix error return to be NT_STATUS_NOT_A_DIRECTORY.
2011-10-20 00:58:29 +02:00
Jeremy Allison
7b4edc11e3
Make use of the "dir_exists" we already have on directory open.
2011-10-20 00:58:29 +02:00
Frank Lahm
c3bdcab516
First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104
2011-10-17 21:39:32 +02:00
Frank Lahm
7a0b5d6fc5
Add support for VFS op streaminfo chaining in all relevant VFS modules.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 14 03:26:06 CEST 2011 on sn-devel-104
2011-10-14 03:26:06 +02:00
Jeremy Allison
f93fd128eb
Fix bug #8507 - smbd doesn't correctly honor the "force create mode" bits from a cifsfs create.
...
Don't manipulate the new_dos_attributes bits until we know it's not a POSIX open.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 5 01:19:17 CEST 2011 on sn-devel-104
2011-10-05 01:19:17 +02:00
Volker Lendecke
f9d183f931
s3: Pass sconn explicitly to open_was_deferred
2011-08-02 19:18:08 +02:00