mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
bsnmp: Use mkstemp when creating clients local socket
Reviewed by: harti, rew Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. X-NetApp-PR: #72 Differential Revision: https://reviews.freebsd.org/D34550
This commit is contained in:
parent
80c3eb7bc6
commit
81e0e7b9e3
1 changed files with 1 additions and 1 deletions
|
|
@ -1012,7 +1012,7 @@ open_client_local(const char *path)
|
|||
snprintf(snmp_client.local_path, sizeof(snmp_client.local_path),
|
||||
"%s", SNMP_LOCAL_PATH);
|
||||
|
||||
if (mktemp(snmp_client.local_path) == NULL) {
|
||||
if (mkstemp(snmp_client.local_path) == -1) {
|
||||
seterr(&snmp_client, "%s", strerror(errno));
|
||||
(void)close(snmp_client.fd);
|
||||
snmp_client.fd = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue