]> git.pld-linux.org Git - packages/cups.git/blob - cups-tmprace.patch
- pl for backends
[packages/cups.git] / cups-tmprace.patch
1 --- scheduler/cert.c.orig       Mon Dec 16 05:14:17 2002
2 +++ scheduler/cert.c    Mon Dec 16 05:14:19 2002
3 @@ -51,6 +51,7 @@
4    int          i;                      /* Looping var */
5    cert_t       *cert;                  /* Current certificate */
6    FILE         *fp;                    /* Certificate file */
7 +  int fd;
8    char         filename[1024];         /* Certificate filename */
9    struct group *grp;                   /* System group */
10    static const char *hex = "0123456789ABCDEF";
11 @@ -80,8 +81,11 @@
12    */
13  
14    snprintf(filename, sizeof(filename), "%s/certs/%d", ServerRoot, pid);
15 +  unlink(filename);
16  
17 -  if ((fp = fopen(filename, "w")) == NULL)
18 +  fd = open(filename, O_WRONLY|O_CREAT|O_EXCL, 0400);
19 +
20 +  if (fd < 0 || ((fp = fdopen(fd, "w")) == NULL))
21    {
22      free(cert);
23      return;
This page took 0.021347 seconds and 3 git commands to generate.