1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

18527 Commits

Author SHA1 Message Date
Michal Schmidt
1fc605b0e1 journal: abstract the resetting of JournalFile's location 2014-12-18 11:56:19 +01:00
Michal Schmidt
99cc7653a8 journal: move definition of LocationType to journal-file.h
In preparation for individual JournalFiles maintaining a location
of their own.
2014-12-18 11:53:39 +01:00
Michal Schmidt
8a2bd0a365 Revert "journal: optimize iteration: skip whole files behind current location"
This reverts commit b7c88ab8cc.

This optimization will be made redundant by the following patches.
2014-12-18 11:53:39 +01:00
Michal Schmidt
0633cb5206 Revert "journal: optimize iteration: skip files that cannot improve current candidate entry"
This reverts commit f8b5a3b75f.

This optimization will be made redundant by the following patches.
2014-12-18 11:53:39 +01:00
Michal Schmidt
14499361a5 journal: delete unused function journal_file_skip_entry()
Its only caller is a test.
2014-12-18 11:53:08 +01:00
Michal Schmidt
ae2adbcd09 journal: delete unused function journal_file_move_to_entry_by_offset() 2014-12-18 11:47:13 +01:00
Zbigniew Jędrzejewski-Szmek
ee05e7795b core: use raw_clone instead of fork in signal handler
fork() is not async-signal-safe and calling it from the signal handler
could result in a deadlock when at_fork() handlers are called. Using
the raw clone() syscall sidesteps that problem.

The tricky part is that raise() does not work, since getpid() does not
work. Add raw_getpid() to get the real pid, and use kill() instead of
raise().

https://bugs.freedesktop.org/show_bug.cgi?id=86604
2014-12-18 00:52:41 -05:00
Zbigniew Jędrzejewski-Szmek
503dbda6d9 test-unit-file: add test for semicolon escaping
https://bugs.freedesktop.org/show_bug.cgi?id=87393
2014-12-18 00:52:41 -05:00
tomsod-m ya ru
3851c51ad1 load-fragment: properly unescape \;
https://bugs.freedesktop.org/show_bug.cgi?id=87393
2014-12-17 23:01:38 -05:00
Zbigniew Jędrzejewski-Szmek
6feeeab0bc path: make the check for unsupported name_to_handle_at symmetric
If child supports, but the parent does not, or when the child does
not support, but the parent does, assume the child is a mount point.

Only if neither supports use the fallback.
2014-12-17 21:08:16 -05:00
Umut Tezduyar Lindskog
b890bf6a81 path: follow symbolic link for parent path (2)
c0e57ba9e2 fixed the fallback path.
We should do the same for name_to_handle_at().
2014-12-17 21:08:16 -05:00
Lennart Poettering
f2cbe59e11 machinectl: add new commands for copying files from/to containers 2014-12-18 01:36:28 +01:00
Lennart Poettering
20b63d12b5 util: in make_stdio() use dup2() rather than dup3()
dup3() allows setting O_CLOEXEC which we are not interested in. However,
it also fails if called with the same fd as input and output, which is
something we don't want. Hence use dup2().

Also, we need to explicitly turn off O_CLOEXEC for the fds, in case the
input fd was O_CLOEXEC and < 3.
2014-12-18 01:36:28 +01:00
Lennart Poettering
82e6c50c47 update TODO 2014-12-18 01:36:28 +01:00
Lennart Poettering
785890acf6 machinectl: implement "bind" command to create additional bind mounts from host to container during runtime 2014-12-18 01:36:28 +01:00
Ken Werner
60e1651a31 nspawn: fix invocation of the raw clone() system call on s390 and cris
Since the order of the first and second arguments of the raw clone() system
call is reversed on s390 and cris it needs to be invoked differently.
2014-12-17 00:20:56 -05:00
Marc Schmitzer
ef686ae230 hwdb: add Lenovo 3000 N200 special key
https://bugs.freedesktop.org/show_bug.cgi?id=87377
2014-12-17 00:20:56 -05:00
Umut Tezduyar Lindskog
c0e57ba9e2 path: follow symbolic link for parent path
[zj: When we lstat the target path, symlinks above the last component
     will be followed by both stat and lstat. So when we look at the
     parent, we should follow symlinks.]
2014-12-16 21:19:19 -05:00
Tom Gundersen
dd9c7723fa shared: strv - add strv_clear()
This frees the elements of the strv without freeing the strv itself.
2014-12-17 01:09:16 +01:00
Tom Gundersen
3542eac7f9 shared: path-util - memory leak 2014-12-16 22:54:04 +01:00
Tom Gundersen
c487c9cec0 udev: net_setup - fix warning 2014-12-16 22:54:04 +01:00
Thomas Hindoe Paaboel Andersen
30c873fbfb test-json: use fabs 2014-12-16 20:38:03 +01:00
Susant Sahani
b0ceb53a7d fix compiler warning
src/shared/utf8.c:268:13: warning: unused variable 'd'
[-Wunused-variable]
         int d;
2014-12-16 00:30:34 -05:00
Jan Synacek
75836b9d20 systemctl: fix argument handling when invoked as "shutdown" 2014-12-16 00:30:34 -05:00
Harald Hoyer
df17ddee08 nss-myhostname: also recognize "gateway."
"gateway." skips adding the domain search path and saves some queries to
the nameserver.
2014-12-16 00:30:34 -05:00
Zbigniew Jędrzejewski-Szmek
b42de08aa4 Update TODO 2014-12-16 00:30:34 -05:00
Zbigniew Jędrzejewski-Szmek
bc854dc7cd systemctl: refuse to edit runtime dropins when they already exist in /etc
The check for existing unit files and dropins is unified.

