summaryrefslogtreecommitdiff
path: root/src/hostnamed.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-01 20:52:18 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-01 20:52:18 +0200
commit4c12626c8e3491570b395d68380543e10c98ad33 (patch)
tree6cc39f5ee23aa41accc1baffb7db5a7444859fce /src/hostnamed.c
parent07f8a4aa49a84ec61513788d5ddf521f3de5a0ba (diff)
umask: change default umask to 0022 just to be sure, and set it explicitly in all binaries, in order to make sure it is set when started from the terminal
Diffstat (limited to 'src/hostnamed.c')
-rw-r--r--src/hostnamed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hostnamed.c b/src/hostnamed.c
index 7b2ce691a3..e3b89a4c62 100644
--- a/src/hostnamed.c
+++ b/src/hostnamed.c
@@ -559,6 +559,8 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
+ umask(0022);
+
if (argc == 2 && streq(argv[1], "--introspect")) {
fputs(DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
"<node>\n", stdout);
@@ -576,8 +578,6 @@ int main(int argc, char *argv[]) {
if (!check_nss())
log_warning("Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!");
- umask(0022);
-
r = read_data();
if (r < 0) {
log_error("Failed to read hostname data: %s", strerror(-r));