1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

81 Commits

Author SHA1 Message Date
David Disseldorp
ed76e65172 ntvfs: support setfileinfo with FULL_EA_INFORMATION
Use existing unmarshall and set helper functions. This allows the
smb2.setinfo.setinfo test to run against the ntvfs file server.

Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr  3 16:14:33 CEST 2013 on sn-devel-104
2013-04-03 16:14:32 +02:00
Andrew Tridgell
3c4af39aa5 s4-ntvfs: added allow_override check based on use of NT ACL
This disables the posix permission override if the calculated
permissions did not come from a NT ACL.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  1 05:14:49 CET 2011 on sn-devel-104
2011-12-01 05:14:49 +01:00
Stefan Metzmacher
592ac97728 s4:ntvfs: s/!= PROTOCOL_SMB2/< PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:34 +02:00
Stefan Metzmacher
1ba5077e5f s4:ntvfs: s/== PROTOCOL_SMB2/>= PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:33 +02:00
Andrew Tridgell
2c2156ea95 s4-pvfs: use pvfs_sys_fchmod() 2010-03-05 23:07:32 +11:00
Andrew Tridgell
764c09e6bc s4-streams: fixed handling of stream rename and overwrite 2009-10-18 15:06:13 +11:00
Andrew Tridgell
44612c74a6 s4-pvfs: rename with full name gives SHARING_VIOLATION 2009-10-18 15:06:12 +11:00
Andrew Tridgell
0463d69883 s4-pvfs: change the handling of access checking on create
Previously when a file was created, we produces the resulting access
mask based on an ACL check against the parent. This change means we
now calculate the inherited ACL much earlier, and produce the
resulting access mask from that ACL, or the user supplied ACL.
2009-10-18 07:13:47 +11:00
Stefan Metzmacher
3d6587c777 s4:pvfs: use talloc_get_type() to cast from void *
metze
2009-02-05 17:48:07 +01:00
Andrew Tridgell
c81863e868 added support for stream renames in Samba4
This allows the RAW-STREAMS test to work again. We still have some
limitations though:

  - renames of a stream to the default stream doesn't work
  - delete on close handling between streams and the main file 
    is still broken
2009-01-07 16:46:34 +11:00
Stefan Metzmacher
b800af662c pvfs: use utimes() instead of utime() to get better timestamp resolution
Note: that libreplace always provides utimes()

metze
(This used to be commit 61bad69e2d)
2008-06-03 14:05:04 +02:00
Stefan Metzmacher
d1bb49a2ab pvfs_setfileinfo: update the write time in the opendb
metze
(This used to be commit 418e2592b4)
2008-06-03 14:03:51 +02:00
Andrew Tridgell
fa0bc441e3 don't allow a file to be changed to a directory with setfileinfo
(This used to be commit ad7acbf8bf)
2008-05-28 20:06:04 +10:00
Stefan Metzmacher
3e80085fb0 pvfs: remove XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME code
I'll fix this more correctly very soon,
so that we'll pass the BASE-DELAYWRITE test.

metze
(This used to be commit b09dd6b65d)
2008-05-07 15:46:22 +02:00
Stefan Metzmacher
0de1a63c18 pvfs_rename: move odb_rename() onto pvfs_do_rename()
metze
(This used to be commit 5a1f0c0ce9)
2008-03-01 10:29:56 +01:00
Stefan Metzmacher
a0235410ae pvfs_setfileinfo: support renaming of directories
metze
(This used to be commit 2ecc7ec8b3)
2008-02-29 15:17:53 +01:00
Stefan Metzmacher
176e20bf26 pvfs_setfileinfo: tell the opendb about renames
metze
(This used to be commit 9360eda2c5)
2008-02-29 15:17:53 +01:00
Stefan Metzmacher
daa4dec695 pvfs: use pvfs_resolve_name_handle() in qfileinfo and setfileinfo
metze
(This used to be commit 4b1a266f6f)
2008-02-29 15:17:53 +01:00
Stefan Metzmacher
fa2e4ba03c pvfs_setpathinfo: retry setpathinfo after oplock not granted on on setpathinfo ALLOCATION_INFO and END_OF_FILE_INFO
metze
(This used to be commit 4e27ac8c52)
2008-02-26 09:33:00 +01:00
Stefan Metzmacher
ee81b7a85e pvfs_setfileinfo: break level2 oplocks on setfileinfo() ALLOCATION_INFO and END_OF_FILE_INFO
metze
(This used to be commit b258f9d8d4)
2008-02-26 09:32:59 +01:00
Stefan Metzmacher
69631a215b pvfs_setfileinfo_rename: map DELETE_PENDING to ACCESS_DENIED
This is needed as odb_can_open/pvfs_can_delete changed the return value.

