add the O_EXCL open flag, to prevent O_CREAT from following a symbolic
link.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7243
dc483132-0cff-0310-8789-
dd5450dbe970
+Thu Dec 21 18:28:09 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * fcc_maybe.c (krb5_fcc_open_file): In the case of
+ FCC_OPEN_AND_ERASE, unlink the old filename, and then add
+ the O_EXCL open flag, to prevent O_CREAT from following a
+ symbolic link.
+
Fri Oct 6 22:03:16 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in: Remove ##DOS!include of config/windows.in.
data->mode = mode;
switch(mode) {
case FCC_OPEN_AND_ERASE:
- open_flag = O_CREAT|O_TRUNC|O_RDWR;
+ unlink(data->filename);
+ open_flag = O_CREAT|O_EXCL|O_TRUNC|O_RDWR;
break;
case FCC_OPEN_RDWR:
open_flag = O_RDWR;