b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
430f0182b72373145c839dbfe99d2382855cb8f8 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → capability-util.[ch]
The files are named too generically, so that they might conflict with
the upstream project headers. Hence, let's add a "-util" suffix, to
clarify that this are just our utility headers and not any official
upstream headers. |
f4f15635ec05293ffcc83a5b39f624bbabbd8fd0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move a number of fs operations into fs-util.[ch] |
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out user/group/uid/gid calls into user-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
ac5b0c13d8023745c0fbdaaa95dcec5b7b21d1e2 |
|
19-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: add more void casts for various syscall invocations |
aa36007ca18ece54495d108332ed21b4bf918f3b |
|
11-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: fix how we print a PID |
b506d3141b97d0a3fbda461f4b8d9d64f46408d1 |
|
31-Jul-2015 |
Kay Sievers <kay@vrfy.org> |
timesyncd: remove RLIMIT_NPROC
NSS plugins might create additional threads. Remove the limit, we cannot
really make any assumptions here. |
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9 |
|
15-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: port everything to sigprocmask_many() and friends
This ports a lot of manual code over to sigprocmask_many() and friends.
Also, we now consistly check for sigprocmask() failures with
assert_se(), since the call cannot realistically fail unless there's a
programming error.
Also encloses a few sd_event_add_signal() calls with (void) when we
ignore the return values for it knowingly. |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
7e26029ff36d6112bd8c3273327c97708f9ee61e |
|
27-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: set RLIMIT_NPROC to 2
This way timesyncd cannot be used to fork().
Note that it generally is not safe to use RLIMIT_NPROC, since it breaks
running the same daemon in multiple containers if they do not use user
namespacing. However, timesyncd is excepted from running in a container
anyway, hence it is safe in this case. |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
af4ec4309e8f82aad87a8d574785c12f8763d5f8 |
|
21-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
notify: send STOPPING=1 from our daemons |
84e51726a38e133ca42d2f30f0668d3921b210cb |
|
12-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: split up into multiple source file
The source file got much too large, hence split up the sources into
multiple per-object files, similar in style to resolved. |
f01e5736f1555eec9183e48448fa3454f265b73e |
|
12-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: move the generic sockaddr_equal() call to socket-util.h |
cedc8c44d43c8b6689ae5f5ebe1aabb7ad9755ba |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: when we don't know anything about the network state, assume we are online
This should provide better compatibility with systems that lack networkd |
6a5c7b7e41a036bfdc2474b4583fcfdd358a6db6 |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: always use CLOCK_BOOTTIME if we can
After all we want to compare a monotonically increasing clock with the
remote clock, hence we shouldn't ignore system suspend periods. |
b2fadec6048adb3596f2633cb7fe7a49f5937a18 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Properly report invalid quoted strings
$ systemd-analyze verify trailing-g.service
[./trailing-g.service:2] Trailing garbage, ignoring.
trailing-g.service lacks ExecStart setting. Refusing.
Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument.
Failed to create trailing-g.service/start: Invalid argument |
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.
Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.
_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.
Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.
mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint
mbiebl_> which is pretty weird |
c264aeab4b0e7b69f469e12e78d4a48b3ed7a66e |
|
27-Jul-2014 |
Kay Sievers <kay@vrfy.org> |
core: only set the kernel's timezone when the RTC runs in local time
We can not reliably manage any notion of local time. Every daylight
saving time change or time zone change by traveling will make the
time jump, and the local time might jump backwards which creates
unsolvable problems with file timestamps.
We will no longer tell the kernel our local time zone and leave
everything set to UTC. This will effectively turn FAT timestamps
into UTC timestamps.
If and only if the machine is configured to read the RTC in local
time mode, the kernel's time zone will be configured, but
systemd-timesysnc will disable the kernel's system time to RTC
syncing. In this mode, the RTC will not be managed, and external
tools like Windows bootups are expected to manage the RTC's time.
https://bugs.freedesktop.org/show_bug.cgi?id=81538 |
0014a4ad505d119c7ac4346d9d774c3f17f663a5 |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-network: fix parameter order for sd_network_monitor_new()
Constructors should return the object they created as first parameter,
except when they are generated as a child/member object of some other
object in which case that should be first. |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
Special care is needed so that we get an error message if the
file failed to parse, but not when it is missing. To avoid duplicating
the same error check in every caller, add an additional 'warn' boolean
to tell config_parse whether a message should be issued.
This makes things both shorter and more robust wrt. to error reporting. |
e9f3d2d508bfd9fb5b54e82994bda365a71eb864 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Constify ConfigTableItem tables |
ae2db4e7e868fb89f5053a962a3a43337ddfd4e0 |
|
15-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
timesyncd: add sockaddr_pretty wrapper |
c566ee3253132cc2ec37ed04c5bccbadf8e60c58 |
|
15-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
timesyncd: only listen to clock changes when connected
This reverts previous commit and applies a different fix.
manager_clock_watch() callback calls manager_send_request() to kick
off a resync. We can only do that when we're actually connected to
something. It is not useful to setup the callback from manager_new().
Now the callback will be dropped in manager_connect() and requested
in manager_begin().
https://bugs.freedesktop.org/show_bug.cgi?id=80932 |
afc7b1b9c170b9d23a3d91367e00f33b2ee2e89e |
|
15-Jul-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: suppress resync at system time change when not connected
Jul 04 17:46:03 orchid systemd[1]: Starting Network Time Synchronization...
Jul 04 17:46:03 orchid systemd[1]: Started Network Time Synchronization.
Jul 04 17:46:22 orchid systemd-timesyncd[301]: System time changed. Resyncing.
Jul 04 17:46:22 orchid systemd-timesyncd[301]: Assertion 'm->current_server_name'
https://bugs.freedesktop.org/show_bug.cgi?id=80932 |
c92e531c82a9815ec349aa1bf31236b86b2d5311 |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: make use of union in_addr_union in resolved, too |
966bff2660a13c82b70a1e1ac4f1a48bb33d7f7e |
|
01-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: split privilege dropping code out of timesyncd so that we can make use of it from other daemons too
This is preparation to make networkd work as unpriviliged user. |
4d40d39cdf127a83acf80cd0275e36b4a9a2a246 |
|
25-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesysnc: reword network watching messages, and move resolver errors to debug |
d636d376796ec61c1c14fa619c80d4ac62e08a19 |
|
24-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: only update stamp file when we are synchronized
Create initial stamp file with compiled-in time to prevent bootups
with clocks in the future from storing invalid timestamps.
At shutdown, only update the timestamp if we got an authoritative
time to store. |
609e002e78e79ef2bf9d6a6ea22bda215abbbb14 |
|
22-May-2014 |
Lennart Poettering <lennart@poettering.net> |
time-util: make sure USEC_PER_SEC and friends are actually of type usec_t |
a6cb8f870d68654a4297b8cb859068bca8e0f44c |
|
21-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: use STR_IN_SET() |
a57a27b2effe92f749a565df4f1276376b2d6dbc |
|
21-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: fix english language typo |
ece6e766cf89c8ec82ad135969dedf16cd7c1ee8 |
|
20-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: save clock to disk everytime we get an NTP fix, and bump clock at boot using this
This is useful to make sure the system clock stays monotonic even on
systems that lack an RTC.
Also, why we are at it, also use the systemd release time for bumping
the clock, since it's a slightly less bad than starting with jan 1st,
1970.
This also moves timesyncd into the early bootphase, in order to make
sure this initial bump is guaranteed to have finished by the time we
start real daemons which might write to the file systemd and thus
shouldn't leave 1970's timestamps all over the place... |
e56f36380365b5825f0920b0f00a459edc0b2e84 |
|
19-May-2014 |
Tom Gundersen <teg@jklm.no> |
timesyncd: only attempt to connect when an address is configured
For now, we accept both link-local and routable addresses, maybe we want to
restrict ourselves to routable addresses only. |
f1721625e7145977ba705e169580f2eb0002600c |
|
18-May-2014 |
Nis Martensen <nis.martensen@web.de> |
fix spelling of privilege |
f864fd1b4b4546244dfb59bb59196598742fa29c |
|
18-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: make use of floating event sources for signal handling |
9f7115498bac670013f6b8923f2e12366fbd13a8 |
|
18-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: enable watchdog support |
a349eb10d3c3a31cd47198cbf08e4f0dfaffef1d |
|
18-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: run timesyncd as unpriviliged user "systemd-timesync" (but still with CAP_SYS_TIME) |
15a224e06c412672e2079656917bcab04ad80f02 |
|
16-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: fix typo in comment |
59a9fce47b3304bc9ce5d31b04ade5447b3910a4 |
|
15-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: fix error path return value
https://bugs.freedesktop.org/show_bug.cgi?id=78752 |
9b3310b066136b0674a926da094b7fe87a13a58b |
|
08-May-2014 |
Tom Gundersen <teg@jklm.no> |
timesyncd: read global operational state from networkd |
e0e5ce237b11f2d97189cd7725bf339b4b8a78de |
|
08-May-2014 |
Tom Gundersen <teg@jklm.no> |
timesyncd: only run when the system has a carrier on a network interface
As the operational state detection in sd-network is still too primitive, timesyncd
will likely try to connect a bit early, so the first attempt will fail. |
089377209f47e62f29b80b018ad9bbf17f6d5fbd |
|
07-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: shorten log message |
661278ee297247c0c7e0708924f8ce52284529fc |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: never accept NTP time from server that is older than systemd's release time |
e8af69739a629708d2c155ebcd4fa57b8fd5006a |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: read server settings from a configuration file
Also, allow compiling in a default server list via a configure command
line item. |
16c058ba014e210fd8f6833a56787815c1059e1f |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: when an NTP server doesn't respond, proceed with the next |
376cd3b89c62f580a6f576cecfbbb28d3944118f |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
list: make LIST_FIND_TAIL work for empty lists |
600809211ecf1b1c3f2b701f30e5f77e33f0348b |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: keep order of NTP servers |
05f7fc0fe3b65cb203bf1e32002db07d860767b5 |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: make sure to reread /etc/resolv.conf when we try the next NTP server |
136aa3b444ab5025ebb265b056c5c7ef55688774 |
|
06-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: accept NTP version 3 responses |
881c74201d42d84f076e11d4ed765bd8421a6ff0 |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: add a more servers by default |
becad8f1ed696433b9841cbb9c4603c303338d30 |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: also try next server when sendto() fails |
7a183c4c739665b1be3033fe70933ef236686b58 |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: don't busy loop when we cannot connect to any servers |
678522cff0977ab4a9b3ed78fbbb8f602620eba4 |
|
06-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: properly handle multiple configured NTP servers and multiplei IP addresses per server name |
856a5a7d769826019d86bc52ae1bc2ed7b13ad44 |
|
05-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesyncd: lookup name server via sd-resolve, support IPv6, react to SIGINT/SITERM |
7ed0dd4be6ef4e73d7fb2fc1e80e6f9405c2f257 |
|
05-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesync: use safe_close() where possible |
5f8cfaee52745c885ea4148cd720c71ee5efc742 |
|
05-May-2014 |
Lennart Poettering <lennart@poettering.net> |
timesync: always initialize structs when declaring them as far as possible with contsant values |
ee03381e21683bcb61a2a936a3f61ee2e81fd5a4 |
|
05-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: log drift value as signed |
ef6191945e8bcf113fef120ec425f35643754eca |
|
03-May-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: log drift correction |
d67006fe539cb024440e06053742e8c7478ac0c1 |
|
30-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: use nanosecond mode |
81c36b3f28103c72e1b1c80a2af0dcc308a07bcf |
|
30-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: remove debug code |
ba9f11dc98f6812a3333411453ff6fb324abf303 |
|
29-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: limit debug values to milliseconds |
39594d49cf22d022bf370d6534c07186e9d8fb8a |
|
29-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: update log message |
a91df40e69fec72cc98c9829721fa5153da28bc2 |
|
29-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
timesyncd: add unit and man page |
687ed1237b20a6db174fd0b372df20fa9a3a23c2 |
|
28-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
rename timedate-sntp to timesync |