[Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.195,2.195.2.1

Guido van Rossum gvanrossum@users.sourceforge.net
2001年8月18日 22:20:24 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv23914
Modified Files:
 Tag: r22a2-branch
	posixmodule.c 
Log Message:
Merge Skip's warnings for tmpnam into the 2.2a2 branch
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.195
retrieving revision 2.195.2.1
diff -C2 -d -r2.195 -r2.195.2.1
*** posixmodule.c	2001年07月26日 13:41:05	2.195
--- posixmodule.c	2001年08月19日 05:20:22	2.195.2.1
***************
*** 4212,4215 ****
--- 4212,4220 ----
 if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx))
 return NULL;
+ 
+ if (PyErr_Warn(PyExc_RuntimeWarning,
+ 		 "tempnam is a potential security risk to your program") < 0)
+ 	 return NULL;
+ 
 #ifdef MS_WIN32
 name = _tempnam(dir, pfx);
***************
*** 4259,4262 ****
--- 4264,4272 ----
 if (!PyArg_ParseTuple(args, ":tmpnam"))
 return NULL;
+ 
+ if (PyErr_Warn(PyExc_RuntimeWarning,
+ 		 "tmpnam is a potential security risk to your program") < 0)
+ 	 return NULL;
+ 
 #ifdef USE_TMPNAM_R
 name = tmpnam_r(buffer);

AltStyle によって変換されたページ (->オリジナル) /