Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / tripwire / patches / patch-ad
blob0d65483ee1fcde3da549736a867c2bc2a2037fdd
1 $NetBSD$
3 --- src/utils.c.orig    1994-07-25 09:23:16.000000000 -0700
4 +++ src/utils.c
5 @@ -697,8 +697,13 @@ direntry_print (name, statbuf, mode)
6  
7         print_perm((uint32)statbuf.st_mode);
8  
9 +#if (defined(BSD) && BSD >= 199306)
10 +       (void) printf(" %-9.9s %7lld %s", owner, statbuf.st_size,
11 +                                               a_time + 4);
12 +#else
13         (void) printf(" %-9.9s %7d %s", owner, statbuf.st_size,
14                                                 a_time + 4);
15 +#endif
16         printf(" %s\n", name);
18  }
19 @@ -789,13 +794,10 @@ fd_tempfilename_generate()
20      int fd;
22      (void) strcpy(tmp, TEMPFILE_TEMPLATE);
23 -    if ((char *) mktemp(tmp) == NULL) {
24 -       perror("tempfilename_generate: mktemp()");
25 -       exit(1);
26 -    }
27 +    fd = mkstemp(tmp);
29 -    if ((fd = open(tmp, O_RDWR | O_CREAT, 0600)) < 0) {
30 -       perror("tempfilename_generate: open()");
31 +    if (fd == -1) {
32 +       perror("tempfilename_generate: mkstemp()");
33         exit(1);
34      }
35      /* unlink right away to make sure no one can tamper with our file */