1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
Matthew DeVore
53a1d034f3 lib/util: Standardize use of st_[acm]time ns
Commit 810397f89a, and possibly others, broke the build for macOS and
other environments which don't have st_[acm]tim fields on 'struct stat'.

Multiple places in the codebase used the config.h values to determine
how to access the nanosecond or microsecond values of the stat
timestamps, so rather than add more, centralize them all into
lib/util/time.c.

Also allow pvfs_fileinfo.c to read nanosecond-granularity timestamps on
platforms where it didn't before, since its #if branches were not
complete.

Signed-off-by: Matthew DeVore <matvore@google.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Aug 15 08:51:09 UTC 2020 on sn-devel-184
2020-08-15 08:51:09 +00:00
Andrew Bartlett
3ef0e2246b s4-ntvfs: Add TODO on ea_size
This is almost certainly un-important.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Stefan Metzmacher
1ba5077e5f s4:ntvfs: s/== PROTOCOL_SMB2/>= PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:33 +02:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Stefan Metzmacher
c43591c216 pvfs: add PVFS_RESOLVE_NO_OPENDB flag and get the write time from the opendb
By default get the current write time from the opendb,
but allow callers to pass PVFS_RESOLVE_NO_OPENDB
for performance reasons, if they don't need to the write time.

metze
(This used to be commit def52cc098)
2008-06-03 14:03:50 +02:00
Stefan Metzmacher
391b746430 pvfs_resolve: stream_name = "" is only the same as NULL for files
metze
(This used to be commit 47756129fd)
2008-05-23 09:55:15 +02:00
Andrew Tridgell
ec7a6ee8ab fix make test for EAs again
- go back to 4 byte alignment until I work out the rules that Vista
  wants more exactly
- add the zero sized EA handling for SMB2 more generically
(This used to be commit 326b69bc80)
2008-05-23 00:07:12 +10: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
Andrew Tridgell
879e1e0ec7 r23697: use the file perm options in the posix backend
(This used to be commit 701d06ac01)
2007-10-10 14:59:03 -05:00
Stefan Metzmacher
5987aace3b r17776: these macros are also defined in libcli/raw/trans2.h
metze
(This used to be commit 58e7fa0375)
2007-10-10 14:16:40 -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
Stefan Metzmacher
d8d3a5ffe3 r5137: fix types
metze
(This used to be commit add1c57937)
2007-10-10 13:09:26 -05:00
Andrew Tridgell
359cf872df r4391: bring the default ACL inline with what w2k3 uses
(This used to be commit 16967f7502)
2007-10-10 13:07:42 -05:00
Andrew Tridgell
b02c5abfb4 r4262: a sniff from kukks showed that the FILE_ATTRIBUTE_NORMAL handling in
pvfs was not correct. This should fix a xcopy bug on OS/2.
(This used to be commit 7251f1fcdd)
2007-10-10 13:07:29 -05:00
Andrew Tridgell
145702b756 r4230: now that we set the FLAGS2_EXTENDED_ATTRIBUTES flag, we should mark
empty EAs as being of size 4, not size 0
(This used to be commit 76bd647678)
2007-10-10 13:07:28 -05:00
Andrew Tridgell
f2a605eeab r3939: - added "posix:fakeoplocks" option for testing with oplocks forced on
- added support for sticky write times after a setfileinfo, by using a
  write_time field in the DosAttrib xattr structure.
(This used to be commit 4a52fae82d)
2007-10-10 13:06:06 -05:00
Andrew Tridgell
f4e5f3a498 r3801: added allocation size rounding. This is needed for ifstest.
(This used to be commit 8a6fa43156)
2007-10-10 13:05:55 -05:00
Andrew Tridgell
ae7caf08c1 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
(This used to be commit b6452c4a20)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
12f4a44cf5 r3549: added support for DOS extended attribute lists (name/value pairs)
stored in posix xattrs
(This used to be commit bad6a88371)
2007-10-10 13:05:31 -05:00
Andrew Tridgell
9fe5fa11d6 r3545: initial support for using extended attributes to hold extended dos attributes of files.
I decided to use IDL/NDR to encode the attribute, as it gives us a
simple way to describe and extend the saved attributes.

The xattr code needs to hook into quite a few more places in the pvfs
code, but this at least gets the basics done. I will start encoding
alternate data streams streams, DOS EAs etc soon using the same basic
mechanism.

I'll probably stick to "version 1" for the xattr.idl for quite a while
even though it will be changing, as I don't expect anyone to be
deploying this in production just yet. Once we have production users
we will need to keep compatibility by supporting all the old version
numbers in xattr.idl.
(This used to be commit c54253ed1b)
2007-10-10 13:05:30 -05:00
Andrew Tridgell
f1814e5a53 r3249: - change_time is closer to ctime than mtime
- pvfs now passes the RAW-CLOSE test
(This used to be commit 98aea91ce6)
2007-10-10 13:04:46 -05:00
Andrew Tridgell
7fa912e708 r3200: - improved the accuracy of openx emulation. We now nearly pass the openx portion of RAW-OPEN
- fixed directory size reporting to make it consistent. we now pass
  the ntcreatex portion of RAW-OPEN
(This used to be commit 6282e5811b)
2007-10-10 13:04:40 -05:00
Andrew Tridgell
1be85de588 r3193: improved the initial permissions choice for file create, based upon dos attribute
(This used to be commit f6fb1e3493)
2007-10-10 13:04:39 -05:00
Andrew Tridgell
cb0cd473a0 r2573: - added a configure test for nanosecond time resolution in struct stat
(recently Linux systems support this, allowing us to support the
  full resolution in NTTIME)

- use nanosecond resolution in the posix backend if available

- moved the configure tests and list of object files for the posix
  backend into ntvfs/posix/ to keep them more neatlly separated.
(This used to be commit d92ad9f307)
2007-10-10 12:59:06 -05:00
Andrew Tridgell
dd7862cb6a r2503: the RAW-SEARCH test now mostly passes against the posix backend
(This used to be commit 9710f24b1f)
2007-10-10 12:58:59 -05:00
Andrew Tridgell
8a1c3ddd94 r2436: the second big lump of posix vfs code.
this is still just a skeleton, and many of the functions are just
based on the simple vfs backend, they are there to allow me to run
smbtorture tests against the real parts of the posix backend.
(This used to be commit f2fa7fe565)
2007-10-10 12:58:52 -05:00
Andrew Tridgell
03cb4367d6 r2404: the first large lump of posix vfs stuff.
this is still very much a skeleton (with many limbs missing too!). I
am committing this early to get some feedback on the approach taken.
(This used to be commit 40d5cae5eb)
2007-10-10 12:58:48 -05:00