metze
(This used to be commit 1ba0b9a8f1)
2008-02-26 09:31:20 +01:00
Stefan Metzmacher
1cd2008aa4 pvfs: pass NULL to pvfs_can_*() when no odb_lock is needed by the caller
metze
(This used to be commit e585e23063)
2008-02-25 07:56:06 +01:00
Andrew Tridgell
4a04a5e620 A better way to handle the different format of RenameInformation in SMB2
We now define a separate info level RAW_SFILEINFO_RENAME_INFORMATION_SMB2
and set that level when handling SMB2 packets. This makes the parsers clearer.
(This used to be commit f6cdf3f117)
2008-02-14 14:54:21 +11:00
Andrew Tridgell
039f85835d we need to refuse a root_fid in rename on SMB but not SMB2
(This used to be commit 9a139c35b7)
2008-02-14 12:50:11 +11:00
Andrew Tridgell
839ab724dc Fixed SMB2 rename operations from Vista clients
We needed a flag in bufinfo to mark packets as SMB2, as it seems that
SMB2 uses a different format for the RenameInformation buffer than SMB
does

Also handle the fact that SMB2 clients give the full path to the
target file in the rename, not a relative path
(This used to be commit 52d7972d95)
2008-02-14 12:30:31 +11:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
ef4475adc4 r16706: for RAW_SFILEINFO_SETATTR attrib == 0 means set it to FILE_ATTRIB_NORMAL
and attrib == FILE_ATTRIB_NORMAL means no change...

but for RAW_SFILEINFO_BASIC_INFORMATION attrib == 0 means no change

metze
(This used to be commit e1945feda0)
2007-10-10 14:09:39 -05:00
Stefan Metzmacher
9ef33f5f5c r15734: This is a major change to the NTVFS subsystem:
- to use a struct ntvfs_handle instead of a uint16_t fnum.
  (to make it independend from the frontend protocol)
- the allocation of handles now is provided by the frontend
  (smbsrv_*) via callbacks and not by each backend module
- this also makes sure that file handles are only passed
  to the ntvfs subsystem when the tcon and session matches,
  so modules can rely on this and need to check this.
- this allows multiple modules in the ntvfs module chain
  to allocate file handles. This can be used for virtual
  files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"...
- also this will make SMB2 with 128 bit file handles possible

metze
(This used to be commit 287fc1c22d)
2007-10-10 14:08:10 -05:00
Stefan Metzmacher
f347be4c73 r15057: fix access masks for getting and setting security_descriptors
I'll add some torture tests later...

metze
(This used to be commit ce045f4df3)
2007-10-10 14:04:04 -05:00
Andrew Tridgell
2b0537143c r14947: add support for file truncate events
(This used to be commit ed1b90407d)
2007-10-10 14:00:21 -05:00
Andrew Tridgell
e54abee4e1 r14933: fix the handling of notify filters to be much closer to the behaviour
of w2k3. The behaviour is particularly tricky for rename.
(This used to be commit 4d3b8d9549)
2007-10-10 14:00:19 -05:00
Andrew Tridgell
930e247d56 r14925: trigger NOTIFY_ACTION_OLD_NAME and NOTIFY_ACTION_NEW_NAME events for
renames, if in the same directory. For renames between directories
generate NOTIFY_ACTION_REMOVED and NOTIFY_ACTION_ADDED
(This used to be commit 2ac248edf0)
2007-10-10 14:00:17 -05:00
Andrew Tridgell
be0a00726f r14808: added notify_trigger() calls for rename and setfileinfo calls
(This used to be commit adb4ea32e2)
2007-10-10 13:59:22 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Stefan Metzmacher
a1b295ed48 r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo

