diff -u libsmbios-0.13.13/debian/changelog libsmbios-0.13.13/debian/changelog --- libsmbios-0.13.13/debian/changelog +++ libsmbios-0.13.13/debian/changelog @@ -1,3 +1,17 @@ +libsmbios (0.13.13-1ubuntu2) intrepid; urgency=low + + * debian/control: + - Add dpatch to build-depends + * debian/rules: + - Add dpatch support + - Don't clean up ltmain.sh, config.sub, or config.guess + as they are shipped in the upstream tarball. + * debian/patches/01_password_checking.dpatch: + - Stub out another function for checking the status + of a bios or admin password. (LP: #189814) + + -- Mario Limonciello Fri, 18 Jul 2008 13:08:46 -0500 + libsmbios (0.13.13-1ubuntu1) intrepid; urgency=low [ Mario Limonciello ] diff -u libsmbios-0.13.13/debian/rules libsmbios-0.13.13/debian/rules --- libsmbios-0.13.13/debian/rules +++ libsmbios-0.13.13/debian/rules @@ -6,6 +6,8 @@ # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. +include /usr/share/dpatch/dpatch.make + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 INSTDIR=$(CURDIR)/debian @@ -37,13 +39,6 @@ config.status: dh_testdir - test -e build/config.sub -a -L build/config.sub || \ - ln -sf /usr/share/misc/config.sub build/config.sub - test -e build/config.guess -a -L build/config.guess || \ - ln -sf /usr/share/misc/config.guess build/config.guess - - test -e build/ltmain.sh -a -L build/ltmain.sh || \ - ln -sf /usr/share/libtool/ltmain.sh build/ltmain.sh ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr \ @@ -53,7 +48,7 @@ build: build-stamp -build-stamp: config.status +build-stamp: patch-stamp config.status dh_testdir # Compile the package. @@ -61,12 +56,9 @@ touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot - rm -f build-stamp configure-stamp - rm -f build/config.guess build/config.sub - rm -f build/ltmain.sh rm -f config.log # Clean up after the build process. diff -u libsmbios-0.13.13/debian/control libsmbios-0.13.13/debian/control --- libsmbios-0.13.13/debian/control +++ libsmbios-0.13.13/debian/control @@ -2,7 +2,7 @@ Priority: optional Maintainer: Jose Luis Tallon Build-Depends: debhelper (>= 4.2.0), autotools-dev, libtool (>= 1.5.24), - libxml2-dev, libcppunit-dev, doxygen, graphviz, python + libxml2-dev, libcppunit-dev, doxygen, graphviz, python, dpatch Standards-Version: 3.7.3 Section: libs only in patch2: unchanged: --- libsmbios-0.13.13.orig/debian/patches/00list +++ libsmbios-0.13.13/debian/patches/00list @@ -0,0 +1 @@ +01_password_checking only in patch2: unchanged: --- libsmbios-0.13.13.orig/debian/patches/01_password_checking.dpatch +++ libsmbios-0.13.13/debian/patches/01_password_checking.dpatch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_password_checking.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Stubs out password status checking functions. + +@DPATCH@ +diff -urNad libsmbios-0.13.10~/include/smbios/ISmi.h libsmbios-0.13.10/include/smbios/ISmi.h +--- libsmbios-0.13.10~/include/smbios/ISmi.h 2008-07-18 15:03:15.000000000 -0500 ++++ libsmbios-0.13.10/include/smbios/ISmi.h 2008-07-18 15:03:16.000000000 -0500 +@@ -110,7 +110,9 @@ + void setServiceTag(const std::string &password, const std::string &newTag); + std::string getAssetTag(); + void setAssetTag(const std::string &password, const std::string &newTag); +- ++ ++ bool getPasswordStatus(u16 which); ++ + u32 readNVStorage (u32 location, u32 *minValue, u32 *maxValue); + u32 readBatteryModeSetting(u32 location, u32 *minValue, u32 *maxValue); + u32 readACModeSetting (u32 location, u32 *minValue, u32 *maxValue); +diff -urNad libsmbios-0.13.10~/libraries/smi/Smi.cpp libsmbios-0.13.10/libraries/smi/Smi.cpp +--- libsmbios-0.13.10~/libraries/smi/Smi.cpp 2008-07-18 15:03:15.000000000 -0500 ++++ libsmbios-0.13.10/libraries/smi/Smi.cpp 2008-07-18 15:03:50.000000000 -0500 +@@ -275,6 +275,27 @@ + return hasPw; + } + ++ bool getPasswordStatus(u16 which) ++ { ++ if( which != 9 && which != 10 ) ++ throw ParameterErrorImpl("Internal programming error. Argument must be either 9 or 10."); ++ try ++ { ++ u32 args[4] = {0,}, res[4] = {0,}; ++ doSimpleCallingInterfaceSmi(which, 0, args, res); ++ //1 = pass not installed, 3 = pass not installed, and only setable by an admin ++ if( (res[0] & 0xFF) == 1 || ( res[0] & 0xFF ) == 3) ++ return false; ++ return true; ++ } ++ catch(const exception &) ++ { ++ //if we caught any exceptions, try the next method ++ } ++ u8 max,min,props; ++ return getPasswordPropertiesII(which,max,min,props); ++ } ++ + static u32 getAuthenticationKeyII(const string &password) + { + u32 authKey = 0;