shill: Use an empty environment for NSS cert lookup.
This ensures that the nss-get-cert script will use the correct NSS database
location.
BUG=chromium-os:29511
TEST=unit tests, tested on device that NSS lookup succeeds when running shill
with incorrect HOME
Change-Id: I246a65ba53d0476332e3a458680b114f8ea5a4e5
Reviewed-on: https://gerrit.chromium.org/gerrit/20368
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/nss_unittest.cc b/nss_unittest.cc
index 57163f7..1bfb4ba 100644
--- a/nss_unittest.cc
+++ b/nss_unittest.cc
@@ -10,6 +10,7 @@
using std::vector;
using testing::_;
+using testing::NotNull;
using testing::Return;
using testing::SetArgumentPointee;
@@ -46,7 +47,8 @@
TEST_F(NSSTest, GetCertfile) {
EXPECT_CALL(glib_,
- SpawnSync(_, GetCertfileArgv("pem"), _, _, _, _, _, _, _, _))
+ SpawnSync(_,
+ GetCertfileArgv("pem"), NotNull(), _, _, _, _, _, _, _))
.WillOnce(Return(false))
.WillOnce(DoAll(SetArgumentPointee<8>(1), Return(true)))
.WillOnce(DoAll(SetArgumentPointee<8>(0), Return(true)));