Use O_EXCL when creating a new keyfile.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11414 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
calculations. Potential problem areas pointed out by
|
calculations. Potential problem areas pointed out by
|
||||||
Sebastian Krahmer <krahmer@suse.de>.
|
Sebastian Krahmer <krahmer@suse.de>.
|
||||||
|
|
||||||
|
* lib/krb5/keytab_keyfile.c (akf_add_entry): Use O_EXCL when
|
||||||
|
creating a new keyfile.
|
||||||
|
|
||||||
2002-09-09 Johan Danielsson <joda@pdc.kth.se>
|
2002-09-09 Johan Danielsson <joda@pdc.kth.se>
|
||||||
|
|
||||||
* configure.in: don't try to build pam module
|
* configure.in: don't try to build pam module
|
||||||
|
@@ -297,7 +297,7 @@ akf_add_entry(krb5_context context,
|
|||||||
fd = open (d->filename, O_RDWR | O_BINARY);
|
fd = open (d->filename, O_RDWR | O_BINARY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fd = open (d->filename,
|
fd = open (d->filename,
|
||||||
O_RDWR | O_BINARY | O_CREAT, 0600);
|
O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
ret = errno;
|
ret = errno;
|
||||||
krb5_set_error_string(context, "open(%s): %s", d->filename,
|
krb5_set_error_string(context, "open(%s): %s", d->filename,
|
||||||
|
Reference in New Issue
Block a user