  $(OUT)/org.chromium.Chaps.conf :
  	sed -e "s/@POLICY_PERMISSIONS@/$(DBUS_POLICY)/" \
 diff --git a/chaps/chaps.cc b/chaps/chaps.cc
-index 077323deb5db..c94e03cef679 100644
+index 077323d..60abdf9 100644
 --- a/chaps/chaps.cc
 +++ b/chaps/chaps.cc
+@@ -76,7 +76,7 @@ static CK_RV HandlePKCS11Output(CK_RV result,
+     memcpy(out_buffer, &output.front(), output.size());
+   } else {
+     *out_buffer_length = static_cast<CK_ULONG>(output_length);
+-    if (result == CKR_BUFFER_TOO_SMALL)
++    if (result == CKR_BUFFER_TOO_SMALL && !out_buffer)
+       result = CKR_OK;
+   }
+   return result;
 @@ -183,6 +183,7 @@ CK_RV C_GetInfo(CK_INFO_PTR pInfo) {
  
  // PKCS #11 v2.20 section 11.4 page 106.

From e2552a6c18b309124481d9b72a02f2cae1cf98a1 Mon Sep 17 00:00:00 2001
From: David Drysdale <drysdale@google.com>
Date: Fri, 12 Sep 2014 10:32:19 +0100
Subject: [PATCH] Updates for standalone Linux Chaps build

 
diff --git a/chaps/org.chromium.Chaps.service b/chaps/org.chromium.Chaps.service
new file mode 100644
index 0000000..10cf47e
--- /dev/null
+++ b/chaps/org.chromium.Chaps.service
@@ -0,0 +1,4 @@
