From f409f3b8d162bfcee3defe15bf474181301efbf5 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Mar 17 2013 14:27:25 +0000 Subject: import libsmi-0.4.8-11.el7.src.rpm --- diff --git a/.libsmi.metadata b/.libsmi.metadata new file mode 100644 index 0000000..3bc5108 --- /dev/null +++ b/.libsmi.metadata @@ -0,0 +1 @@ +77c512ccbdd29667d152398b0dcde533aed57b49 SOURCES/libsmi-0.4.8.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/IETF-MIB-LICENSE.txt b/SOURCES/IETF-MIB-LICENSE.txt new file mode 100644 index 0000000..5fd2a6a --- /dev/null +++ b/SOURCES/IETF-MIB-LICENSE.txt @@ -0,0 +1,41 @@ +MIBs included in this software taken from IETF Documents are considered +Code Components in accordance with the IETF Trust License Policy, as found +here: + +http://trustee.ietf.org/license-info/ + +They are available under the terms of the Simplified BSD license, a copy of +which is included below. + +***** + +Copyright (c) 2013 IETF Trust and the persons identified as authors of +the code. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +· Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +· Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +· Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS +IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/SOURCES/libsmi-0.4.8-CVE-2010-2891.patch b/SOURCES/libsmi-0.4.8-CVE-2010-2891.patch new file mode 100644 index 0000000..f27f23c --- /dev/null +++ b/SOURCES/libsmi-0.4.8-CVE-2010-2891.patch @@ -0,0 +1,20 @@ +diff -up libsmi-0.4.8/lib/smi.c.CVE-2010-2891 libsmi-0.4.8/lib/smi.c +--- libsmi-0.4.8/lib/smi.c.CVE-2010-2891 2010-11-01 14:27:57.209065000 -0400 ++++ libsmi-0.4.8/lib/smi.c 2010-11-01 14:29:17.615065001 -0400 +@@ -1314,10 +1314,15 @@ SmiNode *smiGetNode(SmiModule *smiModule + } + + if (isdigit((int)node2[0])) { +- for (oidlen = 0, p = strtok(node2, ". "); p; ++ for (oidlen = 0, p = strtok(node2, ". "); ++ p && oidlen < sizeof(oid)/sizeof(oid[0]); + oidlen++, p = strtok(NULL, ". ")) { + oid[oidlen] = strtoul(p, NULL, 0); + } ++ if (p) { ++ /* the numeric OID is too long */ ++ return NULL; ++ } + nodePtr = getNode(oidlen, oid); + if (nodePtr) { + if (modulePtr) { diff --git a/SOURCES/libsmi-0.4.8-symbols-clash.patch b/SOURCES/libsmi-0.4.8-symbols-clash.patch new file mode 100644 index 0000000..12f874c --- /dev/null +++ b/SOURCES/libsmi-0.4.8-symbols-clash.patch @@ -0,0 +1,941 @@ +diff -up libsmi-0.4.8/lib/data.c.clash libsmi-0.4.8/lib/data.c +--- libsmi-0.4.8/lib/data.c.clash 2012-10-24 18:07:24.251036502 +0200 ++++ libsmi-0.4.8/lib/data.c 2012-10-24 18:14:14.709159698 +0200 +@@ -79,6 +79,7 @@ static Handle *lastHandlePtr = NULL; + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Handle *addHandle(const char *name) + { + Handle *handlePtr; +@@ -113,7 +114,7 @@ Handle *addHandle(const char *name) + * + *---------------------------------------------------------------------- + */ +- ++__attribute__ ((visibility ("internal"))) + void removeHandle(Handle *handlePtr) + { + if (handlePtr->prevPtr) { +@@ -150,6 +151,7 @@ void removeHandle(Handle *handlePtr) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Handle *findHandleByName(const char *name) + { + Handle *handlePtr; +@@ -186,7 +188,7 @@ Handle *findHandleByName(const char *nam + * + *---------------------------------------------------------------------- + */ +- ++__attribute__ ((visibility ("internal"))) + View *addView(const char *modulename) + { + View *viewPtr; +@@ -221,6 +223,7 @@ View *addView(const char *modulename) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + int isInView(const char *modulename) + { + View *viewPtr; +@@ -257,6 +260,7 @@ int isInView(const char *modulename) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Module *addModule(char *modulename, char *path, ModuleFlags flags, + Parser *parserPtr) + { +@@ -320,6 +324,7 @@ Module *addModule(char *modulename, char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleIdentityObject(Module *modulePtr, Object *objectPtr) + { + modulePtr->objectPtr = objectPtr; +@@ -343,6 +348,7 @@ void setModuleIdentityObject(Module *mod + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleLastUpdated(Module *modulePtr, time_t lastUpdated) + { + modulePtr->lastUpdated = lastUpdated; +@@ -366,6 +372,7 @@ void setModuleLastUpdated(Module *module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleOrganization(Module *modulePtr, char *organization) + { + modulePtr->export.organization = organization; +@@ -392,6 +399,7 @@ void setModuleOrganization(Module *modul + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleContactInfo(Module *modulePtr, char *contactinfo) + { + modulePtr->export.contactinfo = contactinfo; +@@ -415,6 +423,7 @@ void setModuleContactInfo(Module *module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleDescription(Module *modulePtr, char *description, + Parser *parserPtr) + { +@@ -446,6 +455,7 @@ void setModuleDescription(Module *module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleReference(Module *modulePtr, char *reference, Parser *parserPtr) + { + if (modulePtr->export.reference) +@@ -477,6 +487,7 @@ void setModuleReference(Module *modulePt + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Module *findModuleByName(const char *modulename) + { + Module *modulePtr; +@@ -510,6 +521,7 @@ Module *findModuleByName(const char *mod + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Revision *addRevision(time_t date, char *description, Parser *parserPtr) + { + Revision *revisionPtr, *r; +@@ -574,6 +586,7 @@ Revision *addRevision(time_t date, char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setRevisionLine(Revision *revisionPtr, int line, Parser *parserPtr) + { + if (line) { +@@ -603,6 +616,7 @@ void setRevisionLine(Revision *revisionP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Import *addImport(char *name, Parser *parserPtr) + { + Import *importPtr; +@@ -649,6 +663,7 @@ Import *addImport(char *name, Parser *pa + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void addImportFlags(Import *importPtr, ImportFlags flags) + { + importPtr->flags |= flags; +@@ -672,6 +687,7 @@ void addImportFlags(Import *importPtr, I + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setImportModulename(Import *importPtr, char *modulename) + { + if (importPtr->export.module) { +@@ -700,6 +716,7 @@ void setImportModulename(Import *importP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + int checkImports(Module *modulePtr, Parser *parserPtr) + { + int n = 0; +@@ -767,6 +784,7 @@ int checkImports(Module *modulePtr, Pars + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Import *findImportByName(const char *name, Module *modulePtr) + { + Import *importPtr; +@@ -806,6 +824,7 @@ Import *findImportByName(const char *nam + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Import *findImportByModulenameAndName(const char *modulename, + const char *name, Module *modulePtr) + { +@@ -843,6 +862,7 @@ Import *findImportByModulenameAndName(co + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *addObject(char *objectname, Node *parentNodePtr, SmiSubid subid, + ObjectFlags flags, Parser *parserPtr) + { +@@ -940,6 +960,7 @@ Object *addObject(char *objectname, Node + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *duplicateObject(Object *templatePtr, ObjectFlags flags, + Parser *parserPtr) + { +@@ -1020,6 +1041,7 @@ Object *duplicateObject(Object *template + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *addNode (Node *parentNodePtr, SmiSubid subid, NodeFlags flags, + Parser *parserPtr) + { +@@ -1097,6 +1119,7 @@ Node *addNode (Node *parentNodePtr, SmiS + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *createNodes(unsigned int oidlen, SmiSubid *oid) + { + Node *parentNodePtr, *nodePtr; +@@ -1134,6 +1157,7 @@ Node *createNodes(unsigned int oidlen, S + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *createNodesByOidString(const char *oid) + { + char *p, *elements; +@@ -1176,6 +1200,7 @@ Node *createNodesByOidString(const char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *getParentNode(Node *nodePtr) + { + return nodePtr->parentPtr; +@@ -1200,6 +1225,7 @@ Node *getParentNode(Node *nodePtr) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + static void mergeNodeTrees(Node *toNodePtr, Node *fromNodePtr, + Parser *parserPtr) + { +@@ -1300,6 +1326,7 @@ static void mergeNodeTrees(Node *toNodeP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *setObjectName(Object *objectPtr, char *name, Parser *parserPtr) + { + Node *nodePtr, *nextPtr; +@@ -1400,6 +1427,7 @@ Object *setObjectName(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectType(Object *objectPtr, Type *typePtr) + { + objectPtr->typePtr = typePtr; +@@ -1423,6 +1451,7 @@ void setObjectType(Object *objectPtr, Ty + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectAccess(Object *objectPtr, SmiAccess access) + { + objectPtr->export.access = access; +@@ -1446,6 +1475,7 @@ void setObjectAccess(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectStatus(Object *objectPtr, SmiStatus status) + { + objectPtr->export.status = status; +@@ -1469,6 +1499,7 @@ void setObjectStatus(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectDescription(Object *objectPtr, char *description, + Parser *parserPtr) + { +@@ -1500,6 +1531,7 @@ void setObjectDescription(Object *object + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectReference(Object *objectPtr, char *reference, Parser *parserPtr) + { + if (objectPtr->export.reference) +@@ -1529,6 +1561,7 @@ void setObjectReference(Object *objectPt + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectFormat(Object *objectPtr, char *format) + { + if (objectPtr->export.format) smiFree(objectPtr->export.format); +@@ -1553,6 +1586,7 @@ void setObjectFormat(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectUnits(Object *objectPtr, char *units) + { + if (objectPtr->export.units) smiFree(objectPtr->export.units); +@@ -1577,6 +1611,7 @@ void setObjectUnits(Object *objectPtr, c + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectDecl(Object *objectPtr, SmiDecl decl) + { + objectPtr->export.decl = decl; +@@ -1600,6 +1635,7 @@ void setObjectDecl(Object *objectPtr, Sm + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectLine(Object *objectPtr, int line, Parser *parserPtr) + { + if (line) { +@@ -1627,6 +1663,7 @@ void setObjectLine(Object *objectPtr, in + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectNodekind(Object *objectPtr, SmiNodekind nodekind) + { + objectPtr->export.nodekind = nodekind; +@@ -1650,6 +1687,7 @@ void setObjectNodekind(Object *objectPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void addObjectFlags(Object *objectPtr, ObjectFlags flags) + { + objectPtr->flags |= flags; +@@ -1673,6 +1711,7 @@ void addObjectFlags(Object *objectPtr, O + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void deleteObjectFlags(Object *objectPtr, ObjectFlags flags) + { + objectPtr->flags &= ~flags; +@@ -1696,6 +1735,7 @@ void deleteObjectFlags(Object *objectPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + int checkObjectFlags(Object *objectPtr, ObjectFlags flags) + { + return ((objectPtr->flags & flags) == flags); +@@ -1746,6 +1786,7 @@ void setObjectIndex(Object *objectPtr, I + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectList(Object *objectPtr, List *listPtr) + { + objectPtr->listPtr = listPtr; +@@ -1769,6 +1810,7 @@ void setObjectList(Object *objectPtr, Li + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectRelated(Object *objectPtr, Object *relatedPtr) + { + objectPtr->relatedPtr = relatedPtr; +@@ -1792,6 +1834,7 @@ void setObjectRelated(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectImplied(Object *objectPtr, int implied) + { + objectPtr->export.implied = implied; +@@ -1815,6 +1858,7 @@ void setObjectImplied(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectCreate(Object *objectPtr, int create) + { + objectPtr->export.create = create; +@@ -1838,6 +1882,7 @@ void setObjectCreate(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectIndexkind(Object *objectPtr, SmiIndexkind indexkind) + { + objectPtr->export.indexkind = indexkind; +@@ -1861,6 +1906,7 @@ void setObjectIndexkind(Object *objectPt + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectValue(Object *objectPtr, SmiValue *valuePtr) + { + objectPtr->export.value = *valuePtr; +@@ -1885,6 +1931,7 @@ void setObjectValue(Object *objectPtr, S + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectUniqueness(Object *objectPtr, List *listPtr) + { + objectPtr->uniquenessPtr = listPtr; +@@ -1932,6 +1979,7 @@ void setObjectUniqueness(Object *objectP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *findNodeByParentAndSubid(Node *parentNodePtr, SmiSubid subid) + { + Node *nodePtr; +@@ -1968,6 +2016,7 @@ Node *findNodeByParentAndSubid(Node *par + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *findNodeByOid(unsigned int oidlen, SmiSubid *oid) + { + Node *nodePtr; +@@ -2000,6 +2049,7 @@ Node *findNodeByOid(unsigned int oidlen, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *findNodeByOidString(char *oid) + { + Node *nodePtr; +@@ -2037,6 +2087,7 @@ Node *findNodeByOidString(char *oid) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByNode(Node *nodePtr) + { + Object *objectPtr; +@@ -2079,6 +2130,7 @@ Object *findObjectByNode(Node *nodePtr) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModuleAndNode(Module *modulePtr, Node *nodePtr) + { + Object *objectPtr; +@@ -2114,6 +2166,7 @@ Object *findObjectByModuleAndNode(Module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModulenameAndNode(const char *modulename, Node *nodePtr) + { + Object *objectPtr; +@@ -2149,6 +2202,7 @@ Object *findObjectByModulenameAndNode(co + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByName(const char *objectname) + { + Module *modulePtr; +@@ -2193,6 +2247,7 @@ Object *findObjectByName(const char *obj + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findNextObjectByName(const char *objectname, Object *prevObjectPtr) + { + Module *modulePtr; +@@ -2236,6 +2291,7 @@ Object *findNextObjectByName(const char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModulenameAndName(const char *modulename, + const char *objectname) + { +@@ -2285,6 +2341,7 @@ Object *findObjectByModulenameAndName(co + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModuleAndName(Module *modulePtr, const char *objectname) + { + Object *objectPtr; +@@ -2334,6 +2391,7 @@ Object *findObjectByModuleAndName(Module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *addType(char *type_name, SmiBasetype basetype, TypeFlags flags, + Parser *parserPtr) + { +@@ -2395,6 +2453,7 @@ Type *addType(char *type_name, SmiBasety + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *duplicateType(Type *templatePtr, TypeFlags flags, Parser *parserPtr) + { + Type *typePtr; +@@ -2451,6 +2510,7 @@ Type *duplicateType(Type *templatePtr, T + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *setTypeName(Type *typePtr, char *name) + { + Type *type2Ptr; +@@ -2543,6 +2603,7 @@ Type *setTypeName(Type *typePtr, char *n + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeParent(Type *typePtr, Type *parentPtr) + { + typePtr->parentPtr = parentPtr; +@@ -2566,6 +2627,7 @@ void setTypeParent(Type *typePtr, Type * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeStatus(Type *typePtr, SmiStatus status) + { + typePtr->export.status = status; +@@ -2589,6 +2651,7 @@ void setTypeStatus(Type *typePtr, SmiSta + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeBasetype(Type *typePtr, SmiBasetype basetype) + { + typePtr->export.basetype = basetype; +@@ -2612,6 +2675,7 @@ void setTypeBasetype(Type *typePtr, SmiB + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeDescription(Type *typePtr, char *description, Parser *parserPtr) + { + if (typePtr->export.description) +@@ -2642,6 +2706,7 @@ void setTypeDescription(Type *typePtr, c + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeReference(Type *typePtr, char *reference, Parser *parserPtr) + { + if (typePtr->export.reference) +@@ -2676,6 +2741,7 @@ void setTypeReference(Type *typePtr, cha + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeList(Type *typePtr, List *listPtr) + { + if (!typePtr->listPtr) { +@@ -2701,6 +2767,7 @@ void setTypeList(Type *typePtr, List *li + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeFormat(Type *typePtr, char *format) + { + if (typePtr->export.format) smiFree(typePtr->export.format); +@@ -2726,6 +2793,7 @@ void setTypeFormat(Type *typePtr, char * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeUnits(Type *typePtr, char *units) + { + if (typePtr->export.units) smiFree(typePtr->export.units); +@@ -2750,6 +2818,7 @@ void setTypeUnits(Type *typePtr, char *u + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeDecl(Type *typePtr, SmiDecl decl) + { + typePtr->export.decl = decl; +@@ -2773,6 +2842,7 @@ void setTypeDecl(Type *typePtr, SmiDecl + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeLine(Type *typePtr, int line, Parser *parserPtr) + { + if (line) { +@@ -2800,6 +2870,7 @@ void setTypeLine(Type *typePtr, int line + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeValue(Type *typePtr, SmiValue *valuePtr) + { + typePtr->export.value = *valuePtr; +@@ -2823,6 +2894,7 @@ void setTypeValue(Type *typePtr, SmiValu + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void addTypeFlags(Type *typePtr, TypeFlags flags) + { + typePtr->flags |= flags; +@@ -2846,6 +2918,7 @@ void addTypeFlags(Type *typePtr, TypeFla + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void deleteTypeFlags(Type *typePtr, TypeFlags flags) + { + typePtr->flags &= ~flags; +@@ -2870,6 +2943,7 @@ void deleteTypeFlags(Type *typePtr, Type + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type * findTypeByName(const char *type_name) + { + Module *modulePtr; +@@ -2908,6 +2982,7 @@ Type * findTypeByName(const char *type_n + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *findNextTypeByName(const char *type_name, Type *prevTypePtr) + { + Module *modulePtr; +@@ -2946,6 +3021,7 @@ Type *findNextTypeByName(const char *typ + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *findTypeByModulenameAndName(const char *modulename, + const char *type_name) + { +@@ -2985,6 +3061,7 @@ Type *findTypeByModulenameAndName(const + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *findTypeByModuleAndName(Module *modulePtr, const char *type_name) + { + Type *typePtr; +@@ -3017,6 +3094,7 @@ Type *findTypeByModuleAndName(Module *mo + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + NamedNumber *findTypeNamedNumber(Type *typePtr, + SmiInteger32 number) + { +@@ -3050,6 +3128,7 @@ NamedNumber *findTypeNamedNumber(Type *t + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + Identity *addIdentity(char *identityname, Parser *parserPtr) + { + Identity *identityPtr; +@@ -3096,6 +3175,7 @@ Identity *addIdentity(char *identityname + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityDecl(Identity *identityPtr, SmiDecl decl) + { + identityPtr->export.decl = decl; +@@ -3117,6 +3197,7 @@ void setIdentityDecl(Identity *identityP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityStatus(Identity *identityPtr, SmiStatus status) + { + identityPtr->export.status = status; +@@ -3140,6 +3221,7 @@ void setIdentityStatus(Identity *identit + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityDescription(Identity *identityPtr, char *description, Parser *parserPtr) + { + if (identityPtr->export.description) smiFree(identityPtr->export.description); +@@ -3169,6 +3251,7 @@ void setIdentityDescription(Identity *id + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityReference(Identity *identityPtr, char *reference, Parser *parserPtr) + { + if (identityPtr->export.reference) +@@ -3197,6 +3280,7 @@ void setIdentityReference(Identity *iden + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityParent(Identity *identityPtr, Identity *parentPtr) + { + if(identityPtr) identityPtr->parentPtr = parentPtr; +@@ -3220,6 +3304,7 @@ void setIdentityParent(Identity *identit + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Identity *findIdentityByName(const char *identityname) + { + Module *modulePtr; +@@ -3256,6 +3341,7 @@ Identity *findIdentityByName(const char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Identity *findIdentityByModuleAndName(Module *modulePtr, + const char *identityname) + { +@@ -3291,6 +3377,7 @@ Identity *findIdentityByModuleAndName(Mo + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Identity *findIdentityByModulenameAndName(const char *modulename, + const char *identity_name) + { +@@ -3329,6 +3416,7 @@ Identity *findIdentityByModulenameAndNam + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + Class *addClass(char *classname, Parser *parserPtr) + { + Class *classPtr; +@@ -3380,6 +3468,7 @@ Class *addClass(char *classname, Parser + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassDecl(Class *classPtr, SmiDecl decl) + { + classPtr->export.decl = decl; +@@ -3401,6 +3490,7 @@ void setClassDecl(Class *classPtr, SmiDe + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassStatus(Class *classPtr, SmiStatus status) + { + classPtr->export.status = status; +@@ -3424,6 +3514,7 @@ void setClassStatus(Class *classPtr, Smi + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassDescription(Class *classPtr, char *description, Parser *parserPtr) + { + if (classPtr->export.description) smiFree(classPtr->export.description); +@@ -3453,6 +3544,7 @@ void setClassDescription(Class *classPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassReference(Class *classPtr, char *reference, Parser *parserPtr) + { + if (classPtr->export.reference) +@@ -3481,6 +3573,7 @@ void setClassReference(Class *classPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassParent(Class *classPtr, Class *parentPtr) + { + if(classPtr) classPtr->parentPtr = parentPtr; +@@ -3502,6 +3595,7 @@ void setClassParent(Class *classPtr, Cla + * + *---------------------------------------------------------------------- + */ ++__attribute__ ((visibility ("internal"))) + Class *findClassByModuleAndName(Module *modulePtr,char *name) + { + Class *classPtr; +@@ -3534,6 +3628,7 @@ Class *findClassByModuleAndName(Module * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Class *findClassByModulenameAndName(const char *modulename, + const char *class_name) + { +@@ -3572,6 +3667,7 @@ Class *findClassByModulenameAndName(cons + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Attribute *duplicateTypeToAttribute(Type *templatePtr, Class *classPtr, Parser *parserPtr) + { + Attribute *attributePtr; +@@ -3626,6 +3722,7 @@ Attribute *duplicateTypeToAttribute(Type + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Attribute *addAttribute(char *attribute_name, + Class *classPtr, Parser *parserPtr) + { +@@ -3680,6 +3777,7 @@ Attribute *addAttribute(char *attribute_ + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeDecl(Attribute *attributePtr, SmiDecl decl) + { + attributePtr->export.decl = decl; +@@ -3701,6 +3799,7 @@ void setAttributeDecl(Attribute *attribu + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeParentType(Attribute *attributePtr, Type *parentPtr) + { + attributePtr->parentTypePtr = parentPtr; +@@ -3722,6 +3821,7 @@ void setAttributeParentType(Attribute *a + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeParentClass(Attribute *attributePtr, Class *parentPtr) + { + attributePtr->parentClassPtr = parentPtr; +@@ -3746,6 +3846,7 @@ void setAttributeParentClass(Attribute * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeList(Attribute *attributePtr, List *listPtr) + { + if (!attributePtr->listPtr) { +@@ -3769,6 +3870,7 @@ void setAttributeList(Attribute *attribu + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeName(Attribute *attributePtr, char *name) + { + +@@ -3790,6 +3892,7 @@ void setAttributeName(Attribute *attribu + * + *---------------------------------------------------------------------- + */ ++__attribute__ ((visibility ("internal"))) + void setAttributeAccess(Attribute *attributePtr,SmiAccess access) + { + attributePtr->export.access = access; +@@ -3812,6 +3915,7 @@ void setAttributeAccess(Attribute *attri + * + *---------------------------------------------------------------------- + */ ++__attribute__ ((visibility ("internal"))) + Event *addEvent(char *eventname, Class *classPtr, + Parser *parserPtr) + { +@@ -3861,6 +3965,7 @@ Event *addEvent(char *eventname, Class * + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + Macro *addMacro(char *macroname, MacroFlags flags, Parser *parserPtr) + { + Macro *macroPtr; +@@ -3910,6 +4015,7 @@ Macro *addMacro(char *macroname, MacroFl + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroStatus(Macro *macroPtr, SmiStatus status) + { + macroPtr->export.status = status; +@@ -3933,6 +4039,7 @@ void setMacroStatus(Macro *macroPtr, Smi + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroDescription(Macro *macroPtr, char *description, Parser *parserPtr) + { + if (macroPtr->export.description) smiFree(macroPtr->export.description); +@@ -3962,6 +4069,7 @@ void setMacroDescription(Macro *macroPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroReference(Macro *macroPtr, char *reference, Parser *parserPtr) + { + if (macroPtr->export.reference) +@@ -3990,6 +4098,7 @@ void setMacroReference(Macro *macroPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroAbnf(Macro *macroPtr, char *abnf, Parser *parserPtr) + { + if (macroPtr->export.abnf) +@@ -4020,6 +4129,7 @@ void setMacroAbnf(Macro *macroPtr, char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroDecl(Macro *macroPtr, SmiDecl decl) + { + macroPtr->export.decl = decl; +@@ -4043,6 +4153,7 @@ void setMacroDecl(Macro *macroPtr, SmiDe + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroLine(Macro *macroPtr, int line, Parser *parserPtr) + { + if (line) { +@@ -4071,6 +4182,7 @@ void setMacroLine(Macro *macroPtr, int l + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Macro *findMacroByName(const char *macroname) + { + Module *modulePtr; +@@ -4109,6 +4221,7 @@ Macro *findMacroByName(const char *macro + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Macro *findMacroByModuleAndName(Module *modulePtr, const char *macroname) + { + Macro *macroPtr; +@@ -4144,6 +4257,7 @@ Macro *findMacroByModuleAndName(Module * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + NamedNumber *findNamedNumberByName(Type *typePtr,const char *name) + { + List *listPtr; +@@ -4580,6 +4694,7 @@ void smiFreeData() + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Module *loadModule(const char *modulename, Parser *parserPtr) + { + Parser parser; diff --git a/SOURCES/libsmi-0.4.8-wget111.patch b/SOURCES/libsmi-0.4.8-wget111.patch new file mode 100644 index 0000000..66f6526 --- /dev/null +++ b/SOURCES/libsmi-0.4.8-wget111.patch @@ -0,0 +1,12 @@ +diff -up libsmi-0.4.8/tools/smicache.in.BAD libsmi-0.4.8/tools/smicache.in +--- libsmi-0.4.8/tools/smicache.in.BAD 2008-04-23 14:38:09.000000000 -0400 ++++ libsmi-0.4.8/tools/smicache.in 2008-04-23 14:38:13.000000000 -0400 +@@ -44,7 +44,7 @@ do_usage () { + + + do_fetch () { +- $WGET -q -O "$dir/$1" "$prefix/$1" ++ $WGET -q -e "timestamping = off" -O "$dir/$1" "$prefix/$1" + } + + diff --git a/SOURCES/smi.conf b/SOURCES/smi.conf new file mode 100644 index 0000000..23268e3 --- /dev/null +++ b/SOURCES/smi.conf @@ -0,0 +1,40 @@ +# +# smi.conf - Global/User SMI configuration file. +# +# See smi_config(3) for detailed information on configuration files. +# + +# Extend (note the semicolon) the libsmi default module search path. +#path :/usr/local/share/mibs/sun +#path :/usr/local/share/mibs/cisco + +# Add a private directory. +#path :/home/strauss/lib/mibs + +# EXPERIMENTAL: Add a caching method (works only on UNIX systems). +# NOTE: the cache directory must exist and permissions must be +# handled appropriately. A simple but insecure way is to apply +# a tmp flag to the directory (chmod 1777 /usr/local/share/mibs/cache). +#cache /usr/local/share/mibs/cache /usr/local/bin/smicache -d /usr/local/share/mibs/cache -p http://www.ibr.cs.tu-bs.de/projects/libsmi/smicache/ + +# Don't show any errors by default. +level 0 + +# Preload some basic SMIv2 modules. +load SNMPv2-SMI +load SNMPv2-TC +load SNMPv2-CONF + +# Make smilint shout loud to report all errors and warnings. +smilint: level 9 + +# But please don't claim about any names longer than 32 chars. +# (note: this is the prefix of errors `namelength-32-module, +# -type, -object, -enumeration, and -bit) +smilint: hide namelength-32 + +# Preloading some more modules for special applications. +tcpdump: load DISMAN-SCRIPT-MIB +tcpdump: load IF-MIB +smiquery: load IF-MIB + diff --git a/SPECS/libsmi.spec b/SPECS/libsmi.spec new file mode 100644 index 0000000..2e9127b --- /dev/null +++ b/SPECS/libsmi.spec @@ -0,0 +1,162 @@ +Name: libsmi +Version: 0.4.8 +Release: 11%{?dist} +Summary: A library to access SMI MIB information + +Group: System Environment/Libraries +License: GPLv2+ and BSD +URL: http://www.ibr.cs.tu-bs.de/projects/libsmi/index.html +Source0: ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/%{name}-%{version}.tar.gz +Source1: smi.conf +Source2: IETF-MIB-LICENSE.txt +Patch0: libsmi-0.4.8-wget111.patch +Patch1: libsmi-0.4.8-CVE-2010-2891.patch +Patch2: libsmi-0.4.8-symbols-clash.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: libtool +BuildRequires: flex, bison +Requires: gawk, wget + +%description +Libsmi is a C library to access MIB module information through +a well defined API that hides the nasty details of locating +and parsing SMIv1/v2 MIB modules. + +This package contains tools to check, dump, and convert MIB +definitions and a steadily maintained and revised archive +of all IETF and IANA maintained standard MIB modules. + + +%package devel +Summary: Development environment for libsmi library +Group: Development/Libraries +Requires: %name = %version-%release +Requires: pkgconfig + +%description devel +Libsmi is a C library to access MIB module information through +a well defined API that hides the nasty details of locating +and parsing SMIv1/v2 MIB modules. + +This package contains development files needed to develop +libsmi-based applications. + +%prep +%setup -q +%patch0 -p1 -b .wget111 +%patch1 -p1 -b .CVE-2010-2891 +%patch2 -p1 -b .clash +cp %{SOURCE2} . + +%build +%configure \ + --enable-smi \ + --enable-sming \ + --enable-shared \ + --disable-static +make LIBTOOL=/usr/bin/libtool %{?_smp_mflags} + +iconv -f latin1 -t utf-8 COPYING.utf8 +mv COPYING.utf8 COPYING + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT + +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir} +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/smi.conf + +rm -f $RPM_BUILD_ROOT%{_libdir}/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + +%check +# fails a couple of tests (2 in {0.4.4, 0.4.5}) +make check ||: + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc ANNOUNCE ChangeLog COPYING README THANKS TODO +%doc doc/draft-irtf-nmrg-sming-02.txt smi.conf-example +%doc IETF-MIB-LICENSE.txt +%config(noreplace) %{_sysconfdir}/smi.conf +%{_bindir}/* +%{_libdir}/*.so.* +%{_datadir}/mibs/ +%{_datadir}/pibs/ +%{_mandir}/man1/*.1* + +%files devel +%defattr(-,root,root,-) +%{_datadir}/aclocal/libsmi.m4 +%{_libdir}/pkgconfig/libsmi.pc +%{_libdir}/*.so +%{_includedir}/* +%{_mandir}/man3/*.3* + + +%changelog +* Thu Feb 14 2013 Tom Callaway - 0.4.8-11 +- add IETF MIB license text to resolve legal issue + +* Thu Feb 14 2013 Fedora Release Engineering - 0.4.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Oct 24 2012 Tom Callaway - 0.4.8-9 +- mark symbols which conflict with RPM as "internal", resolves bz 864324 + Thanks to Michele Baldessari + +* Thu Jul 19 2012 Fedora Release Engineering - 0.4.8-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0.4.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.4.8-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Nov 1 2010 Tom "spot" Callaway - 0.4.8-5 +- fix CVE-2010-2891 + +* Thu Feb 25 2010 Radek Vokal - 0.4.8-4 +- fix lincese field, based on the tarball project is now GPL+ + +* Sat Jul 25 2009 Fedora Release Engineering - 0.4.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0.4.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Apr 23 2008 Tom "spot" Callaway 0.4.8-1 +- update to 0.4.8 +- patch fix for bz 441944 + +* Tue Feb 12 2008 Adam Jackson 0.4.5-4 +- Add %%defattr. (#430298) + +* Thu Jan 10 2008 Stepan Kasal - 0.4.5-3 +- libsmi-devel should not require automake +- convert COPYING to utf-8 + +* Fri Oct 6 2006 Jose Pedro Oliveira - 0.4.5-2 +- Handle rpath problems in 64-bit systems (#209522). + +* Mon May 29 2006 Jose Pedro Oliveira - 0.4.5-1 +- Update to 0.4.5. + +* Wed May 24 2006 Jose Pedro Oliveira - 0.4.4-1 +- Update to 0.4.4. + +* Fri Apr 7 2006 Jose Pedro Oliveira - 0.4.3-1 +- First build. + +# vim:set ai ts=4 sw=4 sts=4 et: