summaryrefslogtreecommitdiff
path: root/source/lib/time.c
Commit message (Collapse)AuthorAgeFilesLines
* add Tru64 sub-second resolution timestamp supportBjörn Jacke2009-02-161-0/+24
| | | | (cherry picked from commit 61465c57b9579a6f25381a9f16bca0852ca67f75)
* add missing semicolonsBjörn Jacke2009-02-161-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 (cherry picked from commit ee90448a7aa0a0972e5801b319a011fd52750c20)
* Following Björn JACKE's patch, unify the detection of the timespec code in ↵Jeremy Allison2009-02-161-0/+36
| | | | | | | configure.in, and the application of it in time.c Jeremy. (cherry picked from commit 9ef86eff7ac41a174dcb8eae070eda24006c6c70)
* Deal with systems that don't initialize birthtime correctly.Jeremy Allison2008-09-011-4/+10
| | | | | | Pointed out by SATOH Fumiyasu <fumiyas@osstech.jp>. Jeremy. (cherry picked from commit 21d067c5dbf1e5b7233e9af9c60df25403f79afb)
* Add st_birthtime and friends for accurate create times on systems that ↵Jeremy Allison2008-09-011-10/+30
| | | | | | | | support it (*BSD and MacOSX). Should have done this ages ago, sorry. Jeremy. (cherry picked from commit ea11816faa38cd2ecdd7384b2fb0f651b3081cd5)
* time: move uint64s_nt_time_to_unix_abs() to lib/time.cGünther Deschner2008-06-231-0/+7
| | | | Guenther
* 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.
* 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
* Some C++ warningsVolker Lendecke2007-12-211-2/+2
|
* 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.
* 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.
* r24949: Remove some static buffersVolker Lendecke2007-10-101-10/+8
|
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23357: timespec_current() was returning the wrong ns timeJeremy Allison2007-10-101-1/+1
| | | | | (multiplying tv_sec, not tv_usec). Jeremy.
* 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()
* r23006: Arg. Fix stupid typo in 64-bit path.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23005: If we're running on a system where time_t is 8 bytesJeremy Allison2007-10-101-0/+31
| | | | | | | | we have to take care to preserve the "special" values for Windows of 0x80000000 and 0x7FFFFFFF when casting between time_t and uint32. Add conversion functions (and use them). Jeremy.
* r21714: Change the VFS interface to use struct timespecJeremy Allison2007-10-101-31/+113
| | | | | | | | | | for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy.
* r21637: Get "password never expires" account policy working.Jim McDonough2007-10-101-3/+9
| | | | | 0x8000000000000000LL is "infinity" to NT and should not be converted numerically to time_t.
* r21060: Start refactoring out the non-return case statementsJeremy Allison2007-10-101-8/+8
| | | | | into functions. Jeremy.
* r20695: Remove duplication of constants.Jeremy Allison2007-10-101-11/+2
| | | | Jeremy.
* r20694: To get this right we need to do signed 64-bitJeremy Allison2007-10-101-7/+7
| | | | | | | comparisons here, not unsigned as we're eventually casting into what it normall a signed 32 bit value. Guenther please check (but I think I'm right here). Jeremy.
* r20692: Fix bug found by Guenther -Jeremy Allison2007-10-101-1/+1
| | | | | | | | | | | | | | | Just try to log on in offline mode without the fix: all accounts are expired, although they are set to never expire in the PAC/info3. NTTIME "Never" needs to get (time_t) -1. We were casting a uint64 to time_t before comparing, and we should have been doing it the other way around. Guenther please check this fixes things. Jeremy.
* r18597: A C++ warningVolker Lendecke2007-10-101-1/+1
|
* r18188: merge 3.0-libndr branchJelmer Vernooij2007-10-101-848/+838
|
* r18009: Fixes bug 4026.Derrell Lipman2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | This completes the work Jeremy began last week, disambiguating the meaning of c_time. (In POSIX terminology, c_time means "status Change time", not "create time".) All uses of c_time, a_time and m_time have now been replaced with change_time, access_time, and write_time, and when creation time is intended, create_time is used. Additionally, the capability of setting and retrieving the create time have been added to the smbc_setxattr() and smbc_getxattr() functions. An example of setting all four times can be seen with the program examples/libsmbclient/testacl with the following command line similar to: testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt' The -f option turns on the new mode which uses full time names in the attribute specification (e.g. ACCESS_TIME vs A_TIME).
* r17834: Another bug found by Volker's tests in the build farm !Jeremy Allison2007-10-101-7/+1
| | | | | Correctly map large nt timevals to TIME_T_MAX. Jeremy.
* r17831: Attempt to fix the build farm: 0x7fffffffffffffff needs special ↵Volker Lendecke2007-10-101-0/+6
| | | | | | | | | | | | | | | | | | | casing too I think. This broke 'make test' because the newly created user was set to be kicked off Mi, 22 Jan 1975 23:55:33 CET (unix time 159663333) with the setuserinfo21 call. I'm not 100% sure that 0x7ff... means max time as I do it here, I vaguely remember it to mean "don't touch". Does anybody know that for sure? Jeremy, please check this. Thanks, Volker
* r17818: Fixup uint64 time calc. NT time is a 64 bit number,Jeremy Allison2007-10-101-3/+3
| | | | | not high value seconds, low value 100ns units. Jeremy.
* r17812: Fix bad unsigned comparisons with TIME_T_MIN/TIME_T_MAX.Jeremy Allison2007-10-101-3/+3
| | | | Jeremy.
* r17809: Add in 64-bit integer time calculations (taken fromJeremy Allison2007-10-101-41/+160
| | | | | | | Samba4) for machines that have 64-bit integers. Leave the (double) code for machines that don't. Needs testing.... :-). Jeremy.
* r17800: Start using struct timespec internally for file timesJeremy Allison2007-10-101-26/+147
| | | | | | | | | on the wire. This allows us to go to nsec resolution for systems that support it. It should also now be easy to add a correct "create time" (birth time) for systems that support it (*BSD). I'll be watching the build farm closely after this one for breakage :-). Jeremy.
* r17767: Argggg. Broke the build. Need to fix callers of put_long_date()Jeremy Allison2007-10-101-68/+29
| | | | | and interpret_long_date() first. Reverting... Jeremy.
* r17766: Getting ready to properly expose 100ns times onJeremy Allison2007-10-101-29/+68
| | | | | | the wire. Move the internals of nt_time functions to use struct timespecs. Jeremy.
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-1/+46
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.
* r16230: Fix Klocwork #861 and others. localtime and asctimeJeremy Allison2007-10-101-6/+32
| | | | | can return NULL. Ensure we check all returns correctly. Jeremy.
* r16047: Remove unnecessary line, as this value is set in either branch of theJim McDonough2007-10-101-1/+0
| | | | 'if' below. Spotted by Aleksey Fedoseev.
* r15449: Remove unused function get_nttime_max (which claims itJames Peach2007-10-101-6/+0
| | | | is incorrect).
* r13427: Fix ctime -> st_ctime.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r13423: Write wrapper functions (and configure tests) so we canJeremy Allison2007-10-101-0/+102
| | | | | | | always assume we can get a struct timespec out of a stat struct. This will allow us to portably move to nsec timestamps on files and directories in the file server code in future. Jeremy.
* r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)Volker Lendecke2007-10-101-7/+21
| | | | | | | | | | Implement 'net rpc shell account' -- An editor for account policies nt_time_to_unix_abs changed its argument which to me seems wrong, and I could not find a caller that depends on this. So I changed it. Applied some more const in time.c. Volker
* r11530: Add the "time offset" parameter back in for people whoJeremy Allison2007-10-101-1/+1
| | | | | might use it. Jeremy.
* r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison2007-10-101-243/+233
| | | | | | | | | | | | | | | | of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-0/+138
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r8946: Some casts to fix warnings when time_t is an unsigned type. FixesTim Potter2007-10-101-3/+3
| | | | bugzilla #1888 and #1894.
* r7139: trying to reduce the number of diffs between trunk and 3.0; changing ↵Gerald Carter2007-10-101-1/+1
| | | | version to 3.0.20pre1
* r6014: rather large change set....Gerald Carter2007-10-101-0/+22
| | | | | | | | | | | | | | pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon).
* r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t ↵Jeremy Allison2007-10-101-0/+7
| | | | | | values. Jeremy.
* r5342: Reformat some very old code.Jeremy Allison2007-10-101-256/+281
| | | | Jeremy.