Date: Thu, 4 Feb 2016 09:08:37 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r295247 - user/ngie/bsnmp_cleanup/contrib/bsnmp/lib Message-ID: <201602040908.u1498buB006713@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Thu Feb 4 09:08:36 2016 New Revision: 295247 URL: https://svnweb.freebsd.org/changeset/base/295247 Log: Use mkstemp(3) instead of mktemp(3) when creating temporary files to fix the security pragma Modified: user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c Modified: user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c Thu Feb 4 09:07:44 2016 (r295246) +++ user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c Thu Feb 4 09:08:36 2016 (r295247) @@ -1000,7 +1000,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602040908.u1498buB006713>