Description: Import patch from Ubuntu
 Andrew Starr-Bochicchio <a.starr.b@gmail.com>
 open() needs mode if O_CREAT in backend.c
Author: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
Bug-Debian: http://bugs.debian.org/643399
Bug-Ubuntu: https://launchpad.net/bugs/495448

--- gpe-shield-0.31.orig/backend.c
+++ gpe-shield-0.31/backend.c
@@ -403,7 +403,7 @@ do_change_cfg_load(gboolean doit)
 	int fh;
 	if (doit)
 	{
-		if ((fh = open(LOADRULES_MARK,O_CREAT | O_RDWR | O_TRUNC)) < 0)
+		if ((fh = open(LOADRULES_MARK,O_CREAT | O_RDWR | O_TRUNC, S_IRUSR|S_IWUSR)) < 0)
 			perror("Cannot save setting.");
 		else
 			close(fh);
