Commit graph

2255 commits

Author SHA1 Message Date
Lennart Poettering c4aa65e714 logind: add GetSessionByPID() bus call 2012-02-01 19:04:54 +01:00
Andreas Schwab 2b2823b4b5 ata_id: fix identify string fixup 2012-02-01 12:58:27 +01:00
Kay Sievers 09db3f5b66 ata_id: whitespace fixes 2012-02-01 12:58:27 +01:00
James M. Leddy 705b2a87cc keymap: Fix touchpad toggle button on Lenovo Ideapad
https://launchpad.net/bugs/922405

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2012-02-01 05:49:46 +01:00
Michal Schmidt ede3deb425 socket: typo in dump output 2012-02-01 00:00:34 +01:00
Lennart Poettering 9b221b63e5 logind: if we have to stop a session, kill at least its leader 2012-01-31 23:51:39 +01:00
Lennart Poettering 9ba1a15985 load-fragment: properly parse size values denoted in bytes 2012-01-31 20:53:34 +01:00
Lennart Poettering be19b7df6e journal: increase compression threshold for objects from 64 to 512
Apparently the perfomance price for compression is to steep to apply it
for all objects >= 64 and < 512 in size, as measured by Arjan Van De
Ven, hence increase the threshold to 512 which yields better results.
2012-01-31 20:38:53 +01:00
Ray Strode 8906b207d1 login: lock down input devices on extra seats
We need to tell the X server to grab the keyboards
and mice associated with a hotplugged seat, so that
it doesn't have the ability to control the kernel
vt consoles.
2012-01-31 20:00:36 +01:00
Kay Sievers 927f3bc468 extras: cdrom_id - create only /dev/cdrom 2012-01-30 19:03:05 +01:00
Kay Sievers 4f552cc7a0 pkg-config: rootlibexecdir -> systemdutildir
Better don't export historic names for split / vs. /usr filesysystems.
2012-01-30 16:32:18 +01:00
Kay Sievers 19b66dc57c extras: cdrom_id - create /dev/cdrom and conditionally /dev/dvd for sr0
Udev does no longer automatically create udev rules in /etc from the
device hotplug path.

No device name reservation will happen anymore; this model creates
too many problems for setups with many device changes or media which
is booted on different hardware.

Enumerated device names which are based on device discovery order or
on persistent on-disk name reservation will in general not be supported
by udev in the future. It is a problem that can not be solved properly,
and it always creates new problems at the same time it tries to solve
the original one. Udev will no longer pretend it can solve these issues,
and people should switch to available alternatives which provide the
far better compromise.

From now on, udev will only create /dev/cdrom for the first optical
drive, and if the drive is capable /dev/dvd. No other devices will
get any compatibility symlinks or enumerated device names like cdrom1,
cdrom2, and so on. The /dev/cdrom and /dev/dvd links have by default
a negative link priority, which will cause them to be overwritten by
any other device which clains the same names with already existing
udev rules.

If stable device names are needed, the /dev/disk/by-id/ links, which
uniquely identify a specific piece of hardware should be used. The links
usually contain a device serial number and the link names will not depend
on device discovery order.

If completely identical devices with identical or no serial number
need to be handled at the same time, the /dev/disk/by-path/ links can
be used. These links depend on the physical port which is used to connect
the device. It will change when the same device is moved to a different
port or host adapter.

If custom names are needed, custom udev rules which match on specific
device properties need to be added by the administrator.
2012-01-30 15:20:12 +01:00
Michal Schmidt 512947d46f main: don't force text mode in console_setup()
When systemd starts, plymouth may be already displaying progress
graphically. Do not switch the console to text mode at that time.
All other users of reset_terminal_fd() do the switch as before.

This avoids a graphical glitch with plymouth, especially visible with
vesafb, but could be also seen as a sub-second blink with radeon.

https://bugzilla.redhat.com/show_bug.cgi?id=785548
2012-01-29 21:55:51 +01:00
Kay Sievers e7f3289033 do not stop rule processing when device node is no longer around
Device nodes might have been deleted again by the kernel before an
'add' or 'change' event is even started. We need to run all rules,
regardless of the state in /dev.
2012-01-29 05:48:45 +01:00
Lennart Poettering 02b16a19a4 logind: make sure we create /var/lib/systemd before using it 2012-01-27 20:48:28 +01:00
Lennart Poettering ab8da6c266 pkg-config: export libexecdir, so that that gdm can use it to find the x server wrapper 2012-01-27 19:06:34 +01:00
Lennart Poettering 7d9eaa8461 socket: if SO_RCVBUFFORCE fails, fall back to SO_RCVBUF, to have at least a little effect 2012-01-27 18:58:02 +01:00
Lennart Poettering bb99a35a87 log: increase socket buffers for logging by default 2012-01-27 18:57:37 +01:00
Lennart Poettering 632117b71f log: never delay logging if the log server is stuck, always drop messages quickly 2012-01-27 18:14:06 +01:00
Kay Sievers a3642381eb builtin: blkid - add missing ID_ prefix for PART_ENTRY_* keys 2012-01-26 17:56:18 +01:00
Michal Schmidt da375869ff mount: fix automount regression
Tom Gundersen noticed a regression where comment=systemd.automount in
fstab no longer prevented the adding of the After=foo.mount dependency
into local-fs.target. He bisected it to commit 9ddc4a26.

