chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vconsole: don't parse Fedora's KEYMAP= kernel parameters anymore
[elogind.git]
/
src
/
update-utmp.c
diff --git
a/src/update-utmp.c
b/src/update-utmp.c
index 644b6df67cb831627b646f570359375d3b7539a3..f81e7f495f864c25949c2bafdbec0878b32ae34d 100644
(file)
--- a/
src/update-utmp.c
+++ b/
src/update-utmp.c
@@
-361,18
+361,20
@@
int main(int argc, char *argv[]) {
if (getppid() != 1) {
log_error("This program should be invoked by init only.");
if (getppid() != 1) {
log_error("This program should be invoked by init only.");
- return
1
;
+ return
EXIT_FAILURE
;
}
if (argc != 2) {
log_error("This program requires one argument.");
}
if (argc != 2) {
log_error("This program requires one argument.");
- return
1
;
+ return
EXIT_FAILURE
;
}
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
log_open();
}
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
log_open();
+ umask(0022);
+
#ifdef HAVE_AUDIT
if ((c.audit_fd = audit_open()) < 0)
log_error("Failed to connect to audit log: %m");
#ifdef HAVE_AUDIT
if ((c.audit_fd = audit_open()) < 0)
log_error("Failed to connect to audit log: %m");
@@
-406,12
+408,13
@@
finish:
#endif
if (c.bus) {
#endif
if (c.bus) {
- dbus_connection_close(c.bus);
- dbus_connection_unref(c.bus);
+ dbus_connection_flush(c.bus);
+ dbus_connection_close(c.bus);
+ dbus_connection_unref(c.bus);
}
dbus_error_free(&error);
dbus_shutdown();
}
dbus_error_free(&error);
dbus_shutdown();
- return r < 0 ?
1 : 0
;
+ return r < 0 ?
EXIT_FAILURE : EXIT_SUCCESS
;
}
}