summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/krb5/keytab_keyfile.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-30 07:38:02 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-30 07:38:02 +1000
commite82f2187325274d728ec7470990f971e7b3db13c (patch)
tree25ce940a5b2a57c6191265664fad0e70aee951fa /source4/heimdal/lib/krb5/keytab_keyfile.c
parent9817f3d785ceb67819a9def0e8030272e4ba9e14 (diff)
parent81dcc99e9acb9a7e4c2358e5e44998e4718dc658 (diff)
downloadsamba-e82f2187325274d728ec7470990f971e7b3db13c.tar.gz
samba-e82f2187325274d728ec7470990f971e7b3db13c.tar.bz2
samba-e82f2187325274d728ec7470990f971e7b3db13c.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit f008c3b6ee324056fd9b63f6151ad6849640c959)
Diffstat (limited to 'source4/heimdal/lib/krb5/keytab_keyfile.c')
-rw-r--r--source4/heimdal/lib/krb5/keytab_keyfile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/heimdal/lib/krb5/keytab_keyfile.c b/source4/heimdal/lib/krb5/keytab_keyfile.c
index 7e14cbd329..3339a96319 100644
--- a/source4/heimdal/lib/krb5/keytab_keyfile.c
+++ b/source4/heimdal/lib/krb5/keytab_keyfile.c
@@ -33,7 +33,7 @@
#include "krb5_locl.h"
-RCSID("$Id: keytab_keyfile.c 23316 2008-06-23 04:32:32Z lha $");
+RCSID("$Id$");
/* afs keyfile operations --------------------------------------- */
@@ -194,7 +194,7 @@ akf_start_seq_get(krb5_context context,
int32_t ret;
struct akf_data *d = id->data;
- c->fd = open (d->filename, O_RDONLY|O_BINARY, 0600);
+ c->fd = open (d->filename, O_RDONLY | O_BINARY | O_CLOEXEC, 0600);
if (c->fd < 0) {
ret = errno;
krb5_set_error_message(context, ret, "keytab afs keyfil open %s failed: %s",
@@ -301,10 +301,10 @@ akf_add_entry(krb5_context context,
return 0;
}
- fd = open (d->filename, O_RDWR | O_BINARY);
+ fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC);
if (fd < 0) {
fd = open (d->filename,
- O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600);
+ O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_CLOEXEC, 0600);
if (fd < 0) {
ret = errno;
krb5_set_error_message(context, ret, "open(%s): %s", d->filename,