blob: a62e1106f47e6ac1d1d82191891d8e4668da03b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
diff -up system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp system-config-printer-1.2.2/asyncpk1.py
--- system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp 2010-05-07 15:19:03.000000000 +0100
+++ system-config-printer-1.2.2/asyncpk1.py 2010-05-13 13:00:57.759093485 +0100
@@ -153,7 +153,10 @@ class _WriteToTmpFile:
def __init__ (self, kwds, reply_handler, error_handler):
self._reply_handler = reply_handler
self._error_handler = error_handler
- (tmpfd, tmpfname) = tempfile.mkstemp ()
+
+ # Create the temporary file in /tmp to ensure that
+ # cups-pk-helper-mechanism is able to write to it.
+ (tmpfd, tmpfname) = tempfile.mkstemp (dir="/tmp")
os.close (tmpfd)
self._filename = tmpfname
debugprint ("Created tempfile %s" % tmpfname)
diff -up system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp system-config-printer-1.2.2/cupspk.py
--- system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp 2010-04-15 00:11:33.000000000 +0100
+++ system-config-printer-1.2.2/cupspk.py 2010-05-13 13:00:57.760093336 +0100
@@ -385,7 +385,9 @@ class Connection:
filename = None
if (not use_pycups) and (fd != None or file_object != None):
- (tmpfd, tmpfname) = tempfile.mkstemp()
+ # Create the temporary file in /tmp to ensure that
+ # cups-pk-helper-mechanism is able to write to it.
+ (tmpfd, tmpfname) = tempfile.mkstemp(dir="/tmp")
os.close (tmpfd)
pk_args = (resource, tmpfname)
|