git.samba.org
/
abartlet
/
lorikeet-heimdal.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b74fa12
)
Fix fcc_remove_cred() on platforms with non-standard rename()
author
Asanka Herath
<asanka@secure-endpoints.com>
Tue, 24 Aug 2010 04:00:16 +0000
(
00:00
-0400)
committer
Asanka C. Herath
<asanka@secure-endpoints.com>
Tue, 14 Sep 2010 12:03:31 +0000
(08:03 -0400)
lib/krb5/fcache.c
patch
|
blob
|
history
diff --git
a/lib/krb5/fcache.c
b/lib/krb5/fcache.c
index 85c95bd5e8e77a2289ce5eada4258abd92b7f1fd..1e6397427569df30e5909c90d1e04411bd5b9375 100644
(file)
--- a/
lib/krb5/fcache.c
+++ b/
lib/krb5/fcache.c
@@
-814,6
+814,14
@@
fcc_remove_cred(krb5_context context,
}
ret = rename(&newname[5], FILENAME(id));
+#ifdef RENAME_DOES_NOT_UNLINK
+ if (ret && (errno == EEXIST || errno == EACCES)) {
+ ret = unlink(FILENAME(id));
+ if (ret == 0) {
+ ret = rename(&newname[5], FILENAME(id));
+ }
+ }
+#endif
if (ret)
ret = errno;
free(newname);