> lstat("/tmp//preview-level-0-15-b924dc",0xbfbfe894) ERR#2 'No such file or directory'
             ^^

surely this is not nice!! My guess is that the double slash is confusing
everything...

Anyway, I'm more interested in below:

> @@ -2830,9 +2831,17 @@
>      if (preview_make_image_path(p, sizeof(filename), filename, i)>=0)
>      {
>        umask(0177);                   /* create temporary file with "-rw-------" 
>permissions */
> -      fclose(fopen(filename, "wb")); /* make sure file exists, b = binary mode for 
>win32 */
> -      umask(XSANE_DEFAULT_UMASK);    /* define new file permissions */
> -      p->filename[i] = strdup(filename);/* store filename */
> +      fp = fopen(filename, "wb");    /* make sure file exists, b = binary mode for 
>win32 */
> +      if (fp == NULL) {
> +        fprintf(stderr, "%s: could not create for preview-level %d: %s\n", 
>filename, i, strerror(errno));
> +        p->filename[i] = NULL;
> +      }
> +      else
> +      {
> +        fclose(fp);
> +        umask(XSANE_DEFAULT_UMASK);  /* define new file permissions */
> +        p->filename[i] = strdup(filename);/* store filename */
> +      }


I REALLY hope above code is NEVER EVER run as root, as this is a great
recipe for interesting failures...

/me hands Brian a few symlinks to /etc/master.passwd from /tmp

If you are patching it, make sure you get it right, you'd do
everybody a big favor.

Bye,
        Andrea

-- 
            It is easier to fix Unix than to live with NT.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to