2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
20 #include <sys/types.h>
35 register char *pn; /* path name we're dealing with */
39 ("usage: owntest <file owned by somoneelse, but still writable>\n");
44 printf("Starting tests on %s.\n", pn);
45 code = chmod(pn, 0444);
47 perror("chmod to RO");
50 code = chmod(pn, 0666);
52 perror("chmod back to RW");
55 gettimeofday(&tv[0], NULL);
56 gettimeofday(&tv[1], NULL);
57 tv[0].tv_sec -= 10000;
59 tv[1].tv_sec -= 20000;
61 code = utimes(pn, tv);
66 code = stat(pn, &tstat);
71 if (tstat.st_mtime != tv[1].tv_sec) {
72 printf("modtime didn't stick\n");