shill: unset high order bits in umask mask argument

Unset the high order bits in the mask argument passed to
umask. These high order bits are set by the logical NOT
operation that we use in the flag "whitelist" idiom,
which causes a compiler error when building in Android
with FORTIFY_SOURCE enabled.

BUG: 24387854
Change-Id: If1f7768f99f145f0909b13b93287c11f0b487fd8
TEST: shill compiles and all unittests pass.
TEST: shill no longer crashes on __umask_chk run on a Brillo dragonboard image.
diff --git a/key_file_store.cc b/key_file_store.cc
index 64eb311..22c7b74 100644
--- a/key_file_store.cc
+++ b/key_file_store.cc
@@ -122,7 +122,7 @@
     success = false;
   }
   if (success) {
-    ScopedUmask owner_only_umask(~(S_IRUSR | S_IWUSR));
+    ScopedUmask owner_only_umask(~(S_IRUSR | S_IWUSR) & 0777);
     success = base::ImportantFileWriter::WriteFileAtomically(path_, data);
     if (!success) {
       LOG(ERROR) << "Failed to store key file: " << path_.value();