Lennart Poettering
0fb398316c
journal: use automatic clenup for ACL types
2015-10-02 23:20:51 +02:00
Lennart Poettering
65089b8240
journal: improve some messages
...
Indicate that we are ignoring errors, when we ignore them, and log that
at LOG_WARNING level.
Use the right error code for the log message.
2015-10-02 23:19:00 +02:00
Lennart Poettering
070052aba3
journal: simplify things by using the LESS_BY() macro
2015-10-02 22:42:13 +02:00
Lennart Poettering
7b5195e274
journal: don't affect atime of journal files when vacuuming
...
Let's try to use O_NOATIME if we can when vacuuming old journal files,
if we have the permissions for it, so that vacuuming doesn't count as
proper journal read access.
2015-10-02 22:39:24 +02:00
Lennart Poettering
84267e4043
journal: prefer stack allocation
2015-10-02 22:37:53 +02:00
Lennart Poettering
804ae586d4
journal: make journal_file_close() return NULL
...
The way it is customary everywhere else in our sources.
2015-10-02 22:36:33 +02:00
Lennart Poettering
2e14c544a9
journal: port over to fd_getcrtime_at()
...
Let's use fd_getcrtime_at(), since that *at() family of calls is how we
read the rest of the file metadata, too.
2015-10-02 22:31:35 +02:00
Lennart Poettering
df241a67c0
util: rework fgetxattrat_fake() to use O_PATH
...
That way, we don't ever open the file, thus leave the atime untouched,
and this works even when unprivileged.
2015-10-02 11:44:05 +02:00
Daniel Mack
e46831f0f1
Merge pull request #1438 from poettering/rfkill-rework
...
An rfkill rework among other things
2015-10-01 16:35:43 +02:00
Lennart Poettering
8f4cc91472
Merge pull request #1430 from evverx/driver-syslog
...
journald: add syslog fields for driver messages
2015-10-01 16:29:13 +02:00
Lennart Poettering
91d0d69912
update NEWS
2015-10-01 16:24:04 +02:00
Lennart Poettering
d35c1bb1f4
rfkill: rework and make it listen on /dev/rfkill
...
With this rework we introduce systemd-rfkill.service as singleton that
is activated via systemd-rfkill.socket that listens on /dev/rfkill. That
way, we get notified each time a new rfkill device shows up or changes
state, in which case we restore and save its current setting to disk.
This is nicer than the previous logic, as this means we save/restore
state even of rfkill devices that are around only intermittently, and
save/restore the state even if the system is shutdown abruptly instead
of cleanly.
This implements what I suggested in #1019 and obsoletes it.
2015-10-01 16:21:09 +02:00
Lennart Poettering
55301ec028
core: add new setting Writable= to ListenSpecial= socket units
...
Writable= is a new boolean setting. If ture, then ListenSpecial= will
open the specified path in O_RDWR mode, rather than just O_RDONLY.
This is useful for implementing services like rfkill, where /dev/rfkill
is more useful when opened in write mode, if we want to not only save
but also restore its state.
2015-10-01 14:28:13 +02:00
Lennart Poettering
7e9d36e06b
systemctl: fix how we decode types and states
...
There was a bad memory access among other smaller issues.
2015-10-01 14:27:20 +02:00
Lennart Poettering
3d3145100d
man: minor wording improvements to USB FunctionFS documentation
2015-10-01 14:26:42 +02:00
Daniel Mack
8b5f9d156c
fix typo in NEWS
2015-10-01 13:28:09 +02:00
Daniel Mack
d4e783e44d
Merge pull request #1434 from reverendhomer/patch-1
...
systemctl: fix memory leak in systemctl_parse_argv
2015-10-01 12:16:55 +02:00
Daniel Mack
52dd374765
Merge pull request #1433 from michich/log-errno
...
tree-wide: add missing errno arguments to log_*_errno()
2015-10-01 12:16:16 +02:00
Michal Schmidt
46b57b6eec
udev: fix format string after conversion to log_*_errno()
...
Use %m where previously %s was used together with strerrno().
Fixes: e53fc357a9
"tree-wide: remove a number of invocations of
strerror() and replace by %m"
2015-10-01 11:28:40 +02:00
Michal Schmidt
19c2985380
sd-device: fix format strings after conversion to log_*_errno()
...
Use %m where previously %s was used together with strerrno().
Fixes: e53fc357a9
"tree-wide: remove a number of invocations of
strerror() and replace by %m"
2015-10-01 11:18:05 +02:00
reverendhomer
bc6c18fef1
systemctl: fix memory leak in systemctl_parse_argv
...
This commit fixes Coverity #1325228
2015-10-01 12:09:00 +03:00
Michal Schmidt
23446f0148
tree-wide: add missing errno arguments to log_*_errno()
...
A few of the recent conversions to log_*_errno() were missing the errno
value arguments.
Fixes: e53fc357a9
"tree-wide: remove a number of invocations of
strerror() and replace by %m"
2015-10-01 11:04:08 +02:00
Daniel Mack
2ce8d6080d
Merge pull request #1429 from poettering/dhcp-hostname
...
DHCP and journal remoting fix, as well as NEWS update
2015-10-01 09:53:15 +02:00
Daniel Mack
e4c46dcede
Merge pull request #1427 from dbuch/master
...
sd-pppoe: use strna() instead of strempty()
2015-10-01 09:46:40 +02:00
Daniel Mack
47c67a5042
Merge pull request #1426 from poettering/log-syntax
...
logging fixes and more
2015-10-01 09:46:09 +02:00
Evgeny Vereshchagin
b6fa25552e
journald: add syslog fields for driver messages
2015-10-01 03:36:11 +03:00
Lennart Poettering
ef08ced6b4
journal: make sure to set MHD_USE_PIPE_FOR_SHUTDOWN for libmicrohttpd servers
...
This makes sure libmicrohttpd won't call shutdown() on our listening
sockets, which make sure socket activation and re-activation will work
cleanly.
See:
https://github.com/systemd/systemd/pull/1286
https://lists.gnu.org/archive/html/libmicrohttpd/2015-09/msg00014.html
Fixes #1286
2015-09-30 23:59:06 +02:00
Lennart Poettering
e989fd9b67
dhcp: make sure we can deal with a single trailing NUL byte in the hostname
...
Fixes #1337
2015-09-30 23:35:18 +02:00
Lennart Poettering
fe08a30b58
update NEWS
2015-09-30 23:35:10 +02:00
Daniel Buch
8b66ad178c
sd-pppoe: use strna() instead of strempty()
...
In cases where we use for instance. log_debug() with a statement + string
it is better to output (Service-name: N/A) instead of (Service-name: )
2015-09-30 23:16:13 +02:00
Lennart Poettering
8abf529156
Merge pull request #1425 from kaysievers/wip
...
gpt-auto-generator: check fstab for /boot entries
2015-09-30 22:35:58 +02:00
Lennart Poettering
32c6d387bf
Merge pull request #1422 from keszybz/sd-daemon-mq-badf
...
sd-daemon: fix return value for sd_is_mq
2015-09-30 22:33:50 +02:00
Lennart Poettering
23a749f285
Merge pull request #1419 from keszybz/shell-completion
...
Shell completion tweaks
2015-09-30 22:32:09 +02:00
Lennart Poettering
5c22925a57
core: make sure we expose the empty string when we detect no virtualization
...
On the bus, stick to exposing the empty string as "no virtualization",
instead of none.
Fixes #1423
2015-09-30 22:26:17 +02:00
Lennart Poettering
e53fc357a9
tree-wide: remove a number of invocations of strerror() and replace by %m
...
Let's clean up our tree a bit, and reduce invocations of the
thread-unsafe strerror() by replacing it with printf()'s %m specifier.
2015-09-30 22:26:16 +02:00
Lennart Poettering
618234a525
basic: split out cpu set specific APIs into cpu-set-util.[ch]
2015-09-30 22:26:16 +02:00
Lennart Poettering
94d75d6423
conf-parser: make use of DEFINE_PARSER macro to parse mode_t
...
Let's unify more code.
Also, rework the macro to accept a trailing semicolon, to make the code
prettier.
2015-09-30 22:26:16 +02:00
Lennart Poettering
e5aa2f71b7
util: there cannot be trailing garbage when parsing cpu sets
...
extract_first() already skips trailing whitespace, hence no reason to
explicitly check for it.
2015-09-30 22:26:16 +02:00
Lennart Poettering
765d143b5f
util: rename parse_cpu_set() to parse_cpu_set_and_warn()
...
It's pretty untypical for our parsing functions to log on their own.
Clarify in the name that this one does.
2015-09-30 22:26:16 +02:00
Lennart Poettering
0e05ee044a
log: move log_invalid_utf8() to log.h
...
Also, make sure it follows the same scheme as log_syntax() does in its
behaviour.
2015-09-30 22:26:16 +02:00
Lennart Poettering
12ca818ffd
tree-wide: clean up log_syntax() usage
...
- Rely everywhere that we use abs() on the error code passed in anyway,
thus don't need to explicitly negate what we pass in
- Never attach synthetic error number information to log messages. Only
log about errors we *receive* with the error number we got there,
don't log any synthetic error, that don#t even propagate, but just eat
up.
- Be more careful with attaching exactly the error we get, instead of
errno or unrelated errors randomly.
- Fix one occasion where the error number and line number got swapped.
- Make sure we never tape over OOM issues, or inability to resolve
specifiers
2015-09-30 22:26:16 +02:00
Lennart Poettering
6ed796c827
Merge pull request #1424 from evverx/journalctl-rotate
...
journalctl: add --rotate option
2015-09-30 22:25:36 +02:00
Kay Sievers
0b6b6787e3
gpt-auto-generator: check fstab for /boot entries
...
We need to prevent the creation of the gpt automount unit, which will not
get overridden by the fstab mount unit.
https://github.com/systemd/systemd/issues/1378
2015-09-30 22:24:52 +02:00
Evgeny Vereshchagin
b92eb84cc8
man: journalctl: add info about --rotate
2015-09-30 23:02:58 +03:00
Evgeny Vereshchagin
0c66ffd8b9
shell-completion: journalctl: add --rotate
2015-09-30 22:58:05 +03:00
Evgeny Vereshchagin
e3fdfb491f
journalctl: add --rotate option
...
shortcut for `systemctl kill --kill-who main --signal SIGUSR2 systemd-journald`
2015-09-30 22:54:58 +03:00
Zbigniew Jędrzejewski-Szmek
0260d1d542
sd-daemon: fix sd_is_mq for non-mq fds
...
mq_getattr returns -1/EBADF for file descriptors which are not mq.
But we should return 0 in this case.
We first check that fd is a valid fd, so we can assume that if
mq_getattr returns EBADF, it is simply a non-mq fd. There is a slight
race, but there doesn't seem to be a nice way to fix it.
2015-09-30 14:23:13 -04:00
Daniel Mack
234ae00903
Merge pull request #1421 from keszybz/formatting-fixes
...
logind: avoid a dot before parenthesis
2015-09-30 18:40:57 +02:00
Daniel Mack
75ec4439ea
Merge pull request #1420 from keszybz/doc-updates
...
Doc updates
2015-09-30 18:37:18 +02:00
Zbigniew Jędrzejewski-Szmek
7bbb5359c0
systemctl: do not set variable to be immediately overwritten
2015-09-30 12:33:31 -04:00