summaryrefslogtreecommitdiffstats
path: root/source3/lib/time.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: Use SBVAL in put_long_date_timespecVolker Lendecke2012-09-191-2/+1
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Sep 19 01:16:25 CEST 2012 on sn-devel-104
* s3: Fix some nonempty line endingsVolker Lendecke2012-09-181-12/+12
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Sep 18 22:39:07 CEST 2012 on sn-devel-104
* s3:lib: make_unix_date3() is the same as pull_dos_date3()Stefan Metzmacher2011-10-261-5/+1
| | | | | | | | | | Except for a 'void *' vs. 'uint8_t *'. As a first step let make_unix_date() call pull_dos_date(), so that we he the logic only once. We can fix the callers later. metze
* s3:lib: make_unix_date2() is the same as pull_dos_date2()Stefan Metzmacher2011-10-261-7/+1
| | | | | | | | | | Except for a 'void *' vs. 'uint8_t *'. As a first step let make_unix_date() call pull_dos_date(), so that we he the logic only once. We can fix the callers later. metze
* s3:lib: make_unix_date() is the same as pull_dos_date()Stefan Metzmacher2011-10-261-19/+1
| | | | | | | | | | Except for a 'void *' vs. 'uint8_t *'. As a first step let make_unix_date() call pull_dos_date(), so that we he the logic only once. We can fix the callers later. metze
* lib/util: move some timespec helpers from source3 to the toplevelStefan Metzmacher2011-09-231-146/+0
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Sep 23 00:15:31 CEST 2011 on sn-devel-104
* lib/util/time: Merge time functions from source3/lib/time.cAndrew Bartlett2011-03-011-63/+0
|
* Ensure incoming timespec values correctly wrap at nsecs.Jeremy Allison2010-09-141-0/+4
| | | | Jeremy.
* s3: use clock_gettime() in timespec_current()Björn Jacke2010-08-311-4/+1
|
* s3: Remove some pointless wrapper functionsVolker Lendecke2010-08-051-19/+0
|
* s3: Remove some pointless wrapper functionsVolker Lendecke2010-08-051-17/+1
|
* s3:passdb Remove use of uint8 uint16 and uint32 in favour of C99 typesAndrew Bartlett2010-05-211-2/+2
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-time: Added a function to get the startup time of the server.Andreas Schneider2010-04-231-0/+13
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-time: fix build warnings after we moved to shared time functions.Günther Deschner2010-01-081-6/+6
| | | | | | Bjoern, please check. Guenther
* s3:lib/time: remove TIME_T_MIN/MAX definesBjörn Jacke2010-01-071-8/+0
| | | | we already get them from lib/util/time.h
* ѕ3:lib/time: replace make_dos_ and put_dos_ functions with those from lib/util/Björn Jacke2010-01-071-89/+6
|
* s3:lib/time: remoce null_mtime() - use null_time()Björn Jacke2010-01-071-13/+2
|
* s3:lib/time: remove unused nt_time_equalsBjörn Jacke2010-01-071-8/+0
| | | | we have nt_time_equal doing the same in lib/util/
* s3: Factor timeval_string out of current_timestring()Volker Lendecke2009-11-191-12/+13
|
* Remove "store create time" code, cause create time to be storedJeremy Allison2009-11-171-0/+27
| | | | | | | | | | | | in the "user.DOSATTRIB" EA. From the docs: In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Passes make test but will need more testing. Jeremy.
* Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison2009-08-241-4/+20
| | | | | | | | Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
* Use existing time_t rounding function, don't invent my own.Jeremy Allison2009-08-241-1/+1
| | | | Jeremy.
* Second part of fix for 6529 - Offline files conflict with Vista and Office 2003.Jeremy Allison2009-08-241-0/+10
| | | | | | ext4 may be able to store ns timestamps, but the only API to *set* timestamps takes usec, not nsec. Round to usec on set requests. Jeremy.
* Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison2009-08-211-0/+11
| | | | | | | | On filesystems that can't store less than one second timestamps, round the incoming timestamp set requests so the client can't discover that a time set request has been truncated by the filesystem. Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0. Jeremy
* Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke2009-05-261-245/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
* Make cli_getatr() async.Jeremy Allison2009-05-051-1/+1
| | | | Jeremy.
* Make cli_getattrE async.Jeremy Allison2009-05-051-1/+1
| | | | Jeremy.
* tidy up timestamp checksBjörn Jacke2009-02-121-33/+33
| | | | | | AC_CHECK_MEMBERS should be a sufficient check, there's no need to do manual compile tests. We can also assume that we have ctime and atime members when we have the mtime member.
* add Tru64 sub-second resolution timestamp supportBjörn Jacke2009-01-291-0/+24
|
* add missing semicolonsBjörn Jacke2009-01-291-6/+6
| | | | | the fixed configure check led to a missing semicolon in the now activated BSD code. Then this error was even copypasted into the new AIX code. grrr
* setting mtime setted atime on BSD systems, fix thisBjörn Jacke2009-01-291-2/+2
|
* add AIX sub-second resolution timestamp supportBjörn Jacke2009-01-291-0/+24
|
* This change allows for the autoconfigre detection of sub-second time ↵todd stecher2009-01-231-0/+12
| | | | resolution in the FreeBSD stat structure
* Fix use of "time offset" parameter, and add test to make sure I don't break ↵Jelmer Vernooij2008-12-231-2/+0
| | | | it again :-)
* Use standard types.Jelmer Vernooij2008-10-221-16/+16
|
* Cope with changed signature of http_timestring().Jelmer Vernooij2008-10-111-558/+0
|
* Deal with systems that don't initialize birthtime correctly.Jeremy Allison2008-08-291-4/+10
| | | | | | Pointed out by SATOH Fumiyasu <fumiyas@osstech.jp>. Jeremy. (This used to be commit 4f60348c0a934123a8e15bc741076366f6713390)
* Add st_birthtime and friends for accurate create times on systems that ↵Jeremy Allison2008-08-271-10/+30
| | | | | | | | support it (*BSD and MacOSX). Should have done this ages ago, sorry. Jeremy. (This used to be commit 4c3a9558906f213948c3bdc081be73f8fed148cb)
* time: move uint64s_nt_time_to_unix_abs() to lib/time.cGünther Deschner2008-06-231-0/+7
| | | | | Guenther (This used to be commit 58f54f180f0a942776455ab6e813628422493dac)
* Fix bug #5531 - fix conversion of ns units when converting from nttime to ↵Jeremy Allison2008-06-201-2/+6
| | | | | | | | timespec. Fix from hkurma@datadomain.com. Jeremy. (This used to be commit 8c87a4319cc83f55fb105cae81a8efbc3fb5b98b)
* Add a talloc context parameter to current_timestring() to fix memleaks.Michael Adam2008-03-281-2/+2
| | | | | | | | | | | | | | current_timestring used to return a string talloced to talloc_tos(). When called by DEBUG from a TALLOC_FREE, this produced messages "no talloc stackframe around, leaking memory". For example when used from net conf. This also adds a temporary talloc context to alloc_sub_basic(). For this purpose, the exit strategy is slightly altered: a common exit point is used for success and failure. Michael (This used to be commit 16b5800d4e3a8b88bac67b2550d14e0aaaa302a9)
* Some C++ warningsVolker Lendecke2007-12-211-2/+2
| | | | (This used to be commit 5ab82d4f574f2a2e2761e9e414c66a70aeffb05d)
* Remove the explicit TALLOC_CTX * from cli_struct.Jeremy Allison2007-11-291-3/+3
| | | | | | | Make us very explicit about how long a talloc ctx should last. Jeremy. (This used to be commit ba9e2be2b5a59684e854609f9d82ea1633448c62)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-12/+12
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r24949: Remove some static buffersVolker Lendecke2007-10-101-10/+8
| | | | (This used to be commit df648d47ff3c4e24f439fda839653bda98323100)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r23357: timespec_current() was returning the wrong ns timeJeremy Allison2007-10-101-1/+1
| | | | | | (multiplying tv_sec, not tv_usec). Jeremy. (This used to be commit bafd3b93f9ce74d7a8e2d6b36735f0977a22882c)
* r23041: Remainder of fix for 4630: fix special case of unix_to_nt_time() forJim McDonough2007-10-101-2/+10
| | | | | TIME_T_MAX, and also display of it in http_timestring() (This used to be commit 2553b6a56d20ef6273001ae3b090e156e676592c)
* r23006: Arg. Fix stupid typo in 64-bit path.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 80a63123907c3291d8bdc6d364bf7343f4f084a0)