summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/ccache/stdio/ChangeLog7
-rw-r--r--src/lib/krb5/ccache/stdio/scc_maybe.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/krb5/ccache/stdio/ChangeLog b/src/lib/krb5/ccache/stdio/ChangeLog
index f36b324bf..e7059f7b3 100644
--- a/src/lib/krb5/ccache/stdio/ChangeLog
+++ b/src/lib/krb5/ccache/stdio/ChangeLog
@@ -1,3 +1,10 @@
+Thu Dec 21 18:33:39 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * scc_maybe.c (krb5_scc_open_file): In the case of
+ SCC_OPEN_AND_ERASE, unlink the filename first, in case
+ there's a symbolic link lurking about. (We should do an
+ exclusive open then, but there's no such thing in stdio.)
+
Mon Sep 25 16:56:51 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in: Removed "foo:: foo-$(WHAT)" lines from the
diff --git a/src/lib/krb5/ccache/stdio/scc_maybe.c b/src/lib/krb5/ccache/stdio/scc_maybe.c
index 706b10bf9..5a535e16c 100644
--- a/src/lib/krb5/ccache/stdio/scc_maybe.c
+++ b/src/lib/krb5/ccache/stdio/scc_maybe.c
@@ -92,6 +92,9 @@ krb5_scc_open_file (context, id, mode)
#ifdef ANSI_STDIO
switch(mode) {
case SCC_OPEN_AND_ERASE:
+ unlink(data->filename);
+ /* XXX should do an exclusive open here, but no way to do */
+ /* this under stdio */
open_flag = "wb+";
break;
case SCC_OPEN_RDWR:
@@ -105,6 +108,9 @@ krb5_scc_open_file (context, id, mode)
#else
switch(mode) {
case SCC_OPEN_AND_ERASE:
+ unlink(data->filename);
+ /* XXX should do an exclusive open here, but no way to do */
+ /* this under stdio */
open_flag = "w+";
break;
case SCC_OPEN_RDWR: