chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
label: fix database check
[elogind.git]
/
src
/
shutdown.c
diff --git
a/src/shutdown.c
b/src/shutdown.c
index 52bad21971f810ebceeee85ef2ac908d0c83e640..1c6dc6597b6598245e116926808ccae11a53d902 100644
(file)
--- a/
src/shutdown.c
+++ b/
src/shutdown.c
@@
-295,6
+295,8
@@
int main(int argc, char *argv[]) {
log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */
log_open();
log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */
log_open();
+ umask(0022);
+
if (getpid() != 1) {
log_error("Not executed by init (pid 1).");
r = -EPERM;
if (getpid() != 1) {
log_error("Not executed by init (pid 1).");
r = -EPERM;