path_join() is updated to not insert duplicate separators.
2014-12-16 00:30:34 -05:00
Zbigniew Jędrzejewski-Szmek
ad2a035820 systemctl: share path lookup between 'cat' and 'edit'
'systemctl cat' now works for templates too.

'systemctl edit' does not refuse to edit units that have changed on
disk. That restriction didn't seem useful, actually editing units that
have changed on disk before they are started is very reasonable.

'edit' with instances and templates works again:

Now:

$ build/systemctl edit getty@
Failed to copy /etc/systemd/system/getty@.service.d/override.conf to /etc/systemd/system/getty@.service.d/.override.confdff6290408c86369: Permission denied
$ build/systemctl edit getty@tty3
Failed to create directories for /etc/systemd/system/getty@tty3.service.d/override.conf: Permission denied
$ build/systemctl edit --full getty@tty3
Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@tty3.serviced3d175087e7e439b: Permission denied
Failed to create temporary file for /etc/systemd/system/getty@tty3.service: Permission denied
$ build/systemctl edit --full getty@
Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@.servicea3caad491c0f2f3d: Permission denied
Failed to create temporary file for /etc/systemd/system/getty@.service: Permission denied
2014-12-16 00:30:34 -05:00
Zbigniew Jędrzejewski-Szmek
8df1850740 systemctl: split out LookupPaths initialization 2014-12-16 00:30:34 -05:00
Zbigniew Jędrzejewski-Szmek
33f6c497f3 systemctl: move two functions up
No functional change.
2014-12-16 00:30:33 -05:00
Zbigniew Jędrzejewski-Szmek
3f36991e00 systemctl: unify warning about unit files changed on disk 2014-12-16 00:30:33 -05:00
Zbigniew Jędrzejewski-Szmek
5b013a2f67 systemctl: do not use -1 for return code
Also make the error messages more specific to give a hint to the user
how to solve the problem.
2014-12-16 00:30:33 -05:00
Zbigniew Jędrzejewski-Szmek
1a7f1b385c Move dropin listing to shared
No functional change. This is in preparation for using this in
systemctl in the future.
2014-12-16 00:30:33 -05:00
Peter Hutterer
6a057a9985 hwdb: Logitech MX1000, another Lenovo USB mouse
Provided by Benjamin Bellec

https://bugs.freedesktop.org/show_bug.cgi?id=87343
2014-12-16 15:22:04 +10:00
Peter Hutterer
b631b4812a hwdb: more an entry for the MS Sculpt Ergonomic
Note that the MS receivers likely work like the Logitech ones, i.e. all
devices connected show up with the same vid/pid/name. Full evidence remains to
be gathered.
2014-12-16 15:20:25 +10:00
Lennart Poettering
e7eebcfc42 shared: add minimal JSON tokenizer 2014-12-15 22:27:15 +01:00
Tom Gundersen
c532d8a00c udev: builtin-hwdb - port to sd-hwdb 2014-12-15 20:40:09 +01:00
Tom Gundersen
d640c07d97 udevadm: port to sd-hwdb 2014-12-15 20:40:09 +01:00
Tom Gundersen
81fd1dd3a2 networkctl: port from libudev to sd-hwdb 2014-12-15 20:40:09 +01:00
Lennart Poettering
d2f81fb00c update TODO 2014-12-15 19:02:17 +01:00
Lennart Poettering
0faacd470d unit: handle nicely of certain unit types are not supported on specific systems
Containers do not really support .device, .automount or .swap units;
Systems compiled without support for swap do not support .swap units;
Systems without kdbus do not support .busname units.

With this change attempts to start a unsupported unit types will result
in an immediate "unsupported" job result, which is a lot more
descriptive then before. Also, attempts to start device units in
containers will now immediately fail instead of causing jobs to be
enqueued that never go away.
2014-12-15 19:02:17 +01:00
Tom Gundersen
17d1f37d0d networkd: failing to track links is a serious problem so log at warning level rather than debug 2014-12-15 17:57:51 +01:00
Daniel Mack
f9e35b2e0d hwdb: fix ordering
We sort by default DPI, not the first one in the list.
2014-12-15 17:15:16 +01:00
Daniel Mack
f8a9b6ae35 hwdb: Logitech G400s
Provided by Peter Hutterer:

  https://bugs.freedesktop.org/show_bug.cgi?id=87332
2014-12-15 17:11:31 +01:00
Harald Hoyer
de72f11bd1 hwdb: Logitech MX 518 2014-12-15 14:14:09 +01:00
Martin Pitt
e17fb3c1dd shared: time-dst: Avoid buffer overflow
Commit 681f9718 introduced an additional null terminator for the zone names.
Increase the allocation of "transitions" to actually make room for this.
2014-12-15 13:50:11 +01:00
Gabriel de Perthuis
d47f6ca5f9 blkid: Warn when rejecting a superblock with a bad csum
Bump libblkid requirement from 2.20 to 2.24.
util-linux 2.25 is actually required since fdbbad981c
2014-12-14 12:54:17 -05:00
Ivan Shapovalov
9b6e0ce5ac delta: fix output alignment of [REDIRECTED] entries 2014-12-14 12:54:17 -05:00
Mantas Mikulėnas
cf5a899751 build-sys: remove commented-out m4 from user@.service
Otherwise this actually remains in the generated unit in /usr/lib.

If you want to keep it commented out, a m4-compatible way would be:

    m4_ifdef(`HAVE_SMACK',
    dnl Capabilities=cap_mac_admin=i
    dnl SecureBits=keep-caps
    )
2014-12-14 12:54:16 -05:00
Dave Reisner
0f5a314b2e build-sys: fix distcheck
- fix misspelling in filename (intenal -> internal)
- remove deleted hwdb-related file (nuked with sd-hwdb refactor)
2014-12-14 10:56:25 -05:00