summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls_util.c
diff options
context:
space:
mode:
authorderaadt <>2026-03-10 05:26:04 +0000
committerderaadt <>2026-03-10 05:26:04 +0000
commit71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab (patch)
tree6e2c1fb20742e5ee81b095f375379c54645c81a0 /src/lib/libtls/tls_util.c
parent78f85e779d20fa57aa5102634e747be7f9343cf6 (diff)
downloadopenbsd-71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab.tar.gz
openbsd-71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab.tar.bz2
openbsd-71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab.zip
use O_CLOEXEC; ok tb
Diffstat (limited to 'src/lib/libtls/tls_util.c')
-rw-r--r--src/lib/libtls/tls_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_util.c b/src/lib/libtls/tls_util.c
index b276d2cfa7..d93efb830d 100644
--- a/src/lib/libtls/tls_util.c
+++ b/src/lib/libtls/tls_util.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_util.c,v 1.16 2023/05/14 07:26:25 op Exp $ */ 1/* $OpenBSD: tls_util.c,v 1.17 2026/03/10 05:26:04 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 4 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
@@ -162,7 +162,7 @@ tls_load_file(const char *name, size_t *len, char *password)
162 162
163 *len = 0; 163 *len = 0;
164 164
165 if ((fd = open(name, O_RDONLY)) == -1) 165 if ((fd = open(name, O_RDONLY|O_CLOEXEC)) == -1)
166 return (NULL); 166 return (NULL);
167 167
168 /* Just load the file into memory without decryption */ 168 /* Just load the file into memory without decryption */