NetworkManager/src/settings/plugins/keyfile
Beniamino Galvani 21358edc54 core: introduce and use nm_utils_file_set_contents()
In some places we use g_file_set_contents() after a umask() to limit
the permissions of the created file. Unfortunately if the containing
directory has a default ACL the umask will be ignored and the new file
will have a mode equal to the default ACL (since g_file_set_contents()
opens the file with mode 0666).

Calling a chmod() after the file gets created is insecure (see commit
60b7ed3bdc) and so the only solution seems to be to reimplement
g_file_set_contents() and accept a mode as parameter.

We already had similar functions in the tree, consolidate them into a
new generic utility function.

https://bugzilla.gnome.org/show_bug.cgi?id=769702
2016-10-12 14:54:57 +02:00
..
tests keyfile/build: set LDFLAGS for buiding keyfile tests 2016-10-11 11:37:46 +02:00
Makefile.am keyfile/build: don't build keyfile settings plugin as library 2016-10-06 20:41:20 +02:00
nms-keyfile-connection.c keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-connection.h keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-plugin.c keyfile: add logging macros to keyfile plugin 2016-10-06 20:41:20 +02:00
nms-keyfile-plugin.h keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-reader.c keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-reader.h keyfile: rename public keyfile functions and names 2016-10-06 20:41:20 +02:00
nms-keyfile-utils.c keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-utils.h keyfile: rename public keyfile functions and names 2016-10-06 20:41:20 +02:00
nms-keyfile-writer.c core: introduce and use nm_utils_file_set_contents() 2016-10-12 14:54:57 +02:00
nms-keyfile-writer.h keyfile: rename public keyfile functions and names 2016-10-06 20:41:20 +02:00