85e85f6d49fc60e860faa858d522f30dbb1597e4
jcasper
  Mon Jul 17 15:12:21 2017 -0700
maybeTouchFile() will now succeed at updating mtime/atime to now on files
owned by another, but for which the user has write permisson, refs #19812

diff --git src/lib/osunix.c src/lib/osunix.c
index 58f134e..2e6b9f2 100644
--- src/lib/osunix.c
+++ src/lib/osunix.c
@@ -685,33 +685,31 @@
  * only.  */
 {
 va_list args;
 va_start(args, format);
 vaDumpStack(format, args);
 va_end(args);
 }
 
 boolean maybeTouchFile(char *fileName)
 /* If file exists, set its access and mod times to now.  If it doesn't exist, create it.
  * Return FALSE if we have a problem doing so (e.g. when qateam is gdb'ing and code tries 
  * to touch some file owned by www). */
 {
 if (fileExists(fileName))
     {
-    struct utimbuf ut;
-    ut.actime = ut.modtime = clock1();
-    int ret = utime(fileName, &ut);
+    int ret = utime(fileName, NULL);
     if (ret != 0)
 	{
 	warn("utime(%s) failed (ownership?)", fileName);
 	return FALSE;
 	}
     }
 else
     {
     FILE *f = fopen(fileName, "w");
     if (f == NULL)
 	return FALSE;
     else
 	carefulClose(&f);
     }
 return TRUE;