[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Jan 10 18:43:01 UTC 2022


The branch, master has been updated
       via  745af26a1a6 s3: includes: Make the comments describing itime consistent. Always use "invented" time.
       via  920611f0bc9 s3: lib: In create_clock_itime(), use timespec_current() -> clock_gettime(CLOCK_REALTIME..).
      from  b5e56a30dfd rpcclient: Fix ncacn_ip_tcp:<ip-address>

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 745af26a1a6531b2e906aa7c1c0355cbab658441
Author: Jones Syue <jonessyue at qnap.com>
Date:   Mon Jan 10 09:29:44 2022 -0800

    s3: includes: Make the comments describing itime consistent. Always use "invented" time.
    
    It gets confusing if we call it "imaginary" or "instantiation"
    in different places.
    
    Signed-off-by: Jones Syue <jonessyue at qnap.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Mon Jan 10 18:42:02 UTC 2022 on sn-devel-184

commit 920611f0bc98229ac4a5ee127af7f99216075341
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jan 10 09:01:09 2022 -0800

    s3: lib: In create_clock_itime(), use timespec_current() -> clock_gettime(CLOCK_REALTIME..).
    
    CLOCK_MONOTONIC (which we previously used) is reset
    when the system is rebooted.
    
    CLOCK_REALTIME is a "wall clock" time. It's still affected by NTP
    changes (for Linux we should probably use CLOCK_TAI instead
    but that is Linux-specific). For most systems CLOCK_REALTIME
    will be good enough.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/include/includes.h | 4 ++--
 source3/lib/system.c       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 6fc2ee25d95..c3d3d351e41 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -205,10 +205,10 @@ struct stat_ex {
 	struct timespec st_ex_ctime;
 	struct timespec st_ex_btime; /* birthtime */
 	/*
-	 * Immutable original birth time aka instantiation time. Set when a file
+	 * Immutable original birth time aka invented time. Set when a file
 	 * is created, never changes thereafter. May not be set by the client.
 	 */
-	struct timespec st_ex_itime; /* instantiation time */
+	struct timespec st_ex_itime; /* invented time */
 
 	blksize_t	st_ex_blksize;
 	blkcnt_t	st_ex_blocks;
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 0eb3d856426..00d31692e00 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -311,7 +311,7 @@ void init_stat_ex_from_stat (struct stat_ex *dst,
 }
 
 /*******************************************************************
- Create a clock-derived itime (imaginary) time. Used to generate
+ Create a clock-derived itime (invented) time. Used to generate
  the fileid.
 ********************************************************************/
 
@@ -323,7 +323,7 @@ void create_clock_itime(struct stat_ex *dst)
 	uint8_t rval;
 
 	/* Start with the system clock. */
-	clock_gettime_mono(&itime);
+	itime = timespec_current();
 
 	/* Convert to NTTIME. */
 	tval = unix_timespec_to_nt_time(itime);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list