It turns out that clearing the default_dependencies flag is necessary
after all, in order to avoid complementing of Wants= with After= in the
target unit. We still want to add the dependencies on quota units and
umount.target though.
2012-01-26 01:19:19 +01:00
Lennart Poettering 7d39db92c5 virt: detect LXC+libvirt containers 2012-01-25 00:13:05 +01:00
Lennart Poettering caa9488700 man: document systemd-cgtop tool 2012-01-25 00:12:47 +01:00
Kay Sievers 9c4eda1260 fix path to extras 2012-01-24 15:12:46 +01:00
Lennart Poettering be70cdd67a login: fix multi-seat check 2012-01-24 05:15:04 +01:00
Lennart Poettering b16f53046d login: extend comments in multi-seat-x 2012-01-24 04:32:09 +01:00
Kay Sievers e605cf7782 use sysname() for devices without a device node 2012-01-24 04:29:59 +01:00
Lennart Poettering 36db9a8d5b login: add multi-session X wrapper
In preparation for https://bugzilla.gnome.org/show_bug.cgi?id=655380 we
decided it's better to include the multi-seat X wrapper in systemd,
rather than gdm. (Side effect: this makes this accessible for other
DMs)

This is a stop-gap for now, until X gins proper multi-seat graphics
support at which point this code will go away without replacement.
2012-01-23 23:34:36 +01:00
Lennart Poettering a558d00381 journal: move journal TODO into main TODO 2012-01-23 22:01:29 +01:00
Lennart Poettering 7c69716810 util: use /dev/rtc symlink if possible before we go searching for a suitable device 2012-01-23 21:56:55 +01:00
Kay Sievers a7ef118174 move variable inside condition 2012-01-23 05:21:13 +01:00
Kay Sievers 0ecfcbd4f7 print warning when rules try to rename kernel device nodes 2012-01-23 05:15:12 +01:00
Kay Sievers b0a0080677 use devnode() for $name not sysname(), device nodes might be in a subdirectory 2012-01-23 04:44:35 +01:00
Kay Sievers a1525d1720 fix some fallout from tab removal 2012-01-22 22:44:13 +01:00
Kay Sievers 131a4dcfd4 login: move seat udev rules to login subdir 2012-01-22 18:32:13 +01:00
Lennart Poettering 8f2d43a012 cgtop: add new cgtop tool 2012-01-22 18:22:26 +01:00
Lennart Poettering 1733ca5475 tmpfiles: fix bad memory access 2012-01-22 18:22:26 +01:00
Lennart Poettering 1e5678d023 cgls: don't show kernel threads by default 2012-01-22 18:22:26 +01:00
Kay Sievers d2b795f2b9 libudev: do not set DEVNAME= twice
When we read the 'uevent' file we need to make sure, that we do not
read the relative DEVNAME= path provided by the kernel and overwrite
the absolute path udev expects here.
2012-01-21 06:18:32 +01:00
Dan Horák ce3fd7e72a journal: systemd v38 fails to build on big-endians
Hi,

during the builds for Fedora/s390x I've found that systemd v38 fails to
build on big-endian platforms.

