summaryrefslogtreecommitdiffstats
path: root/source/lib/time.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-03-16 20:59:47 +0000
committerJeremy Allison <jra@samba.org>1998-03-16 20:59:47 +0000
commit7f118970da7c43eaddcf92dc056d3e849f1e7d5c (patch)
tree5721b94f688ae60625f31fcc564aef3a34bc7bb0 /source/lib/time.c
parentac7cd9cacf2493b52d4db50d4fd4b8b08adfe837 (diff)
downloadsamba-7f118970da7c43eaddcf92dc056d3e849f1e7d5c.tar.gz
samba-7f118970da7c43eaddcf92dc056d3e849f1e7d5c.tar.xz
samba-7f118970da7c43eaddcf92dc056d3e849f1e7d5c.zip
Adding the same change as was added to 1.9.18 branch to add the
"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.
Diffstat (limited to 'source/lib/time.c')
-rw-r--r--source/lib/time.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/lib/time.c b/source/lib/time.c
index c5584fd143b..050b4725a79 100644
--- a/source/lib/time.c
+++ b/source/lib/time.c
@@ -500,10 +500,15 @@ char *timestring(void )
structure.
****************************************************************************/
-time_t get_create_time(struct stat *st)
+time_t get_create_time(struct stat *st,BOOL fake_dirs)
{
- time_t ret = MIN(st->st_ctime, st->st_mtime);
- time_t ret1 = MIN(ret, st->st_atime);
+ time_t ret, ret1;
+
+ if(S_ISDIR(st->st_mode) && fake_dirs)
+ return (time_t)315493200L; /* 1/1/1980 */
+
+ ret = MIN(st->st_ctime, st->st_mtime);
+ ret1 = MIN(ret, st->st_atime);
if(ret1 != (time_t)0)
return ret1;