summaryrefslogtreecommitdiffstats
path: root/source3/lib/time.c
Commit message (Collapse)AuthorAgeFilesLines
* r13427: Fix ctime -> st_ctime.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 95793d7e64d30190ebf917745c719f9c5a1b31e2)
* 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. (This used to be commit 07132d8796a08aa71d6719cb07b5b2c999930632)
* 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 (This used to be commit fc73690a7000d5a3f0f5ad34461c1f3a87edeac5)
* r11530: Add the "time offset" parameter back in for people whoJeremy Allison2007-10-101-1/+1
| | | | | | might use it. Jeremy. (This used to be commit b745114423a482ea8cd1ea4f80ec3fc2a9caa971)
* 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. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
* 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) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
* r8946: Some casts to fix warnings when time_t is an unsigned type. FixesTim Potter2007-10-101-3/+3
| | | | | bugzilla #1888 and #1894. (This used to be commit dcc74371388d280d8ee5130a04e1594ae88d19b3)
* 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 (This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
* 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). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
* r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t ↵Jeremy Allison2007-10-101-0/+7
| | | | | | | values. Jeremy. (This used to be commit 00f8ac509aaf2f40a067f5fe5c7699ae6f26571e)
* r5342: Reformat some very old code.Jeremy Allison2007-10-101-256/+281
| | | | | Jeremy. (This used to be commit 08553faeeb77aef46264f4dfe738bc202e87ea23)
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-2/+1
| | | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
* r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison2007-10-101-0/+6
| | | | | | | | | fix. I'm still doing more testing, but it fixes a behaviour that we've been wrong on ever since the start of Samba. Jeremy. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
* Clean up a comment noticed by Jonathan Shao@Panasas.com and remove anRichard Sharpe2003-11-261-3/+2
| | | | | obsolete comment by Luke Leighton. (This used to be commit 316f83add76b56fe102f5dc4c9ce3a0413d9a1f4)
* Use the actual size of the buffer in strftime instead of a made up valueTim Potter2003-11-041-1/+1
| | | | | which just happens to be less than sizeof(fstring). Closes #713. (This used to be commit 761e13da4ef8294f0b131ad7f672d023b0d222f6)
* make nt-time <-> unix-time functions nearly reversibleSimo Sorce2003-10-121-2/+5
| | | | (This used to be commit bda64a11f7c11ca303122299c3e41c49e6afd933)
* applied patch from bug#140Andrew Tridgell2003-06-091-1/+2
| | | | | this fixes a timestamp problem with 64 bit machines (This used to be commit 0ce6eddad8e148bc6d195ddefb773326339d06e6)
* Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.Andrew Bartlett2003-02-241-1/+1
| | | | | Andrew Bartlett (This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
* The _abs time functions should not be converting from/to GMT.Jeremy Allison2002-12-101-18/+11
| | | | | | Patch from "Jordan Russell" <jr-list-samba-technical@quo.to> Jeremy. (This used to be commit 199c9fcbb9e9a5d4b75ac370d358f54e91808e76)
* sync with HEADGerald Carter2002-09-261-2/+12
| | | | (This used to be commit ee9cbf58071adb627a49a94c6340aaba330486b5)
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-0/+6
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-6/+1
| | | | (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Round and round we go....Jeremy Allison2002-01-111-1/+2
| | | | | Jeremy. (This used to be commit 2603ab3c6870f3697751b887e940910713f08985)
* Latest attempt at changeid.Jeremy Allison2002-01-111-2/+26
| | | | | Jeremy. (This used to be commit 24ee18c77e1b61004d8ed817118a481f3d43e34c)
* added a tdb to store the account policy informations.Jean-François Micouleau2001-12-031-0/+88
| | | | | | | | | | | | | | | You can change them with either usermanager->policies->account or from a command prompt on NT/W2K: net accounts /domain we can add a rpc accounts to the net command. As the net_rpc.c is still empty, I did not start. How should I add command to it ? Should I take the rpcclient/cmd_xxx functions and call them from there ? alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more for jeremy ;-) J.F. (This used to be commit bc28a8eebd9245ce3004ae4b1a359db51f77bf21)
* Removed TimeInit() call from every client program (except for one placeTim Potter2001-11-231-12/+26
| | | | | | in smbd/process.c where the timezone is reinitialised. Was replaced with check for a static is_initialised boolean. (This used to be commit 8fc772c9e5770cd3a8857670214dcff033ebae32)
* Fixed the bug with member servers in a Samba PDC hosted domain not allowingJeremy Allison2001-10-021-0/+18
| | | | | | | other access. Problem was max time was being set to 0xffffffff, instead of 0x7fffffff. Jeremy. (This used to be commit 94403d841710391ec26539e4b4157439d5778ff7)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* move to SAFE_FREE()Simo Sorce2001-09-171-1/+1
| | | | (This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
* Merge from TNG - function to initialise NTTIME structure.Tim Potter2001-08-281-0/+9
| | | | (This used to be commit 14bc8283f26fb80633575e471de4a15a492113c6)
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-121-3/+6
| | | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also. (This used to be commit fa8e55b8b465114ce209344965c1ca0333b84db9)
* Another large patch for the passdb rewrite.Gerald Carter2000-11-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | o added BOOL own_memory flag in SAM_ACCOUNT so we could use static memory for string pointer assignment or allocate a new string o added a reference TDB passdb backend. This is only a reference and should not be used in production because - RID's are generated using the same algorithm as with smbpasswd - a TDB can only have one key (w/o getting into problems) and we need three. Therefore the pdb_sam-getpwuid() and pdb_getsampwrid() functions are interative searches :-( we need transaction support, multiple indexes, and a nice open source DBM. The Berkeley DB (from sleepycat.com seems to fit this criteria now) o added a new parameter "private dir" as many places in the code were using lp_smb_passwd_file() and chopping off the filename part. This makes more sense to me and I will docuement it in the man pages o Ran through Insure-lite and corrected memory leaks. Need for a public flogging this time Jeremy (-: -- jerry (This used to be commit 4792029a2991bd84251d152a62b1033dec62cee2)
* acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison2000-03-221-1/+1
| | | | | | | | | | | | | | | include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
* Fix from NAKAJI Hiroyuki for a trailing '\n\ in asctime.Jeremy Allison2000-03-151-0/+2
| | | | | Jeremy. (This used to be commit 87df97c9365a185e4ea6bac7b832b8cf38144624)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-17/+51
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* const feeding frenzyLuke Leighton1999-11-081-1/+1
| | | | (This used to be commit e0eb390ab3e2a0cce191e78ea4ff90d088a8895c)
* Added init_nt_time function which initialises an NTTIME to -1.Matthew Chapman1999-02-011-7/+9
| | | | (This used to be commit e1e3875057bed830fdc0aaa9c85f04a1479fd64a)
* rpcclient registry commands.Luke Leighton1998-11-101-37/+42
| | | | (This used to be commit 36fcb4a6e643a05d06a2a273d74318fee7f2c647)
* remove unused arguments from some static functions.Andrew Tridgell1998-10-061-4/+4
| | | | (This used to be commit a9e0e5895a671910f315d9e45eca4fe419d815e5)
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-1/+1
| | | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
* added in samr commands. assistance in returning the missing functions,Luke Leighton1998-09-251-0/+12
| | | | | automatically removed because they were "unused", would be appreciated. (This used to be commit d0f7b0d915973ccb85409af3d6d951a716cd66d2)
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-291-29/+18
| | | | (This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
* nttrans.c: More code towards NT protocol.Jeremy Allison1998-06-301-2/+6
| | | | | | | smb.h: More code towards NT protocol. time.c: Fix for sco bug. Jeremy. (This used to be commit e53f4396ead540bcf9ecd18f3253e49216404a1b)
* Added Paul Eggerts LocalTime patch.Jeremy Allison1998-05-291-8/+28
| | | | | Jeremy. (This used to be commit 6721c28ea6bdb5210836352bb5ffc43d787907fa)
* This is a security audit change of the main source.Jeremy Allison1998-05-121-1/+1
| | | | | | | | | | | | | | | | | | | It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
* Patch from Chris Maltby <chris@softway.com.au>. His comments follow:Jeremy Allison1998-04-021-4/+4
| | | | | | | | | | | | | | | + improvement to smbtar to allow exclusion/inclusion of system and hidden files, and to generate a listing of what has been archived in a format useful for automated backup systems. + add the "Softq" spooling system to samba's printing capabilities. + I have "fixed" the intrusion of US style dates into samba reporting as well. The format yyyy/mm/dd is not only uunambiguous, but also has the benefit of making lexicographic sorts work correctly. Jeremy. (This used to be commit f9dacd1d8b89fccad859c0c6bc7a492823eb4b06)
* Adding the same change as was added to 1.9.18 branch to add theJeremy Allison1998-03-161-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | "name resolve order" parameter. source/Makefile: Re-ordered link for name resolve order code. source/clientgen.c: source/clientutil.c: Added calls to resolve_name(). source/includes.h: Added HPUX zombie fix. source/loadparm.c: Added new name resolve order parameter. source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name() function requested by John. source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server. source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c source/password.c: Call resolve_name() to lookup security=server name. source/reply.c: source/time.c: source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au. source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause problems on many systems. Jeremy. (This used to be commit 7f118970da7c43eaddcf92dc056d3e849f1e7d5c)
* added Date and Expires headers in the mini web server so clients knowAndrew Tridgell1998-03-101-0/+15
| | | | | what they can cache. (This used to be commit b6055e40bb91775a29b756640d95910a6f19814f)