...
make[2]: Entering directory `/root/systemd'
  CC     src/journal/libsystemd_journal_la-sd-journal.lo
src/journal/sd-journal.c: In function 'init_location':
src/journal/sd-journal.c:69:22: error: incompatible types when
initializing type 'long unsigned int' using type 'sd_id128_t'
src/journal/sd-journal.c:69:20: error: incompatible types when assigning
to type 'sd_id128_t' from type 'long unsigned int'
make[2]: *** [src/journal/libsystemd_journal_la-sd-journal.lo] Error 1

I see the problem in using le64toh() on the 16 bytes boot_id structure
in init_location()

Please see
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=544375 for a
full build log and attachment for a proposed fix.

With regards

Dan
2012-01-21 03:48:26 +01:00
Lennart Poettering d1f262fa46 systemctl: don't show ln -s/rm output in 'install' mode if --quiet is passed 2012-01-21 03:44:11 +01:00
Lennart Poettering 51122dc9e3 util: open the first RTC that has hctosys=1 set 2012-01-21 03:15:54 +01:00
Kay Sievers 430959910f warn about deprecated RUN+="socket:" use 2012-01-21 03:07:32 +01:00
Lennart Poettering 05aa9edde0 readahead: don't monopolize IO when replaying 2012-01-21 02:51:13 +01:00
Lennart Poettering aa001cd699 dbus: export ControlGroupPersistent field on the bus again 2012-01-21 01:47:53 +01:00
Michal Schmidt 1a710b430b socket: don't fail the socket on ENOTCONN
Albert Strasheim reported a socket unit with Accept=yes was failing
sometimes.
getpeername() returns ENOTCONN if the connection was killed by TCP RST.
The socket unit must not fail when it happens.

Reproducer available at:
https://bugzilla.redhat.com/show_bug.cgi?id=783344
2012-01-20 23:57:54 +01:00
Michal Schmidt 229b5d55f6 dbus-execute: don't publish control_group_persistent on DBus for now
Since the addition of ControlGroupPersistent, systemd is trivially
killed by "systemctl status any.service".
bus_property_append_bool must not be used for a tri-state int.
Also, should it really "b", or do we want the tri-state nature to be seen?

For now just comment out the buggy DBus property.
2012-01-20 03:03:25 +01:00
Michal Schmidt 3e52541ef5 service: add missing pid file unwatch in the destructor
The pid file watch could outlive the service unit if a daemon-reload
request came at the right time. The inotify event would then be
delivered to who knows where.

Fix it by unwatching in the service destructor.

Further changes will be needed to preserve the state of the pid file
watch across daemon-reload. For now let's just fix the crash observed
by Jóhann Guðmundsson:
Assertion 's->state == SERVICE_START || s->state == SERVICE_START_POST'
failed at src/service.c:2609, function service_fd_event().  Aborting

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=783118
2012-01-20 00:51:56 +01:00
Michal Schmidt a3f914b2a2 log: move #pragma around the function
Koen reported errors with gcc 4.5.4 for arm:
src/log.c:624:9: error: #pragma GCC diagnostic not allowed inside
functions
2012-01-19 13:00:34 +01:00
Kay Sievers 891703e1ee persistant -> persistent 2012-01-18 21:47:30 +01:00
Lennart Poettering 31ed59c511 tmpfiles: support writing short strings to files, in order to support /sys manipulations at boot time, a la sysctl 2012-01-18 16:39:04 +01:00
Lennart Poettering 88f0664562 manager: don't place units in the 'cpu' group when run as user instance, for now 2012-01-18 15:41:21 +01:00
Lennart Poettering 9058851be7 journal: when sending journal data via file, place it in /dev/shm, to allow early boot operation, even if it sucks 2012-01-18 15:40:58 +01:00
Lennart Poettering 8d53b4534a exec: introduce ControlGroupPersistant= to make cgroups persistant 2012-01-18 15:40:21 +01:00
Lennart Poettering 62f21ec91a journalctl: properly honour -n when -f is passed, too 2012-01-18 13:56:02 +01:00
Lennart Poettering 468d726bdd tmpfiles: add support for creating symlinks, char/block device nodes 2012-01-18 13:56:02 +01:00
Lennart Poettering fc3c1c6e09 logind: move X11 socket 2012-01-18 13:56:02 +01:00
Lennart Poettering 129eebe020 logind: simplify session_activate() a bit 2012-01-18 13:56:02 +01:00
Lennart Poettering abc5bbc6f0 logind: allow to create multiple sessions on non-multi-session seats to deal with left-over sessions 2012-01-18 13:56:02 +01:00
Martin Pitt 46505c52a6 keymap: Add Alienware M14xR1
https://launchpad.net/bugs/901513
2012-01-18 12:14:54 +01:00
Martin Pitt c861d52fd6 keymap: Fix keyboard brightness keys on Samsung 700Z series
https://launchpad.net/bugs/902332
2012-01-18 12:06:58 +01:00
Martin Pitt 1cb6889100 keymap: Fix eject button on Samsung 700Z series
https://launchpad.net/bugs/902798
2012-01-18 12:05:01 +01:00
Martin Pitt 4bebab9998 keymap: Fix rfkill button on Hewlett-Packard HP ProBook
https://bugs.launchpad.net/bugs/914838
2012-01-18 11:34:44 +01:00
Kay Sievers e64fae5573 udevd: kill hanging event processes after 30 seconds
Some broken kernel drivers load firmware synchronously in the module init
path and block modprobe until the firmware request is fulfilled.

The modprobe-generated firmware request is a direct child device of the
device which caused modprobe to run. Child device event are blocked until
the parent device is handled. This dead-locks until the kernel firmware
loading timeout of 60 seconds is reached.

The hanging modprobe event should now time-out and allow the firmware
event to run before the 60 second kernel timeout.
2012-01-18 05:06:18 +01:00
Michal Schmidt 281605bf14 util: fix ANSI sequence for red color
Red turned green by mistake in commit c1072ea0.
2012-01-17 12:54:45 +01:00
Michal Schmidt b7f336383d log: make asserts cheaper
On my x86_64 this shrinks the size of .text by 53 KB (7 %).
2012-01-17 12:34:53 +01:00
Michal Schmidt 2b7dec8661 log: remove useless variable
abort() never returns. Not even if the signal handler catches SIGABRT.
2012-01-17 12:34:53 +01:00
Michal Schmidt e2110e5d1b dbus-unit: make functions static
The dbus_unit_append_*() functions are not referenced from outside anymore.
2012-01-17 12:34:53 +01:00
Kay Sievers 1b9e13e2e2 builtin: blkid - add missing ID_ prefix
<ridikulus_rat>  60-persistent-storage.rules gpt by-partlabel/by-partuuid
  symlinks not created in udev-177 util-linux-2.20.1 kmod-3 in Archlinux x86_64.
<falconindy> ridikulus_rat: fix the rule, or fix the blkid builtin ;)
<kay> oh, i missed the ID_ stuff? :)
2012-01-16 15:38:41 +01:00
Michal Schmidt d200735e13 dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
 - only the .data members change at runtime, yet the whole arrays of
   properties with all the fields are constructed on the stack one by
   one by the code.
 - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
   are repeated in several unit types.

Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).

On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt 595ed347a8 unit: use safe downcasts, remove pointless casts
Always use the macros for downcasting.
Remove a few obviously pointless casts.
2012-01-16 13:34:42 +01:00
Michal Schmidt 1124fe6f01 unit: use the UNIT() macro consistently
The UNIT() macro upcasts from specific unit types to the base Unit.
Use it everywhere, rather than accessing the 'meta' member directly.
2012-01-16 13:34:42 +01:00
Michal Schmidt ac155bb885 unit: remove union Unit
Now that objects of all unit types are allocated the exact amount of
memory they need, the Unit union has lost its purpose. Remove it.

"Unit" is a more natural name for the base unit class than "Meta", so
rename Meta to Unit.

Access to members of the base class gets simplified.
2012-01-16 13:34:42 +01:00
Michal Schmidt 7d17cfbc46 unit: reduce heap usage for unit objects
The storage of the unit objects on the heap is currently not very
efficient. For every unit object we allocate a chunk of memory as large
as the biggest unit type, although there are significant differences in
the units' real requirements.
pahole shows the following sizes of structs:
488  Target
496  Snapshot
512  Device
528  Path
560  Timer
576  Automount
1080 Socket
1160 Swap
1168 Service
1280 Mount

Usually there aren't many targets or snapshots in the system, but Device
is one of the most common unit types and for every one we waste
1280 - 512 = 768 bytes.

Fix it by allocating only the right amount for the given unit type.
On my machine (x86_64, with 39 LVM volumes) this decreases systemd's
USS (unique set size) by more than 300 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt 1637a8be55 logind: downgrade login message to debug
The messages make people nervous.

https://bugzilla.redhat.com/show_bug.cgi?id=727315
2012-01-16 13:18:17 +01:00
Lennart Poettering fee80f6956 journal: drop privileges when storing coredump 2012-01-14 03:37:32 +01:00
Lennart Poettering e6acda19b2 journal: when show blob data show length 2012-01-14 03:07:47 +01:00
Lennart Poettering 32895bb390 util: support formatting eta and peta bytes with format_bytes() 2012-01-14 03:07:29 +01:00
Lennart Poettering a7bc2c2ac8 util: introduce FORMAT_BYTES_MAX 2012-01-14 03:06:57 +01:00
Lennart Poettering de0229ca36 journal: collect coredump up to 24M in size 2012-01-14 03:05:34 +01:00
Lennart Poettering 4c7de07481 journal: handle empty syslog identifier properly 2012-01-14 01:54:33 +01:00
Lennart Poettering 5c3759bf8a journal: fix bad memory access 2012-01-14 01:54:33 +01:00
Lennart Poettering 0dad12c190 journal: if the data to be sent is larger than the maximum datagram size resort to passing a temporary fd over native protocol 2012-01-14 01:54:33 +01:00
Lennart Poettering f5e04665eb journal: hook up coredumping with journal 2012-01-14 01:54:33 +01:00
Lennart Poettering 755a02c680 journal: add new system-cat tool as kind of a more powerfull BSD logger 2012-01-14 01:54:33 +01:00
Lennart Poettering 3043935f02 util: split out tty_is_vc_resolve() from default_term_for_tty() 2012-01-14 01:54:33 +01:00
Lennart Poettering c1072ea0da util: rework ANSI escape code macros 2012-01-14 01:54:33 +01:00
Michal Schmidt 9ddc4a26e5 mount: fix quota
quotacheck.service and quotaon.service were not pulled in for fstab mounts.
Fix it by not clearing the default_dependencies flag.

The root filesystem may have quotas too, so don't check for "/" there.

No need to have duplicate code for adding dependencies on umount.target.

https://bugzilla.redhat.com/show_bug.cgi?id=773431
2012-01-14 00:12:10 +01:00
Lennart Poettering 6ef25fb65e pam: fix build 2012-01-13 20:52:45 +01:00
Lennart Poettering fc7985ed67 pam: work correctly if a seat is specified but not vtnr 2012-01-13 20:51:58 +01:00
Lennart Poettering d3f2bdbfee journal: add output mode that just prints simple messages without any decorations 2012-01-13 02:58:45 +01:00
Lennart Poettering f987397649 api: add C++ guards to all headers 2012-01-13 00:49:21 +01:00
Lennart Poettering ebda471d89 sd-login: teach sd_pid_get_unit() proper handling of instantiated services 2012-01-13 00:49:02 +01:00
Evan Nemerson a5f834204f gudev: several minor introspection fixes
- Include exported package information
  - Include C include information
  - g_udev_device_get_parent & g_udev_device_get_parent_with_subsystem
    transfer ownership of their return values

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2012-01-12 09:06:43 +01:00
Lennart Poettering 7c8bbccd07 journal: if the syslog forwarder socket is full, then don't block 2012-01-12 05:09:24 +01:00
Lennart Poettering 4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Lennart Poettering 5ba081b0fb log: make internal log api log directly to the journal 2012-01-12 04:34:31 +01:00
Lennart Poettering 8a0f04e6a2 journal: add SELinux context to all logged messages 2012-01-11 22:45:05 +01:00
Lennart Poettering b785c858c3 journal: fix more 32/64 bit issues 2012-01-11 22:44:43 +01:00
Lennart Poettering fdcad0c255 tmpfiles: fix parsing of /proc/net/unix on 32Bit machines
Tracked down by Michael Meeks
2012-01-11 22:08:33 +01:00
Michal Schmidt 52beb2c379 logs-show: fix missing newline in short output
Ellipsized messages were printed without a newline.
2012-01-11 21:53:00 +01:00
Kay Sievers 2b76eb68ac man: mention that no daemons should be started by udev 2012-01-11 21:49:25 +01:00
Lennart Poettering 7f120cc6a2 journald: don't assume size_t and uint64_t are the same 2012-01-11 21:24:02 +01:00
Lennart Poettering 5e41cfec83 journald: set group ownership of journal files to 'adm' by default 2012-01-11 21:11:58 +01:00
Lennart Poettering e6520a0fce journal: make requirement for ACLs optional 2012-01-11 20:40:29 +01:00
Lennart Poettering d1e44dd827 journalctl: fix --help text 2012-01-11 16:03:42 +01:00
Lennart Poettering 1921a5cb3d journal: don't realign window twice 2012-01-11 03:55:24 +01:00
Lennart Poettering 19a2bd80c1 sd-journal: implement a number of non-implemented calls from the API for now 2012-01-11 03:23:04 +01:00
Lennart Poettering 731a676c20 systemd: reconnect to syslog as soon as the journal is fully up 2012-01-11 03:16:24 +01:00
Lennart Poettering 3ebcdf8cd9 journalctl: always show monotonic timestamp even if it's from an old boot 2012-01-11 03:02:10 +01:00
Lennart Poettering 4dcc1cb415 unit: implement new PropagateReloadTo=/PropagateReloadFrom= operations 2012-01-11 02:52:34 +01:00
Lennart Poettering bd1a698180 shutdown: add link to root storage daemon text 2012-01-11 02:52:34 +01:00
Lennart Poettering 8f53a7b8ea service: brutally slaughter processes that are running in the cgroup when we enter START_PRE and START 2012-01-11 02:52:34 +01:00
Kay Sievers bd59d82322 fix compiler warning 2012-01-10 19:37:41 +01:00
Kay Sievers db8f32f6ed cdrom_id: int -> bool 2012-01-10 16:37:41 +01:00
Lennart Poettering 7e4ab3c5a6 shutdown: exclude processes with argv[0][0] from killing 2012-01-10 05:03:59 +01:00
Kay Sievers 22dde8d712 fix debug message 2012-01-10 02:06:36 +01:00
Kay Sievers 912541b024 tabs are as useful as a hole in the head 2012-01-10 01:34:15 +01:00
Lucas De Marchi 6a6b254354 builtin: kmod - log if modules are blacklisted 2012-01-09 20:40:29 +01:00
Kay Sievers 1111415a75 doc: fix out of tree build (copy from libkmod) 2012-01-09 17:38:29 +01:00
Lennart Poettering bf96736674 journalctl: display source timestamp, not journald timestamp, if known 2012-01-07 05:00:28 +01:00
Lennart Poettering 67a122058b journalctl: add new short-monotonic output mode 2012-01-07 04:41:30 +01:00
Lennart Poettering 6c1e6b98bd journald: add kmsg source 2012-01-07 04:10:21 +01:00
Lennart Poettering aaf53376aa journald: remove inner loop debug message 2012-01-07 04:10:21 +01:00
Kay Sievers ebd91b34d7 fix compiler warning 2012-01-07 02:12:43 +01:00
Lennart Poettering e4bac488f9 sd-id128: let's make our API a bit smaller, since sd_id128_make_v4_uuid() is dispensable 2012-01-07 01:37:39 +01:00
Lennart Poettering 39f7f5c108 journalctl: rename --new-id to --new-id128 in order not to introduce yet another new name 2012-01-07 01:37:15 +01:00
Lennart Poettering dd338f01f5 build-sys: move .pc files next to the matching sources 2012-01-07 01:36:36 +01:00
Lennart Poettering 4ff77f66af load-fragment: fix parsing of Socket= setting 2012-01-07 01:26:08 +01:00
Lennart Poettering 509b6efbbe main: fix spelling 2012-01-07 01:26:08 +01:00
Lennart Poettering effb1102d3 journald: introduce systemd_journald.forward_to_kmsg=1 (and friends) to enable kmsg forwarding globally via kernel cmdline 2012-01-07 01:26:08 +01:00
Lennart Poettering 98736c68fe journald: shorten the time we wait for a forwarding syslog 2012-01-06 23:11:28 +01:00
Lennart Poettering 57020a3abf unit: properly update references to units which are merged
When we merge units that some kind of object points to, those pointers
might become invalidated, and needs to be updated. Introduce a UnitRef
struct which links up all the unit references, to ensure corrected
references.

At the same time, drop configured_sockets in the Service object, and
replace it by proper UNIT_TRIGGERS resp. UNIT_TRIGGERED_BY dependencies,
which allow us to simplify a lot of code.
2012-01-06 23:08:54 +01:00
Lennart Poettering 73aa0c00df service: add dependencies on configured sockets 2012-01-06 19:23:03 +01:00
Kay Sievers ad29a9f14f merge udev/, libudev/, systemd/ files in src/; move extras/ to src/ 2012-01-06 05:07:10 +01:00
Lennart Poettering 4c0bebc335 kmsg-syslogd: remove kmsg-syslogd, since it's entirely obsoleted and replaced by journald 2012-01-06 03:11:17 +01:00
Lennart Poettering 64f5002a3a special: fix name of journal socket unit 2012-01-06 02:48:38 +01:00
Lennart Poettering 706343f492 journal: introduce log target 'journal' for executed processes 2012-01-06 02:48:38 +01:00
Lennart Poettering db5973704b stdout: remove stdout-syslog-bridge since it is now obsoleted by journald 2012-01-06 02:48:38 +01:00
Michal Schmidt 5c0100a537 util: switch the console to text mode on reset
In case we're taking over the console after a killed X server.

https://bugzilla.redhat.com/show_bug.cgi?id=771563
2012-01-06 01:34:02 +01:00
Michal Schmidt df465b3f44 util: fix switching to console unicode mode
The KDSKBMODE ioctl wants a value directly, not its address.
2012-01-06 01:28:30 +01:00
Lennart Poettering eff406331a login: implement sd_session_get_service() 2012-01-05 23:14:22 +01:00
Lennart Poettering 4cd9a9d9ec journal: rename syslog tag to identifier since that's what we call it on the server side. 2012-01-05 21:46:48 +01:00
Lennart Poettering 258cdffc2f journal: rename priority_prefix to level_prefix, since that's how we call it in PID 1 2012-01-05 21:39:59 +01:00
Lennart Poettering 86b9b8e70d sd-journal: close reading side of sd_journal_stream_fd() file descriptors 2012-01-05 21:39:31 +01:00
Lennart Poettering 54fe0cdbe3 execute: talk directly to the journald, instead to the stdout-syslog-bridge 2012-01-05 21:39:08 +01:00
Lennart Poettering 33eb8abfa5 journal: store used transport in journal 2012-01-05 20:24:34 +01:00
Lennart Poettering 259d2e7620 journal: move sockets into their own subdir 2012-01-05 20:24:16 +01:00
Lennart Poettering 55d7bfc19b journalctl: rework short output mode to rebuild full syslog message 2012-01-05 20:11:47 +01:00
Lennart Poettering 8ab49c12dc headers: fix git URLs for source files 2012-01-05 18:25:36 +01:00
Lennart Poettering 2f9dec073b build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
Lennart Poettering 8665a38793 journal: fix include in sd-journal.h 2012-01-05 16:28:43 +01:00
Lennart Poettering 55ee336cdc journalctl: add --new-id switch to generate a new 128Bit id 2012-01-05 16:28:17 +01:00
Lennart Poettering ea41a8a973 journal: add missing sd-messages.h 2012-01-05 16:27:38 +01:00
Lennart Poettering 81527be142 build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
Lennart Poettering 67e5cc4f3e util: never ellipsize welcome message 2012-01-05 15:39:07 +01:00
Lennart Poettering 224f2ee221 journald: add configuration file options to forward all logged data to kmsg, console, syslog 2012-01-05 15:39:03 +01:00
Lennart Poettering 674f828369 log: minor optimization 2012-01-05 14:55:35 +01:00
Lennart Poettering 81beb7508e util: when printing status updates during boot, take terminal width into account 2012-01-05 14:55:35 +01:00
Zbigniew Jędrzejewski-Szmek 9cf3ab0e16 fix compilation error with 'PathSpec redefined' 2012-01-05 00:56:21 +01:00
Kay Sievers 4726299357 logind: add needed include for sd_notify() 2012-01-05 00:52:56 +01:00
Kay Sievers 2edfe21d03 conf-parser: silence compiler warning 2012-01-05 00:46:55 +01:00
Lennart Poettering e6960940b6 journald: parse configuration file 2012-01-04 20:40:04 +01:00
Lennart Poettering df50185b43 journal: beef up journal output of systemctl and journalctl 2012-01-04 18:33:36 +01:00
Lennart Poettering fd8ee359a0 journal: it's not a problem if the realtime jumps, hence don't ensure monotonicity of realtime for entries we write 2012-01-04 18:32:50 +01:00
Lennart Poettering f4fb21c151 systemctl: shortcut log output for non-service, non-socket, non-mount, non-swap units 2012-01-04 15:35:59 +01:00
Lennart Poettering 94fb446e55 journald: store _SYSTEMD_UNIT= instead of _SYSTEMD_SERVICE= field, since processes might also be related to mount, swap or socket units, not just services 2012-01-04 15:35:30 +01:00
Lennart Poettering e91af489a2 journalctl: only output 10 most recent lines in --follow mode 2012-01-04 15:27:31 +01:00
Lennart Poettering 6f003b4304 journalctl: fix counting of -n parameter 2012-01-04 04:00:14 +01:00
Lennart Poettering cf5eb6a110 journal: fix reverse traversing of entries 2012-01-04 03:45:50 +01:00
Lennart Poettering b4e5f92017 journal: add missing error check 2012-01-04 03:45:24 +01:00
Lennart Poettering 9c4e3f2624 journal: don't mind too much if we can't find a monotonic timestamp 2012-01-04 03:45:14 +01:00
Lennart Poettering b1a0ab7148 journald: don't rotate on startup 2012-01-04 02:33:11 +01:00
Lennart Poettering a99c349d0d journal: when increasing window, make sure to use the increased window 2012-01-04 02:21:04 +01:00
Lennart Poettering 4bbdcdb301 journal: apply seek check before resizing window, and refresh stat data if necessary 2012-01-04 02:16:38 +01:00
Lennart Poettering b788cc23aa journal: add memory barrier before linking in newly created entries 2012-01-04 02:15:45 +01:00
Lennart Poettering 4b067dc9d2 journal: add missing error check 2012-01-04 02:15:08 +01:00
Lennart Poettering 2100675e9f journalctl: add -n switch 2012-01-04 02:14:42 +01:00
Lennart Poettering 8e9e6d567a sd128: rename SD_FORMAT_ID128_STR to SD_ID128_FORMAT_STR to follow naming scheme 2012-01-04 02:13:41 +01:00
Lennart Poettering eaff7bd849 sd128: add format string macros for outputting sd_id128_t variables 2012-01-04 02:09:05 +01:00
Lennart Poettering bad75c274a journald: fix _SYSTEMD_CGROUP= values 2012-01-03 23:41:55 +01:00
Lennart Poettering bda061759c logind: send out Lock signal when locking 2012-01-03 23:08:15 +01:00
Lennart Poettering 976c088a02 logind: don't watch vcsa if nobody cares 2012-01-03 21:50:02 +01:00
Lennart Poettering addedec48b logind: if we can't open /dev/tty0, assume there is no VT subsystem and don't pretend we could do VT switching 2012-01-03 21:47:54 +01:00
Daniel Walsh dc4b020064 namespace: remount namespace root dir for SLAVE to avoid propagation of mounts from the namespace to the host
https://bugzilla.redhat.com/show_bug.cgi?id=752540
2012-01-03 21:12:10 +01:00
Lennart Poettering 86aa7ba4f9 systemctl: hook up systemctl with the journal 2012-01-03 21:08:58 +01:00
Lennart Poettering adf7d506b5 journal: never fail if we cannot access /var, just print a warning 2012-01-03 21:08:58 +01:00
Lennart Poettering 52f4f45bf4 journald: treat a read-only /var identical to an unmounted one 2012-01-03 21:08:58 +01:00
Lennart Poettering 85d83bf41c journald: add _SYSTEMD_SESSION, _SYSTEMD_OWNER_UID, _SYSTEMD_SERVICE to all entries 2012-01-03 21:08:58 +01:00
Lennart Poettering 000a2c9886 sd-id128: add _public_ to all exports, and add validity checks for all parameters 2012-01-03 21:08:58 +01:00
Lennart Poettering a5344d2c3b journal: add _public_ to all sd-journal calls, and add parameter checks 2012-01-03 21:08:58 +01:00
Lennart Poettering 9847946e12 login: introduce sd_pid_get_service() 2012-01-03 21:08:58 +01:00
Lennart Poettering b72491a2fd nspawn: get rid of BUFFER_SIZE, use LINE_MAX instead 2012-01-03 21:08:57 +01:00
Lennart Poettering 4f3656e1ce readahead: bring export definition of sd-readahead in line with sd-daemon 2012-01-03 21:08:57 +01:00
Lennart Poettering 4cfc6dbe52 socket: only add dependency on kmsg socket to socket units which have any kind of exec program specified 2012-01-03 21:08:57 +01:00
Lennart Poettering 776a564f54 build-sys: move kbd-model-map to locale/ 2012-01-03 21:08:57 +01:00
Lennart Poettering b4d0195b05 cryptsetup: split off cryptsetup into its own subdir 2012-01-03 21:08:57 +01:00
Lennart Poettering 927f62bd54 login: move systemd-user-sessions.service into login/, too 2011-12-31 19:45:41 +01:00
Lennart Poettering e5e83e8362 build-sys: make readahead and vconsole optional 2011-12-31 19:45:41 +01:00
Kay Sievers bb765041af gnome-ask-password-agent: require libnotify >= 0.7.0 2011-12-31 18:15:27 +01:00
Lennart Poettering be5f4385d6 login: move the PAM module to src/login/ since it is just a client to logind 2011-12-31 18:06:56 +01:00
Lennart Poettering 5e2c93666f test: rename test directory 2011-12-31 18:06:56 +01:00
Lennart Poettering 9c5b60ca5f login: move libsystemd-login.pc.in into src/login/ 2011-12-31 13:37:23 +01:00
Kay Sievers d4a66a7f96 libsystemd-id128: restructure Makefile.am 2011-12-31 08:53:06 +01:00
Kay Sievers 7e8f489ad5 journal: restructure Makefile.am 2011-12-31 08:36:52 +01:00
Kay Sievers 609518c1d2 binfmt: move sources to subdirectory 2011-12-31 07:40:31 +01:00
Kay Sievers 681cfc6c40 hostnamed, localed: move config files to subdir 2011-12-31 07:23:57 +01:00
Kay Sievers 00c36f274b hostnamed: move sources to subdirectory 2011-12-31 07:03:33 +01:00
Kay Sievers 1822350db1 localed: move sources to subdirectory 2011-12-31 06:50:34 +01:00
Kay Sievers 4668191d02 timedated: move sources to subdirectory 2011-12-31 06:40:48 +01:00
Kay Sievers 6c8a39b883 journal: silence gcc warnings 2011-12-31 03:55:35 +01:00
Lennart Poettering c0f99c21f4 util: fix warning 2011-12-31 03:35:45 +01:00
Lennart Poettering e81e801af6 journal: move symver file into subdirectory 2011-12-31 03:35:38 +01:00
Lennart Poettering 4deba28559 logind: move more files into subdirectory 2011-12-31 03:24:31 +01:00
Lennart Poettering 4bba9156da logind: move logind into its own subdirectory 2011-12-31 03:16:08 +01:00
Lennart Poettering babfc09177 journal: automatically deduce journal metrics from file system sizes 2011-12-31 02:31:54 +01:00
Lennart Poettering 3a22a969c5 kmsg: drop unused variable 2011-12-31 01:08:06 +01:00
Lennart Poettering 271b032a05 socket: rename the PassCred= option to PassCredentials=, since we don't want to needlessly abbreviate options unless they are very well established 2011-12-31 01:07:49 +01:00
Lennart Poettering dc1ecd78e9 Merge branch 'journal' 2011-12-31 00:59:37 +01:00
Lennart Poettering 74ef2d16ad journal: move max_use into metrics structure 2011-12-31 00:57:14 +01:00
Lennart Poettering b3a0ad5ab1 journal: disable default debug logging 2011-12-30 22:29:23 +01:00
Lennart Poettering 783d2675ef journal: fix a few bad memory accesses and leaks 2011-12-30 22:16:04 +01:00
Lennart Poettering 8b18eb674c journald: forward all syslog messages to syslogd 2011-12-30 19:05:43 +01:00
Lennart Poettering 4b2d99d9f4 journal: add unit files and shared library glue 2011-12-30 17:50:37 +01:00
Lennart Poettering f39e126e99 journald: add missing header 2011-12-30 16:01:33 +01:00
Lennart Poettering adb2ce5f69 remount-api-vfs: handle another OOM condition 2011-12-30 15:34:21 +01:00
Lennart Poettering 54a7b863dd journald: don't recheck /var availability more often than 30s 2011-12-29 15:25:42 +01:00
Lennart Poettering cf244689e9 journald: flush /run to /var as soon as it becomes available 2011-12-29 15:00:57 +01:00
Lennart Poettering de97b26ac5 journald: increase rate limit burst rate 2011-12-29 15:00:05 +01:00
Lennart Poettering 2a59ea54f1 journal: never mmap beyond file size 2011-12-28 01:53:06 +01:00
Lennart Poettering 9cfb57c989 journald: when checking available disk space for rate limiting, cache the results temporarily 2011-12-27 23:18:09 +01:00
Lennart Poettering 85a131e8d8 journal: fix hash table lookup logic 2011-12-27 22:58:20 +01:00
Lennart Poettering 24b51289e3 journal: fix typo 2011-12-27 22:52:22 +01:00
Lennart Poettering 3306729574 udev: exclude loopback device from udev rule based sysctl application, since we can just apply that directly at boot 2011-12-27 22:52:15 +01:00
Lennart Poettering 6e409ce10d journald: implement sophisticated rate limiting 2011-12-27 22:51:46 +01:00
Lennart Poettering fe6521272b journal: implement stdout transport 2011-12-23 20:50:48 +01:00
Lennart Poettering 6ad1d1c306 journald: enforce some syntax restrictions on field names sent from the client side 2011-12-22 00:35:04 +01:00
Lennart Poettering 440ee3665e journal: properly handle first inline bisect array entry 2011-12-21 22:32:52 +01:00
Lennart Poettering e4e61fdbed journal: add missing compress.[ch] 2011-12-21 19:00:10 +01:00
Lennart Poettering 0d43c6944b journalctl: add command line parsing 2011-12-21 18:59:56 +01:00
Lennart Poettering 72f597065c journalctl: add json, export, short and verbose output modes 2011-12-21 18:17:22 +01:00
Lennart Poettering 807e17f05e journal: add inline compression support with XZ 2011-12-21 02:40:59 +01:00
Lennart Poettering bc85bfee87 journal: fix space reservation limit enforcement 2011-12-20 02:38:36 +01:00
Lennart Poettering 466ccd92e2 journal: fix matches 2011-12-20 00:38:14 +01:00
Michal Schmidt 8f7f7a1bd3 log: never block on syslog in PID 1
Use a non-blocking syslog socket if logging from PID 1.
If sendmsg fails with EAGAIN, fall back to kmsg or console only for the
current message. Next message will try syslog again.
2011-12-20 00:23:51 +01:00
Michal Schmidt 9721b19968 dbus: no sync D-Bus connection flushing
Blocking on D-Bus in a system manager could lead to deadlock.
2011-12-20 00:23:51 +01:00
Michal Schmidt cbd37330bc dbus: register to DBus asynchronously
Chen Jie observed and analyzed a deadlock. Assuming systemd-kmsg-syslogd
is already stopped, but rsyslogd is not started yet:
 1. systemd makes a synchronous call to dbus-daemon.
 2. dbus-daemon wants to write something to syslog.
 3. syslog needs to be started by systemd.
   ... but cannot be, because systemd is waiting in 1.

Solve this by avoiding synchronous D-Bus calls. I had to write an async
bus registration call. Interestingly, D-Bus authors anticipated this, in
documentation to dbus_bus_set_unique_name():
> The only reason to use this function is to re-implement the equivalent
> of dbus_bus_register() yourself. One (probably unusual) reason to do
> that might be to do the bus registration call asynchronously instead
> of synchronously.

Lennart's comments from IRC:
> though I think this doesn't fix the problem in its entirety
> simply because dbus_connection_open_private() itself is still synchronous
> i.e. the connect() call behind it is not async
> I think I listed that issue actually on some D-Bus todo list
> i.e. to make dbus_connection_get() fully async
> but that's going to be hard
> so your patch looks good

So it may not be perfect, but it's clearly an improvement.
I did not manage to reproduce the original deadlock with the patch.
2011-12-20 00:17:14 +01:00
Dan Walsh 81c3f1f6ab label: fix labeling of symbolic links 2011-12-19 23:58:58 +01:00
Lennart Poettering 50f20cfdb0 journal: implement inotify-based live logging logic 2011-12-19 22:35:46 +01:00
Lennart Poettering 2e4a6ff47b hashmap: add hashmap_first_key() 2011-12-19 19:54:51 +01:00