mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-07 06:40:06 +00:00
Upgrade to xsane 0.81.
Temp file handling patches. Reviewed by: nectar Approved by: maintainer: Dominik Brettnacher <domi@saargate.de> Obtained from: Tim Waugh <twaugh@redhat.com>
This commit is contained in:
parent
e1d55a966c
commit
c192fb4c5c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=51139
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= xsane
|
||||
PORTVERSION= 0.76
|
||||
PORTVERSION= 0.81
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://www.xsane.org/download/ \
|
||||
http://gd.tuwien.ac.at/hci/sane/xsane/ \
|
||||
|
@ -1 +1 @@
|
||||
MD5 (xsane-0.76.tar.gz) = 316af9567762af3e8ed0cb6899ee4e80
|
||||
MD5 (xsane-0.81.tar.gz) = 1b3431b812dbd2a56414d18a170e1fe6
|
||||
|
37
graphics/xsane/files/patch-src::xsane-back-gtk.c
Normal file
37
graphics/xsane/files/patch-src::xsane-back-gtk.c
Normal file
@ -0,0 +1,37 @@
|
||||
--- src/xsane-back-gtk.c.tmpfile Wed Nov 21 18:43:20 2001
|
||||
+++ src/xsane-back-gtk.c Wed Nov 21 18:57:22 2001
|
||||
@@ -319,7 +319,6 @@
|
||||
{
|
||||
char tmpbuf[256];
|
||||
uid_t uid;
|
||||
- int rnd;
|
||||
|
||||
uid = getuid();
|
||||
snprintf(tmpbuf, sizeof(tmpbuf), "%d-", uid);
|
||||
@@ -341,12 +340,6 @@
|
||||
memcpy(buf + len, "XXXXXX", 6); /* create unique filename */
|
||||
len += 6;
|
||||
buf[len] = '\0';
|
||||
- memcpy(buf, mktemp(buf), len);
|
||||
-
|
||||
- rnd = random() & 65535; /* add random number */
|
||||
- snprintf(tmpbuf, sizeof(tmpbuf), "%05d-", rnd);
|
||||
- memcpy(buf+len, tmpbuf, strlen(tmpbuf));
|
||||
- len += 6;
|
||||
}
|
||||
|
||||
if (dev_name)
|
||||
@@ -410,6 +403,13 @@
|
||||
|
||||
buf[len++] = '\0';
|
||||
|
||||
+ {
|
||||
+ int fd = mkstemp (buf);
|
||||
+ if (fd == -1)
|
||||
+ return -1;
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
DBG(DBG_proc, "path = \"%s\"\n", buf);
|
||||
|
||||
return 0;
|
10
graphics/xsane/files/patch-src::xsane-save.c
Normal file
10
graphics/xsane/files/patch-src::xsane-save.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/xsane-save.c.tmpfile Wed Nov 21 18:47:48 2001
|
||||
+++ src/xsane-save.c Wed Nov 21 18:47:56 2001
|
||||
@@ -2102,7 +2102,6 @@
|
||||
|
||||
xsane_read_pnm_header(infile, &image_info);
|
||||
|
||||
- remove(output_filename);
|
||||
umask((mode_t) preferences.image_umask); /* define image file permissions */
|
||||
outfile = fopen(output_filename, "wb"); /* b = binary mode for win32 */
|
||||
umask(XSANE_DEFAULT_UMASK); /* define new file permissions */
|
11
graphics/xsane/files/patch-src::xsane-scan.c
Normal file
11
graphics/xsane/files/patch-src::xsane-scan.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/xsane-scan.c.tmpfile Wed Nov 21 18:48:01 2001
|
||||
+++ src/xsane-scan.c Wed Nov 21 18:48:08 2001
|
||||
@@ -1660,7 +1660,6 @@
|
||||
umask((mode_t) preferences.image_umask); /* define image file permissions */
|
||||
}
|
||||
|
||||
- remove(xsane.dummy_filename); /* remove existing file */
|
||||
xsane.out = fopen(xsane.dummy_filename, "wb"); /* b = binary mode for win32 */
|
||||
umask(XSANE_DEFAULT_UMASK); /* define new file permissions */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user