After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 150329 - File roller creates predictable /tmp directories
File roller creates predictable /tmp directories
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2004-08-17 07:04 UTC by Subrahmanyam Madduri
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Proposed patch (942 bytes, text/plain)
2004-08-17 07:09 UTC, Subrahmanyam Madduri
Details

Description Subrahmanyam Madduri 2004-08-17 07:04:57 UTC
Description of Problem:
When viewing a file within an archive using file roller's internal viewer
will cause file roller to create directories in /tmp which have
a predictable format, 'file-roller.<PID>.<NUM>' where PID is the process
id of the currently running file-roller. NUM is incremented starting from
0.

Steps to reproduce the problem:
1. Create an archive 'foo.tgz' with some files in it.
2. Right click on desktop and choose 'Open Terminal'
3. Run command 'file-roller'
4. Click on 'Open' and open the archive 'foo.tgz'
5. Select any file within the archive and click on 'View' in the toolbar
6. Select 'View with internal viewer' and click on OK
7. Check the /tmp directory listing.

Actual Results:
A directory of the name 'file-roller.PID.NUM' is created.

Expected Results:
Files with predictable names should not be created in world writable
directories.
Comment 1 Subrahmanyam Madduri 2004-08-17 07:09:36 UTC
Created attachment 30631 [details]
Proposed patch
Comment 2 Paolo Bacchilega 2004-08-17 15:42:05 UTC
why predictable directory names are a problem?
Comment 3 Subrahmanyam Madduri 2004-08-18 12:30:11 UTC
In a multi-user  scenario, If one user  creates these /tmp directories by
predicting them and set the mode 000, It might create problems, so only I feel
these namse should be unpredictable as in many other applications like
webbrowser, acrobat-reader etc..


Comment 4 Subrahmanyam Madduri 2004-08-18 12:35:03 UTC
If you feel this is right, I think we can change the way of creating theses /tmp
directories in rest of the code also, as we create these around 8-9 portions of
the code while extracting, executing some commands etc... 

Please let me know your comments, so that I will proceed ahead.
Comment 5 Paolo Bacchilega 2004-08-18 12:47:39 UTC
ok go ahead, 

you only have to change the get_temp_work_dir_name function and remove the
ensure_dir_exists calls on the temp dirs because after the change the
get_temp_work_dir_name function will create the directory also.
Comment 6 Paolo Bacchilega 2004-08-20 07:33:02 UTC
done ;)
Comment 7 Subrahmanyam Madduri 2004-09-27 11:16:31 UTC
Paolo,
Thanks for fixing it in CVS :-)
I was far from work for quite some time..

Anyway I am closing this to be FIXED.