[Groonga-commit] groonga/gcs-console [master] Store credentials in securely moded file #21

アーカイブの一覧に戻る

Yoji SHIDARA null+****@clear*****
Thu Dec 6 16:21:55 JST 2012


Yoji SHIDARA	2012-12-06 16:21:55 +0900 (Thu, 06 Dec 2012)

  New Revision: 821784def55b0308f47afc67e89dc83bc5c31331
  https://github.com/groonga/gcs-console/commit/821784def55b0308f47afc67e89dc83bc5c31331

  Log:
    Store credentials in securely moded file #21

  Modified files:
    lib/config.js

  Modified: lib/config.js (+4 -2)
===================================================================
--- lib/config.js    2012-12-05 23:00:54 +0900 (2293309)
+++ lib/config.js    2012-12-06 16:21:55 +0900 (ea3d8b5)
@@ -21,8 +21,10 @@ Config.prototype = {
   },
   save: function() {
     var json = JSON.stringify(this.data);
-    mkdirp.sync(this.home);
-    fs.writeFileSync(this.configFilePath(), json);
+    mkdirp.sync(this.home, 0700);
+    var file = fs.openSync(this.configFilePath(), 'w', 0600);
+    fs.writeSync(file, json)
+    fs.closeSync(file);
   }
 };
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る