hi

while looking into the encodingserver, I spotted an unsafe use of /tmp ;
 here is the patch

a similar problem may be in kaa

a.
--- /usr/src/freevo/freevo-1.7.0/src/helpers/encodingserver.py	2006-12-27 15:02:48.000000000 +0100
+++ helpers/encodingserver.py	2007-03-25 17:44:27.000000000 +0200
@@ -76,8 +76,6 @@
         except:
             print String(text)
 
-tmppath = '/tmp/encodingserver'
-
 jam = jellyToXML
 unjam = unjellyFromXML
 
@@ -216,13 +214,13 @@
         jlist = self.queue.listJobs()
         return (True, jam(jlist))
 
-        
+import tempfile
+
 def main():
     global DEBUG
-    #check for /tmp/encodingserver and if it doesn't exist make it
-    if not (os.path.exists(tmppath) and os.path.isdir(tmppath)):
-        os.mkdir(tmppath)
-    #chdir to /tmp/encodingserver
+
+    tmppath = tempfile.mkdtemp(prefix = 'encodeserver')
+    #chdir 
     os.chdir(tmppath)
     
     app = Application("EncodingServer")

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to