Bugs item #1584723, was opened at 2006-10-25 22:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1584723&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andreas (andyfloe) Assigned to: Nobody/Anonymous (nobody) Summary: os.tempnam fails on SUSE Linux to accept directory argument Initial Comment: On SUSE Linux 10.1 the function os.tempnam does not use the "dir" argument properly. It always takes the tmpdir, in this case "/tmp". In the example below it is expected to get a filename of '/tmp/tmp/pref2iGGS5' instead of '/tmp/pref2iGGS5'. [EMAIL PROTECTED]:~> python Python 2.5 (r25:51908, Oct 18 2006, 22:50:32) [GCC 4.1.0 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.mkdir("/tmp/tmp") >>> os.tempnam("/tmp/tmp", "pref") __main__:1: RuntimeWarning: tempnam is a potential security risk to your program '/tmp/pref2iGGS5' >>> [EMAIL PROTECTED]:~> ls -l /tmp/tmp total 0 [EMAIL PROTECTED]:~> ls -ld /tmp/tmp drwxr-xr-x 2 auser users 48 2006-10-17 20:13 /tmp/tmp This behavior is also the same on the Python version which comes with SUSE Linux 10.1. On Solaris 10 the behavior is as expected, e.g. -bash-3.00$ python Python 2.4.3 (#1, Sep 16 2006, 10:31:38) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.mkdir("/tmp/tmp") >>> os.tempnam("/tmp/tmp", "pref") __main__:1: RuntimeWarning: tempnam is a potential security risk to your program '/tmp/tmp/prefAAAIeaafH' A patch for the test 'test_os.py' is attached to this report. It has been tested on SUSE Linux 10.1. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1584723&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com