Fix permissions for cookies.db - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
 (HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) changeset 1fb88e31bb4433ad98e09a25a018ac1acf060670
 (DIR) parent 07e4bd10315a3f5effa78e62f27dc8fd426e335b
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Wed, 10 Oct 2018 01:11:33 
       
       Fix permissions for cookies.db
       
       Diffstat:
        wip/luakit-git/patch-lib_clib_soup.c |  31 +++++++++++++++++++++++++++++++
        1 files changed, 31 insertions(+), 0 deletions(-)
       ---
       diff -r 07e4bd10315a -r 1fb88e31bb44 wip/luakit-git/patch-lib_clib_soup.c
       --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
       +++ b/wip/luakit-git/patch-lib_clib_soup.c      Wed Oct 10 01:11:33 2018 +0200
       @@ -0,0 +1,31 @@
       +$NetBSD$
       +
       +Adjust permissions for cookies.db.
       +
       +--- clib/soup.c.orig   2018-09-22 23:42:41.000000000 +0000
       ++++ clib/soup.c
       +@@ -24,6 +24,7 @@
       + #include "common/signal.h"
       + #include "web_context.h"
       + 
       ++#include <glib/gstdio.h>
       + #include <libsoup/soup.h>
       + #include <webkit2/webkit2.h>
       + 
       +@@ -100,10 +101,16 @@ static void
       + luaH_soup_set_cookies_storage(lua_State *L)
       + {
       +     const gchar *new_path = luaL_checkstring(L, 3);
       ++    FILE *f;
       +     if (g_str_equal(new_path, ""))
       +         luaL_error(L, "cookies_storage cannot be empty");
       +     g_free(cookies_storage);
       +     cookies_storage = g_strdup(new_path);
       ++    
       ++    if ((f = g_fopen(cookies_storage, "a")) == NULL)
       ++        luaL_error(L, "Could not open cookies_storage");
       ++    g_chmod(cookies_storage, 0600);
       ++    fclose(f);
       + 
       +     WebKitWebContext * web_context = web_context_get();
       +     WebKitCookieManager *cookie_mgr = webkit_web_context_get_cookie_manager(web_context);