diff -u libsmbios-0.13.10/debian/rules libsmbios-0.13.10/debian/rules --- libsmbios-0.13.10/debian/rules +++ libsmbios-0.13.10/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 @@ -53,7 +55,7 @@ build: build-stamp -build-stamp: config.status +build-stamp: patch-stamp config.status dh_testdir # Compile the package. @@ -61,7 +63,7 @@ touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp diff -u libsmbios-0.13.10/debian/changelog libsmbios-0.13.10/debian/changelog --- libsmbios-0.13.10/debian/changelog +++ libsmbios-0.13.10/debian/changelog @@ -1,3 +1,15 @@ +libsmbios (0.13.10-1ubuntu1.1) hardy-proposed; urgency=low + + * debian/control: + - Add dpatch to build-depends + * debian/rules: + - Add dpatch support: + * 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 11:07:23 -0500 + libsmbios (0.13.10-1ubuntu1) hardy; urgency=low * Fix build failures with g++-4.3. diff -u libsmbios-0.13.10/debian/control libsmbios-0.13.10/debian/control --- libsmbios-0.13.10/debian/control +++ libsmbios-0.13.10/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.2 Section: libs only in patch2: unchanged: --- libsmbios-0.13.10.orig/debian/patches/01_password_checking.dpatch +++ libsmbios-0.13.10/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; only in patch2: unchanged: --- libsmbios-0.13.10.orig/debian/patches/00list +++ libsmbios-0.13.10/debian/patches/00list @@ -0,0 +1 @@ +01_password_checking