metze
(This used to be commit be6d5298a2)
2007-10-10 13:57:06 -05:00
Stefan Metzmacher
e5e10ca55c r14174: fix typos
metze
(This used to be commit 29240bae44)
2007-10-10 13:56:58 -05:00
Stefan Metzmacher
86497db611 r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request,
   but it's the first step...)
- rename ntvfs_openfile() -> ntvfs_open()
- fix the talloc hierachie in some places in the ntvfs_map_*() code

metze
(This used to be commit ed9ed1f48f)
2007-10-10 13:56:55 -05:00
Andrew Tridgell
40a8d58551 r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I
moved to using an IDL description of the opendb tdb record format.

One of the larger changes was to make directory opens and creates go
via the opendb code, so directory operations now obey all the share
mode restrictions, as well as delete on close semantics. I also
changed the period over which the opendb locks are held, to try to
minimise races due to two open operations happening at the same time.
(This used to be commit cd2602d057)
2007-10-10 13:52:08 -05:00
Jelmer Vernooij
b674411eb4 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
(This used to be commit 200a8f6652)
2007-10-10 13:35:01 -05:00
Andrew Tridgell
a52a6f1c42 r5666: winxp will use a NTTIME of -1 to mean "don't change" in setfileinfo
basic_info. Add null_nttime() as the equivalent of the existing
null_time() call for cheecking for valid NTTIME values
(This used to be commit 439ce2efbf)
2007-10-10 13:10:58 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
3feb4423f3 r4615: added acl checking on directory search in pvfs
(This used to be commit 0e61a422bd)
2007-10-10 13:08:33 -05:00
Andrew Tridgell
ad7da47948 r4584: fix pvfs backend to pass the new enhanced RAW-ACLS test. Easy once I really the
strange behaviour I saw was a w2k3 bug :-)
(This used to be commit e729061bcd)
2007-10-10 13:08:29 -05:00
Andrew Tridgell
291b02a639 r4448: - fixed access_mask checking on acl set
- honor the change ownership requests of acl set, changing the underlying
  unix owner/group

- fix the access mask on file create with SEC_FLAG_MAXIMUM_ALLOWED
(This used to be commit 5761fa35ab)
2007-10-10 13:07:51 -05:00
Andrew Tridgell
91190fdad8 r4409: fixed handling of zero access masks for the POSITION_INFORMATION query/set levels
(This used to be commit 75e7229476)
2007-10-10 13:07:44 -05:00
Andrew Tridgell
e913a48ded r4408: added the remaining access check hooks into pvfs. All calls should now have acl checking,
and obey the various inheritance rules.
(This used to be commit 5fe51807d6)
2007-10-10 13:07:44 -05:00
Andrew Tridgell
1c092c5ba6 r4406: - don't call the xattr unlink hook on unlink unless the link count is 1, otherwise
the xattrs of the remaining link are removed

- fix the handling of attribute set on directories
(This used to be commit fa44e3cce0)
2007-10-10 13:07:44 -05:00
Andrew Tridgell
a66a985cde r4314: added ACL checking on unlink
(This used to be commit f25c469693)
2007-10-10 13:07:33 -05:00
Andrew Tridgell
3b8e83a8c8 r4243: a sniff from kukks showed that the ea_set interface in trans2 setfileinfo allows
for multiple EAs to be set at once. This fixes all the ea code to allow for that.
(This used to be commit b26828bef5)
2007-10-10 13:07:28 -05:00