In the darkest hour on Fri, 17 Dec 2004 17:21:53 +0530,
km <[EMAIL PROTECTED]> screamed:
> Is there a way to  create  a unique file name; safely
> i have used os.tmpnam() with python2.4, i warns that the usage is a potential 
> security risk.
>

Security risk comes from posix tmpnam itself.
>From tmpnam manual:

BUGS
       The precise meaning of `appropriate' is undefined;  it  is  unspecified
       how  accessibility  of a directory is determined.  Never use this func-
       tion. Use mkstemp(3) instead.

Use tempfile.mkstemp() instead.

-- 
[ Artur M. Piwko : Pipen : AMP29-RIPE : RLU:100918 : From == Trap! : SIG:214B ]
[ 22:11:02 user up 10467 days, 10:06,  1 user, load average: 0.06, 0.06, 0.06 ]

                          Another megabytes the dust.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to