Call for testing: OpenSSH-6.3

Damien Miller djm at mindrot.org
Sun Aug 4 11:20:10 EST 2013


On Sat, 3 Aug 2013, Darren Tucker wrote:

> > We could add a runtime fallback in misc.c:monotime() but it'd be kinda
> > ugly.
> 
> Like this?

ok djm if it fixes Kevin's problem. Kevin, could you please try this patch?

> Index: misc.c
> ===================================================================
> RCS file: /home/dtucker/openssh/cvs/openssh/misc.c,v
> retrieving revision 1.118
> diff -u -p -r1.118 misc.c
> --- misc.c	18 Jul 2013 06:13:19 -0000	1.118
> +++ misc.c	3 Aug 2013 08:41:31 -0000
> @@ -859,14 +859,17 @@ monotime(void)
>  {
>  #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
>  	struct timespec ts;
> +	static int gettime_failed = 0;
>  
> -	if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
> -		fatal("clock_gettime: %s", strerror(errno));
> +	if (!gettime_failed) {
> +		if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
> +			return (ts.tv_sec);
> +		debug3("clock_gettime: %s", strerror(errno));
> +		gettime_failed = 1;
> +	}
> +#endif
>  
> -	return (ts.tv_sec);
> -#else
>  	return time(NULL);
> -#endif
>  }
>  
>  void
> 
> -- 
> Darren Tucker (dtucker at zip.com.au)
> GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
>     Good judgement comes with experience. Unfortunately, the experience
> usually comes from bad judgement.
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
> 


More information about the openssh-unix-dev mailing list