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>
19 #include <sys/types.h>
34 register char *pn; /* path name we're dealing with */
38 ("usage: owntest <file owned by somoneelse, but still writable>\n");
43 printf("Starting tests on %s.\n", pn);
44 code = chmod(pn, 0444);
46 perror("chmod to RO");
49 code = chmod(pn, 0666);
51 perror("chmod back to RW");
54 gettimeofday(&tv[0], NULL);
55 gettimeofday(&tv[1], NULL);
56 tv[0].tv_sec -= 10000;
58 tv[1].tv_sec -= 20000;
60 code = utimes(pn, tv);
65 code = stat(pn, &tstat);
70 if (tstat.st_mtime != tv[1].tv_sec) {
71 printf("modtime didn't stick\n");