!1 isulad-tools: remove securec functions

Merge pull request !1 from openEuler-iSula/master
This commit is contained in:
openeuler-ci-bot 2019-12-26 15:43:28 +08:00 committed by Gitee
commit b34d4f9e3a
2 changed files with 10 additions and 15 deletions

View File

@ -4,7 +4,7 @@
#Basic Information
Name: isulad-tools
Version: v0.9
Release: 33
Release: 34
Summary: isulad tools for IT, work with iSulad
License: Mulan PSL v1
Source0: %{name}-src.tar.gz
@ -13,7 +13,6 @@ BuildRoot: %{_tmppath}/%{name}-root
#Dependency
BuildRequires: glibc-static
BuildRequires: golang > 1.6
BuildRequires: libsecurec libsecurec-devel
Requires: iSulad
Requires: util-linux
@ -108,6 +107,12 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json
rm -rfv %{buildroot}
%changelog
* Tue Dec 26 2019 Zhangsong<zhangsong34@huawei.com> - 0.9.34
- Type:enhancement
- ID:NA
- SUG:restart
- DESC:remove securec functions
* Tue Dec 11 2018 Zhangsong<zhangsong34@huawei.com> - 0.9.9-1
- Type:enhancement
- ID:NA

View File

@ -15,7 +15,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <securec.h>
#include <sys/types.h>
#include <unistd.h>
#include <endian.h>
@ -35,10 +34,7 @@ int setNetDeviceTSO(int fd, char* name, int on)
eval.data = on;
eval.cmd = ETHTOOL_STSO;
ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name), name, sizeof(ifr.ifr_name) - 1);
if (ret != EOK) {
return -1;
}
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
ifr.ifr_data = (void*)&eval;
ret = ioctl(fd, SIOCETHTOOL, &ifr);
if (ret < 0) {
@ -55,10 +51,7 @@ int setNetDeviceSG(int fd, char* name, int on)
eval.data = on;
eval.cmd = ETHTOOL_SSG;
ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name), name, sizeof(ifr.ifr_name) - 1);
if (ret != EOK) {
return -1;
}
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
ifr.ifr_data = (void*)&eval;
ret = ioctl(fd, SIOCETHTOOL, &ifr);
if (ret < 0) {
@ -75,10 +68,7 @@ int setNetDeviceTX(int fd, char* name, int on)
eval.data = on;
eval.cmd = ETHTOOL_STXCSUM;
ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name), name, sizeof(ifr.ifr_name) - 1);
if (ret != EOK) {
return -1;
}
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
ifr.ifr_data = (void*)&eval;
ret = ioctl(fd, SIOCETHTOOL, &ifr);
if (ret < 0) {