1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00
Commit Graph

1052 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
9cc2c8b763 man: add links to directive index to see-alsos
systemd.directives(5) is renamed to systemd.directives(7).
Section 7 is "Miscellaneous".
2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek
08177c85ef make-directive-index: link to systemd options 2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek
4a431c9ab1 man: add bootchart.conf to directives index 2013-01-15 11:30:41 -05:00
Lennart Poettering
c84f5e4a82 login: introduce sd_session_get_tty() 2013-01-15 03:01:35 +01:00
Zbigniew Jędrzejewski-Szmek
d354315ff7 build-sys: do not install to / in 'make distcheck' 2013-01-10 15:43:20 -05:00
Zbigniew Jędrzejewski-Szmek
52edb22835 build-sys: fix 'make distcheck' w/o sysvinit compat
EXTRA_DIST must unconditionally contain all source files.
2013-01-10 15:42:31 -05:00
Kay Sievers
d5a89d7dc1 udev: move string copy functions to shared/ 2013-01-09 19:06:46 +01:00
Umut Tezduyar
5088d19fa5 bootchart: install missing man page and config file 2013-01-08 16:55:55 +01:00
Lennart Poettering
dee4c24425 build-sys: fix spelling of sysvrcndir 2013-01-08 02:37:37 +01:00
Lennart Poettering
71c474864c build-sys: bump version and so revisions 2013-01-08 01:42:41 +01:00
Lennart Poettering
6ee667aeeb analyze: add emacs mode header 2013-01-08 01:27:18 +01:00
Kay Sievers
ddcbd96ae6 Revert "build-sys: remove .la files after installation"
"make distcheck" fails with:
  ERROR: files left after uninstall:
  ./usr/lib64/security/pam_systemd.so
  ./lib/libnss_myhostname.so.2
  ./lib64/python2.7/site-packages/systemd/_journal.so

This reverts commit ca25fde748.
2013-01-07 23:48:43 +01:00
Auke Kok
83fdc450aa bootchart: merge bootchart
Bootchart is renamed to 'systemd-bootchart' and installed as
/usr/lib/systemd/systemd-bootchart. The configuration file
will reside in /etc/systemd/bootchart.conf.
2013-01-07 23:48:43 +01:00
Zbigniew Jędrzejewski-Szmek
ca25fde748 build-sys: remove .la files after installation
Define KEEP_LA_FILES to keep them.

The hook is repeated because both install-exec-hook and
install-data-hook can install libraries and with parallel make
it's not possible to predict which one will run first.

http://lists.freedesktop.org/archives/systemd-devel/2013-January/008016.html
tl;dr: Libtool .la files are not very useful for linking linux
libraries.
2013-01-07 13:45:12 -05:00
Tom Gundersen
16eb4da97e nss-myhostname: integrate documentation
Converted from html to xml and changed the style to fit into the other
manpages.
2013-01-07 15:15:57 +01:00
Tom Gundersen
d562955eac nss-myhostname: integrate into systemd buildsystem
Note that there are still some rome for cleanups. In particular,
the .la files are now installed, which we probably don't want; and
some of the macros in Makefile.am are likely redundan.
2013-01-07 15:15:57 +01:00
Michael Biebl
d7ae18eea5 build: Drop "=" from move-to-rootlibdir define
The variable assignment operator was introduced in make 3.82 and thus
breaks "make install" with older versions of make. Since "=" is optional
in make 3.82 it is safe to drop.
2013-01-06 21:52:44 +01:00
Zbigniew Jędrzejewski-Szmek
24fdc23004 build-sys: use recipe for moving libs
Just avoids repeating the same code a few times.
The way that hooks are named is standardized.
No functional change.
2013-01-06 13:52:47 -05:00
Kay Sievers
394e2938ff udev: enable persistent network device naming 2013-01-06 16:17:33 +01:00
Zbigniew Jędrzejewski-Szmek
c4eb236a2c build-sys: invoke scripts with $PYTHON during build
Python binary to be used during compilation can be set with
./configure PYTHON=...

The she-bang line is removed, since it is not used anymore.
2013-01-04 22:22:21 -05:00
Zbigniew Jędrzejewski-Szmek
2f4da3e6c2 systemd-analyze: use specified binary, add --version
Python binary used in the she-bang line in installed
scripts can be set with ./configure PYTHON_BINARY=...
Defaults to the same path as python used during compilation.

Adding --version makes systemd-analyze behave consistently with the
rest of installed programs.

The lines in ./configure output are reordered to keep all yes/no lines
separate.  I think that this makes the output clearer.
2013-01-04 22:20:35 -05:00
Zbigniew Jędrzejewski-Szmek
bbed6c0d4b systemd-analyze: pipe through SED_PROCESS
To be able to add --version and change python binary.
2013-01-04 21:57:55 -05:00
Zbigniew Jędrzejewski-Szmek
7f8e692bb2 build-sys: allow update-hwdb with seperate build dir 2013-01-04 21:57:55 -05:00
Zbigniew Jędrzejewski-Szmek
e241dd66f1 build-sys: drop unused $RUNTIME_DIR 2013-01-04 21:13:16 -05:00
Lennart Poettering
bc2708414b build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2013-01-04 23:26:21 +01:00
Lennart Poettering
a382332eed build-sys: make path of loadkeys/setfont configurable in configure 2013-01-04 23:26:21 +01:00
Lennart Poettering
b1c4ca25bf build-sys: make rc-local support part of SYSV compat
This also drops automatic selection of the rc local scripts
based on the local distro. Distributions now should specify the paths
of the rc-local and halt-local scripts on the configure command line.
2013-01-04 23:26:20 +01:00
Marcel Holtmann
94f5bbc626 hwdb: Add database for Bluetooth company identifiers 2012-12-31 04:50:28 +01:00
Lennart Poettering
23406ce58a logind: add support for automatic suspend/hibernate/shutdown on idle 2012-12-24 00:29:40 +01:00
Colin Walters
81dc4bde12 build-sys: Make libsystemd-shared link to libsystemd-daemon
Commit f934051c4d broke the build
because it made libsystemd-shared call sd_listen_fds() which is
defined in libsystemd-daemon.

This is a bit of a contortion because libsystemd-shared.la is a
noinst_LTLIBRARY, but libtool should do the right thing here and emit
DT_NEEDED on libsystemd-daemon.so for things that consume
libsystemd-shared.la.
2012-12-23 16:25:24 +01:00
Lennart Poettering
f934051c4d shared: move fdset.c from core/ to shared/ since it is used by more than the core now 2012-12-23 11:28:14 +01:00
Lennart Poettering
e8bc0ea2b1 journalctl: strip TABs and ANSI color sequences from log messages when displaying them 2012-12-23 11:28:14 +01:00
Lennart Poettering
842f3b0fc9 nspawn: allow passing socket activation fds through nspawn 2012-12-22 22:17:58 +01:00
Tollef Fog Heen
7a14d67f76 Remove frugalware display-manager.service
Frugalware are shipping their own .service file now, so stop shipping
it here.

This effectively reverts 196e3fa74a
2012-12-14 09:17:14 +01:00
Kay Sievers
f3ffced541 build-sys: add libsystemd-daemon.la to libsystemd-core.la
https://bugs.freedesktop.org/show_bug.cgi?id=57900
2012-12-05 02:08:49 +01:00
Tom Gundersen
5fe25affc0 hwdb: add IAB to the OUI database
The individual address block is a poor man's organizationally unique
identifier.

Perhaps we should change the udev key from ID_OUI_FROM_DATABASE to
something like ID_IEEE_VENDOR_FROM_DATABASE?

Suggested-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-12-04 02:11:37 +01:00
Zbigniew Jędrzejewski-Szmek
b5a223bfcf build-sys: use parallel tests driver
This saves test output to individual .log files.

The driver is only used in /Makefile.am, not in
/docs/*udev/Makefile.am because the latter don't seem to work with
this driver. They don't produce much output anyway.

.gitignore is alphabetized, and .log files are added to it.
Generated files from /build-aux are removed from the list.
2012-12-01 16:38:39 +01:00
Zbigniew Jędrzejewski-Szmek
47cd54a994 build-sys: color test results 2012-12-01 16:38:37 +01:00
Alessandro Crismani
68c77c2f61 keymap: Update the list of Samsung Series 9 models
Currently, keymaps are provided only for the NP90X3A laptop. Samsung
introduced updated models, codenamed 900X3B, 900X3C, 900X4B, 900X4C,
which are currently not matched by udev rules. This patch includes the
newer modules in udev rules and move the samsung-n90x3a file defining
keys to a more generic samsung-series-9 file.

The patch was tested on a 900X4C laptop, and other people reported
that the rules also work for 900X3B and 900X3C ones.
2012-11-28 21:27:03 +01:00
Zbigniew Jędrzejewski-Szmek
ee7c77db55 man: add systemd-journal-gatewayd page 2012-11-25 18:04:03 +01:00
Lennart Poettering
7a529f63e6 man: document calendar timers 2012-11-24 00:24:46 +01:00
Lennart Poettering
0979f2855c build-sys: drop TARGET_UBUNTU
TARGET_UBUNTU is effectively the same as TARGET_DEBIAN. Given the Ubuntu
is unlikely to use systemd anytime soon there's no point in keeping this
separate.
2012-11-24 00:24:46 +01:00
Lennart Poettering
9a98c7a156 util: split off time related calls from util.[ch] into time-util.[ch] 2012-11-23 22:07:24 +01:00
Lennart Poettering
36697dc019 timer: implement calendar time events 2012-11-23 21:37:58 +01:00
Lennart Poettering
555d5c0cb5 build-sys: add zsh completion bits to EXTRA_DIST 2012-11-21 02:19:20 +01:00
Lennart Poettering
0428ddb729 build-sys: prepare 196 2012-11-21 01:37:11 +01:00
Lennart Poettering
f2cf0403c9 journal: document new catalog APIs 2012-11-20 22:09:09 +01:00
Tom Gundersen
e30431623a build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional.
2012-11-20 19:35:27 +01:00
Tom Gundersen
1d0b59f932 build-sys: fix sysvcompat handling in distcheck
Distcheck would fail due to sysvinit dir being set,
but not sysvrcnd dir:

 # ./configure --enable-gtk-doc --with-sysvrcd-path=/etc/rc.d
 # --with-sysvinit-path=/etc/rc.d
 # make distcheck
 ...
 configure: error: *** You need both --with-sysvinit-path=PATH and
--with-sysvrcd-path=PATH to enable SysV compatibility support, or both
empty to disable it.
make: *** [distcheck] Error 1

This also allows sysvcompat support to be disabled from distcheck.
2012-11-20 19:35:27 +01:00
Zbigniew Jędrzejewski-Szmek
1e1954f533 hwdb: revert hwdb.bin back to /etc/udev
> Kay:
udev is early boot without /var. /var is entirely taboo for udev.

This partially reverts commit ee623f0d0c
(moving hwdb.bin is reverted, but the uninstall hook and cosmetic
changes remain).
2012-11-17 01:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
ee623f0d0c hwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary database
It's not configuration, so it doesn't belong in udev.

Also, remove the catalog when uninstalling udev.
2012-11-16 23:29:56 +01:00
Zbigniew Jędrzejewski-Szmek
4ec24515da journal: use $(localstatedir)/lib/systemd/catalog for the catalog
The path doesn't change in the standard configuration.

Also, give full path to the journalctl binary in the hook,
since it might be installed outside of $PATH.

Also, add uninstall hook to remove the binary catalog.
2012-11-16 23:29:18 +01:00
Lennart Poettering
1b0fcd7411 rpm: update RPM macros to include definitions for more drop-in directories and for reloading/rebuilding configuration
More specifically this adds a number of macros that resolve to
directories for udev rules, hwdb entries, tmpfiles and sysctl.

Thsi also includes three new macros for rebuilding the hwbd/catalog
index when a package drops in new files
2012-11-16 20:07:14 +01:00
Kay Sievers
c4eb3681c7 build-sys: udev - create hwdb with make install 2012-11-16 17:58:31 +01:00
Zbigniew Jędrzejewski-Szmek
f975e76c0b build-sys: fix catalog-update-hook with older systemd
The hook would fail if preexisting journalctl doesn't support
--update-catalog. Also, the catalog would be updated before new
catalog files were installed. Both issues are fixed by moving to
INSTALL_DATA_HOOK instead of INSTALL_EXEC_HOOK, since the hook is now
executed after both journalctl and catalog files are installed.
2012-11-16 14:05:17 +01:00
Zbigniew Jędrzejewski-Szmek
e2bb347f85 build-sys: update catalog on installation 2012-11-16 11:00:49 +01:00
Anders Olofsson
f553b3b107 udev: make blkid optional
I'm building systemd for an embedded system and we would prefer not having
to include the entire util-linux package just to get a libblkid whose
functionality we don't need.
2012-11-16 01:17:18 +01:00
Lennart Poettering
d4205751d4 journal: implement message catalog
The message catalog can be used to attach short help texts to log lines,
keyed by their MESSAGE_ID= fields. This is useful to help the
administrator understand the context and cause of a message, find
possible solutions and find further related documentation.

Since this is keyed off MESSAGE_ID= this will only work for native
journal messages.

The message catalog supports i18n, and is useful to augment english
language system messages with explanations in the local language.

This commit only includes short explanatory messages for a few example
message IDs, we'll add more complete documentation for the relevant
systemd messages later on.
2012-11-15 23:09:07 +01:00
Holger Hans Peter Freyther
bb11271068 sched: Only setting CPUSchedulingPriority=rr doesn't work
A service that only sets the scheduling policy to round-robin
fails to be started. This is because the cpu_sched_priority is
initialized to 0 and is not adjusted when the policy is changed.

Clamp the cpu_sched_priority when the scheduler policy is set. Use
the current policy to validate the new priority.

Change the manual page to state that the given range only applies
to the real-time scheduling policies.

Add a testcase that verifies this change:

$ make test-sched-prio; ./test-sched-prio
[test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1
[test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0
[test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100
2012-11-15 16:16:45 +01:00
Zbigniew Jędrzejewski-Szmek
2c5417ade0 tests: add tests for config_parse_exec 2012-11-15 16:00:45 +01:00
Zbigniew Jędrzejewski-Szmek
d025f1e4dc build-sys: store journald code in a noinst library
The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.

This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638.

The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
   to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
   libsystemd-journal-internal.
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
   it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files.
2012-11-14 23:39:53 +01:00
Lennart Poettering
6e6fb527f9 shared: add API for replacing @FOO@ style variables in strings 2012-11-14 22:21:16 +01:00
Tom Gundersen
43f9cc65c2 hwdb: change pci.ids location
According to pciutils' TODO, the sourceforge location is scheduled for
removal, use the new one instead.
2012-11-09 15:36:25 +01:00
Kay Sievers
8db6dcfd3c udev: hwdb - add usb class descriptions 2012-11-09 15:02:58 +01:00
Kay Sievers
cf7ebcea78 udev: hwdb - add pci class descriptions 2012-11-09 14:29:10 +01:00
Kay Sievers
a660c63c55 udev: net_id - add builtin to retrieve data for network devices 2012-11-09 13:05:19 +01:00
Kay Sievers
87281abdf3 hwdb: OUI - use ID_OUI_FROM_DATABASE= 2012-11-09 12:39:27 +01:00
Kay Sievers
448004c340 hwdb: add IEEE OUI data 2012-11-07 14:23:05 +01:00
Kay Sievers
bd49c40537 bash-completion > shell-completion 2012-11-03 22:10:32 +01:00
Kay Sievers
b7f1542c8b shared: add timer_get_dst() 2012-11-02 00:44:23 +01:00
Lennart Poettering
669b04a492 service: drop special HTTP server target, as it is a bad idea anf Fedora specific
This was premarily intended to support the LSB facility $httpd which is
only known by Fedora, and a bad idea since it lacks any real-life
usecase.

Similar, drop support for some other old Fedora-specific facilities.

Also, document the rules for introduction of new facilities, to clarify
the situation for the future.
2012-10-31 02:55:04 +01:00
Kay Sievers
ff944daa01 udev: get rid of SYSCONFDIR 2012-10-28 04:04:22 +01:00
Lennart Poettering
6524990fdc logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
Kay Sievers
2001208c2a libudev: import hwdb and export lookup interface 2012-10-27 23:39:41 +02:00
Lennart Poettering
85210bffd8 journal: provide an API that allows client to figure out whether they need to recheck the journal manually for changes in regular intervals
Network file systems generally do not offer inotify() that would work
across the network. We hence cannot rely on inotify() exclusiely in
those case. Provide an API to determine these cases, and suggest doing
manual regular rechecks.

Note that this is not complete yet, as we need to rescan journal dirs on
network file systems explicitly to find new/removed files
2012-10-26 20:07:33 +02:00
Martin Pitt
221a6c2a26 keymap: Add HP EliteBook 8440p
Thanks to Glen Ditchfield <gjditchfield@acm.org>!

https://launchpad.net/bugs/1071579
2012-10-26 06:31:14 +02:00
Lennart Poettering
a4bcff5ba3 journal: introduce entry array chain cache
When traversing entry array chains for a bisection or for retrieving an
item by index we previously always started at the beginning of the
chain. Since we tend to look at the same chains repeatedly, let's cache
where we have been the last time, and maybe we can skip ahead with this
the next time.

This turns most bisections and index lookups from O(log(n)*log(n)) into
O(log(n)). More importantly however, we seek around on disk much less,
which is good to reduce buffer cache and seek times on rotational disks.
2012-10-26 03:24:03 +02:00
Kay Sievers
0380748b55 udev: hwdb: add acpi/pnp vendor description file 2012-10-25 21:44:23 +02:00
Kay Sievers
796b06c21b udev: add hardware database support 2012-10-23 16:43:32 +02:00
Lennart Poettering
139ee8cc31 build-sys: prepare 195 2012-10-23 00:12:33 +02:00
Kay Sievers
3c62146280 shared: move sparse-endian.h from journal 2012-10-22 18:08:48 +02:00
Kay Sievers
5b4882b6aa build-sys: fix distcheck 2012-10-22 17:20:18 +02:00
Kay Sievers
955bd501c2 shared: strbuf - add string de-duplication facility 2012-10-22 16:27:00 +02:00
Lennart Poettering
7cd28a8a2f man: add man page for localectl 2012-10-21 03:35:54 +02:00
Zbigniew Jędrzejewski-Szmek
5de0409e54 journal: add tool to extract coredumps
'systemd-coredumpctl' will list available coredumps:
   PID   UID   GID sig exe
 32452  500  500  11 /home/zbyszek/systemd/build/journalctl
 32666  500  500  11 /usr/lib64/valgrind/memcheck-amd64-linux
...

'systemd-coredumpctl dump PID' will write the coredump
to specified file or stdout.
2012-10-19 15:15:38 +00:00
Lennart Poettering
2087a7aff2 locale: add client tool localectl similar to hostnamectl/timedatectl 2012-10-19 04:55:49 +02:00
Lennart Poettering
3c1668da62 journal: add ability to list values a specified field can take in all entries of the journal
The new 'unique' API allows listing all unique field values that a field
specified by a field name can take in all entries of the journal. This
allows answering queries such as "What units logged to the journal?",
"What hosts have logged into the journal?", "Which boot IDs have logged
into the journal?".

Ultimately this allows implementation of tools similar to lastlog based
on journal data.

Note that listing these field values will not work for journal files
created with older journald, as the field values are not indexed in
older files.
2012-10-18 03:35:18 +02:00
Lennart Poettering
86b2e20a5e units: rework systemd-exit.service to terminate systemd via signal rather than bus
This should make session termination more reliable, as D-Bus doesn't
have to be around anymore for this to succeed.
2012-10-18 01:20:06 +02:00
Lennart Poettering
dbc4fbae58 hostname: add new hostnamectl tool as text client for hostnamed 2012-10-17 21:25:42 +02:00
Lennart Poettering
0ce8860a15 docs: install README files into /var/log and 7etc/rc.d/init.d
On systemd systems seasoned admins might be surprised to see that the
init scripts and log files are gone. To ease the transition let's place
some README files there, that hopefully help clearing up the situation.
2012-10-17 21:25:42 +02:00
Lennart Poettering
6d0274f115 timedatectl: introduce new command line client for timedated
Much like logind has a client in loginctl, and journald in journalctl
introduce timedatectl, to change the system time (incl. RTC), timezones
and related settings.
2012-10-17 21:25:42 +02:00
Lennart Poettering
183de6d7d9 id128: introduce new SD_ID128_CONST_STR() macro 2012-10-16 17:02:51 +02:00
Zbigniew Jędrzejewski-Szmek
e4d1062c05 build-sys: always distribute file 2012-10-13 14:54:56 +02:00
Zbigniew Jędrzejewski-Szmek
e88baee88f journald: properly update message size after stripping the identifier
Valgrind says:
==29176== Conditional jump or move depends on uninitialised value(s)
==29176==    at 0x412A85: cunescape_length_with_prefix (util.c:1565)
==29176==    by 0x40B351: dev_kmsg_record (journald-kmsg.c:301)
==29176==    by 0x40B653: server_read_dev_kmsg (journald-kmsg.c:347)
==29176==    by 0x40B701: server_flush_dev_kmsg (journald-kmsg.c:365)
==29176==    by 0x409DE7: main (journald.c:1535)
2012-10-13 14:40:32 +02:00
Kay Sievers
c0735bb218 build-sys: check - fix typo 2012-10-11 22:31:23 +02:00
Lennart Poettering
cfbc22abd0 journalctl: implement --since= and --until for filtering by time 2012-10-11 16:43:37 +02:00
Lennart Poettering
c6511e859c journal: when browsing the journal via browse.html allow clicking on entries to show their details 2012-10-10 22:41:03 +02:00
Lennart Poettering
96ede2601f detect-virt: install with fs caps by default to allow unprivileged access 2012-10-09 22:25:32 +02:00
Lennart Poettering
f9b557200b build-sys: prepare 194 2012-10-03 14:32:29 -04:00
Tom Gundersen
f51356b462 vconsole: default to the kernel compiled-in font
No longer override the default kernel font if nothing is specified in
vconsole.conf.

The default kernel font[0] provides ISO-8859-1 and box characters. Users
of Arabic, Cyrilic or Hebrew must set a different font manually as these
character sets were provided by the old default font [1], but are not
any longer.

Rationale:

 * it is counter-intuitive that an empty vconsole.conf file is different
   from adding FONT="";
 * the version of the default font shipped with Arch (which is the
   upstream one) behaves very badly during early boot[2] (which should
   admittedly be fixed in the font itself);
 * the kernel already supplies a default font, it seems reasonable to
   use that unless anything else is specified;
 * This also avoids a needless slow call to setfont; and
 * We don't want to work around problems in the kernel (in case the
   compiled-in font is not acceptable for whatever reason).

[0]: <https://dev.archlinux.org/~tomegun/kernel.bdf>
[1]: <https://dev.archlinux.org/~tomegun/latarcyrheb.bdf>
[2]: <http://i.imgur.com/J2tM4.jpg>
2012-10-03 15:42:19 +02:00
Lennart Poettering
c1165f822c audit: turn the audit fd into a static variable
As audit is pretty much just a special kind of logging we should treat
it similar, and manage the audit fd in a static variable.

This simplifies the audit fd sharing with the SELinux access checking
code quite a bit.
2012-10-02 17:40:09 -04:00
Lennart Poettering
cad45ba11e selinux: rework selinux access check logic
a) Instead of parsing the bus messages inside of selinux-access.c
simply pass everything pre-parsed in the functions

b) implement the access checking with a macro that resolves to nothing
on non-selinux builds

c) split out the selinux checks into their own sources
selinux-util.[ch]

d) this unifies the job creation code behind the D-Bus calls
Manager.StartUnit() and Unit.Start().
2012-10-02 17:07:00 -04:00
Lennart Poettering
597c52cfed build-sys: prepare 193 2012-09-28 01:34:38 +02:00
Lennart Poettering
7b17a7d72f journal: add minimal journal gateway daemon based on GNU libmicrohttpd
This minimal HTTP server can serve journal data via HTTP. Its primary
purpose is synchronization of journal data across the network. It serves
journal data in three formats:

       text/plain: the text format known from /var/log/messages
       application/json: the journal entries formatted as JSON
       application/vnd.fdo.journal: the binary export format of the journal

The HTTP server also serves a small HTML5 app that makes use of the JSON
serialization to present the journal data to the user.

Examples:

This downloads the journal in text format:

 # systemctl start systemd-journal-gatewayd.service
 # wget http://localhost:19531/entries

Same for JSON:

 # curl -H"Accept: application/json" http://localhost:19531/entries

Access via web browser:

 $ firefox http://localhost:19531/
2012-09-28 00:55:24 +02:00
Lennart Poettering
075d4ecb40 build-sys: prepare release 192 2012-09-25 22:23:57 +02:00
Lennart Poettering
8e41de0d2c Revert "comment out uncommitted test source code"
This reverts commit b8bc868009.

Added the test file now.
2012-09-24 10:19:23 +02:00
Kay Sievers
b8bc868009 comment out uncommitted test source code 2012-09-23 14:31:53 +02:00
Lennart Poettering
b6a867398d build-sys: prepare release 191 2012-09-21 23:37:06 +02:00
Lennart Poettering
f801968466 journal: completely rework the mmap cache as I too dumb to actually understand it
Instead of doing hand optimized fd bisect arrays just use plain old
hashmaps. Now I can understand my own code again. Yay!

As a side effect this should fix some bad memory accesses caused by
accesses after mmap(), introduced in 189.
2012-09-21 20:52:23 +02:00
Lennart Poettering
aaeef05886 multi-seat-x: drop a lot of unnecessary code 2012-09-21 17:03:40 +02:00
Lennart Poettering
ec29187225 Revert "multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics on its own now"
This reverts commit 636d30a089.

Turns out we will need the multi-seat wrapper a bit longer, however
without the fb-specific bits in it.
2012-09-21 15:51:04 +02:00
Lennart Poettering
636d30a089 multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics on its own now 2012-09-21 12:46:22 +02:00
Lennart Poettering
0c11f949db build-sys: prepare v190 2012-09-20 18:54:20 +02:00
Lennart Poettering
41f9172f42 unit: split unit_printf() and friends into its own .c file 2012-09-18 11:27:56 +02:00
Lennart Poettering
c309067483 selinux: use existing library calls for audit data 2012-09-18 01:55:49 +02:00
Daniel J Walsh
e2417e4143 selinux: add bus service access control
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch adds the ability to look at the calling process that is trying to
do dbus calls into systemd, then it checks with the SELinux policy to see if
the calling process is allowed to do the activity.

The basic idea is we want to allow NetworkManager_t to be able to start and
stop ntpd.service, but not necessarly mysqld.service.

Similarly we want to allow a root admin webadm_t that can only manage the
apache environment.  systemctl enable httpd.service, systemctl disable
iptables.service bad.

To make this code cleaner, we really need to refactor the dbus-manager.c code.
 This has just become a huge if-then-else blob, which makes doing the correct
check difficult.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBJBi8ACgkQrlYvE4MpobOzTwCdEUikbvRWUCwOb83KlVF0Nuy5
lRAAnjZZNuc19Z+aNxm3k3nwD4p/JYco
=yops
-----END PGP SIGNATURE-----
2012-09-18 01:21:17 +02:00
Kay Sievers
0bb91b5010 udev: add btrfs support
All "btrfs" file systems will be registered with the kernel when they
show up.

Incomplete multi-device volumes will set SYSTEMD_READY=0, to prevent
access until the volume is complete and fully registered.
2012-09-17 13:54:03 +02:00
Zbigniew Jędrzejewski-Szmek
f6c2e28b07 directive-index: journal directives 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek
ffafe91b5a directive-index: system manager directives 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek
e1abd3efab directive-index: add UDEV fields 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek
d9cfd69403 man: generate an index of directives
Systemd has a large (and growing) number of manpages. Sometimes it's
not immediately obvious, where to look for a directive. Especially,
when something is described in more than one place. Making sense of
all the settings should be easier with an index.
2012-09-17 12:42:22 +02:00
Shawn Landden
608da9e9b5 man: remove timezone(5) and add localtime(5) 2012-09-14 19:27:59 +02:00
Lennart Poettering
a1d41e17a5 rpm: expose preset dir as rpm macro and in systemd.pc 2012-09-13 22:17:46 +02:00
Lennart Poettering
ff89a42a86 python: make gcc shut up 2012-09-13 19:34:09 +02:00
Lennart Poettering
0aee68ad02 python: reindent to follow coding style 2012-09-13 04:16:10 +02:00
Lennart Poettering
8d7e170a52 python: integrate David Strauss' python-systemd package 2012-09-13 04:01:18 +02:00
Dave Reisner
b51fc639f0 build-sys: perform autodetection of quota-tools binaries
Use AC_PATH_PROG to try and locate the quotaon and quotacheck binaries,
falling back on hardcoded defaults when they can't be found.
2012-09-11 01:43:48 +02:00
Lennart Poettering
b5b46d5995 when determining unit file list, include invalid unit names in an "invalid" state 2012-09-11 01:14:25 +02:00
Lennart Poettering
54aa25e63c build-sys: add libsystemd-id128-internal.la as dep to libsystemd-core.la
condition.c makes use of sd_id128_get_machine() after all.

Spotted by Khem Raj.
2012-09-10 09:28:42 +02:00
Lennart Poettering
a1a03e3075 journal: add call to determine current journal file disk usage 2012-09-07 23:20:28 +02:00
Lennart Poettering
cb7ed9dfca tmpfiles: don't attempt creation of device nodes when we run in a container 2012-09-05 23:42:05 -07:00
Lennart Poettering
ddffe89246 journal: don't pull in flush service from journald service
In the initrd we don't need the flush service hence don't attempt to
pull it in.
2012-09-03 18:59:05 -07:00
Lennart Poettering
877d54e9b0 journal: generate structured journal messages for a number of events 2012-09-03 18:59:04 -07:00
Zbigniew Jędrzejewski-Szmek
fe1fed02c7 build-sys: xsltproc is required for man pages and gtk-doc 2012-08-25 02:01:44 +02:00
Lennart Poettering
38a60d7112 build-sys: prepare release 189 2012-08-23 02:46:22 +02:00
Lennart Poettering
d2bd7630d7 journal: the ratelimiter is part of journald 2012-08-22 03:43:45 +02:00
Lennart Poettering
0153028ae3 journald: split off native protocol support into its own .c file 2012-08-22 03:42:23 +02:00
Lennart Poettering
3b7124a8db journald: split console transport stuff into its own file 2012-08-22 03:36:29 +02:00
Lennart Poettering
a45b9fca6b journald: move stream protocol into its own .c file 2012-08-22 03:32:41 +02:00
Lennart Poettering
35e2e347d3 journald: splitt of syslog protocol support into its own file 2012-08-22 03:21:03 +02:00
Lennart Poettering
ef63833d53 journald: split /dev/kmsg related stuff into its own .c file 2012-08-22 03:09:44 +02:00
Lennart Poettering
bdfb9e7f7c journald: augment journal entries from the kernel with data from udev 2012-08-22 02:49:17 +02:00
Lennart Poettering
2cfa886eb1 build-sys: fix ntp-units.d path creation
Spotted by Dave Reisner
2012-08-21 16:40:19 +02:00
Lennart Poettering
f6a971bc0b journalctl: output FSS key as QR code on generating 2012-08-20 22:02:19 +02:00
Lennart Poettering
feb12d3ed2 journal: make libgcrypt dependency optional 2012-08-20 16:51:46 +02:00
Kay Sievers
45b51b6b71 keymap: fix map name reference 2012-08-16 21:00:06 +02:00
Lennart Poettering
f5028bfaf0 journal: journal-send.h doesn't actually exist 2012-08-16 17:19:47 +02:00
Lennart Poettering
0284adc6a6 journal: split up journal-file.c 2012-08-16 17:10:57 +02:00
Lennart Poettering
beec008561 journal: implement basic journal file verification logic 2012-08-16 17:10:57 +02:00
Lennart Poettering
16e9f408fa journal: implement generic sharable mmap caching logic
instead of having one simple per-file cache implement an more
comprehensive one that works for multiple files and can actually
maintain multiple maps per file and per object type.
2012-08-16 17:10:56 +02:00
Lennart Poettering
7560fffcd2 journald: initial version of FSPRG hookup
This adds forward-secure authentication of journal files. This patch
includes key generation as well as tagging of journal files,
Verification of journal files will be added in a later patch.
2012-08-13 20:31:10 +02:00
Kay Sievers
dbf61afb29 udev: export udev_device_new_from_device_id() 2012-08-10 19:56:57 +02:00
Huang Hang
af18d7ca4b build-sys: use more generic regular expression to generate syscall-list.txt correctly
Currently MIPS and ARM define syscall numbers for multiple ABI in one
<asm/unistd.h>. The #define statments for each syscall are formated as:

 #define __NR_scname (BASE_OFFSET + sc_number)

Thus we need a more generic regular expression to match these in awk.
2012-08-09 12:21:04 +02:00
Lennart Poettering
c269cec334 build-sys: prepare release 188 2012-08-08 21:49:01 +02:00
Peter Alfredsen
276c54e799 build-sys: add CFLAGS to CPP calls
It changes the defines WORDSIZE and __I386, CFLAGS=-m32.
2012-08-08 21:33:42 +02:00
Kay Sievers
81311bbd12 build-sys: link internal selinux lib to systemd-remount-fs 2012-08-08 12:29:54 +02:00
Lennart Poettering
3984d657ff build-sys: typo fix 2012-08-08 12:27:10 +02:00
Lennart Poettering
5a45a93627 build-sys: enable a couple of security features
Most distributions enable these downstream anyway, but it probably makes
sense to enable them unconditionally upstream too.
2012-08-08 12:03:34 +02:00
Lennart Poettering
b2c9cbafb8 units: remove prefdm
It's time to get rid of prefdm. Distributions which still want to use
this should maintain this downstream, but it's probably better to just
provide proper units for the various display managers, like Fedora is
doing this, for example:

https://fedoraproject.org/wiki/Features/DisplayManagerRework
2012-08-07 17:08:31 +02:00
Simon Peeters
f9a3b83bf4 build-sys: do not link systemctl against journal-internal and id128-internal
systemctl does not need the internal journal and id128 libraries to
function, so don't link against them.
2012-08-03 18:20:09 +02:00
Lennart Poettering
18c7ed186b journal: add sd_journal_perror() to API 2012-08-01 19:53:23 +02:00
Zbigniew Jędrzejewski-Szmek
cd8654b13e build-sys: fix path to src/gudev/gudevenumtypes.h
This file is generated, so it should be referred to as
$(top_builddir)/src/gudev/gudevenumtypes.h. It could only appear in
$(top_srcdir) as a result of previous build in $(top_srcdir). Better
to just let automake add the prefix for us, so there's no need to
spell it out.

Remove the prefix from other source files too, $(top_srcdir) is the
default anyway.
2012-07-31 00:28:46 +02:00
Zbigniew Jędrzejewski-Szmek
bd923ff29e build-sys: always create the output directory first
$(MKDIR_P) is added where missing, and rules are standardized on one
form of $(MKDIR_P), to make it easier to spot when it is missing.
Single line $(MKDIR)&&command form is broken into two line form.

https://bugs.freedesktop.org/show_bug.cgi?id=49459

For compilation in a separate build directory to work, when a file is
generated, the rule must include an explicit mkdir first, unless the
file is created at the top level. Even when building in a separate
build-dir, automake would normally create all directories as a side
result of creating the dependencies files. Therefore the bug was only
visible with -C (turning off dependency generation).
2012-07-31 00:27:56 +02:00
Lennart Poettering
bad1837c18 Revert "man: ship systemd-udevd as the real manpage"
We want to keep things uniform, and hence treat udevd's man page like
any other in the repo. What matters is how users primarily interface
with a service, and that is not the binary path in /usr/lib/systemd but
the service name.

This reverts commit 6c1f3ba54a.
2012-07-29 11:58:41 +02:00
Dave Reisner
6c1f3ba54a man: ship systemd-udevd as the real manpage
Instead of making systemd-udevd a so-link to systemd-udevd.service,
ship the real page as systemd-udevd to integrate better with distros
where udevd might be run standalone.
2012-07-28 22:35:41 +02:00
Bryan Kadzban
299031ca8b build-sys: always populate EXTRA_DIST
"make dist" can build a different tarball depending on the flags passed
to ./configure and the (optional) dependencies found on the system.
Move all append-to-EXTRA_DIST operations out of automake conditionals to
fix this.

Introduce a polkitpolicy_files so that the policy files built still
correctly depend on the automake conditionals, but the .in files that
get distributed do not.
2012-07-28 22:35:26 +02:00
Peeters Simon
b5dd874dda build-sys: use correct cpp
this solves issues where $(CPP) has differend include paths than 'cpp'
2012-07-26 16:04:52 +02:00
Michal Schmidt
c37046cd3c build-sys: create ntp-units.d dropin directories on install 2012-07-26 07:47:12 +02:00
Kay Sievers
9bd4457cfa build-sys: man - add missing dependency 2012-07-23 01:58:24 +02:00
Zbigniew Jędrzejewski-Szmek
bf7410e4a7 build-sys: distribute a few more man pages 2012-07-22 23:34:31 +02:00
Zbigniew Jędrzejewski-Szmek
a804b788a8 build-sys: fix (again) index generation in subdir
make-man-index.py doesn't care about .html files, only .xml files, so
the source list was wrong. Also, $(XML_FILES) are specified without
prefix, so compilation in sepearate build-dir was broken:

  GEN    man/index.html
Traceback (most recent call last):
  File "../make-man-index.py", line 24, in <module>
    t = parse(p)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1183, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
    source = open(source, "rb")
IOError: [Errno 2] No such file or directory: 'man/systemd.xml'
2012-07-21 07:55:36 +02:00
Lennart Poettering
3fd8953688 build-sys: bump revision of libudev too 2012-07-20 00:40:32 +02:00
Lennart Poettering
c4f1b86299 build-sys: prepare 187 2012-07-20 00:38:02 +02:00
Lennart Poettering
4819ff0358 unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
Kay Sievers
1d57af45cf build-sys: fix variable assignment 2012-07-19 23:07:23 +02:00
Lennart Poettering
57fb9fb56d nspawn: introduce new --link-journal= switch to link container journals into host 2012-07-19 02:02:39 +02:00
Zbigniew Jędrzejewski-Szmek
e5e25a6857 build-sys: put all BUILT_SOURCES in CLEANFILES
Since currently all items in BUILT_SOURCES are also in CLEANFILES,
we can reduce clutter by appending BUILT_SOURCES directly.
2012-07-18 01:36:39 +02:00
Zbigniew Jędrzejewski-Szmek
96bd03d5b8 build-sys: use .DELETE_ON_ERROR
All instances of "|| rm $@" are replaced with .DELETE_ON_ERROR, which
has a similar effect. One difference is that the return code is not
masked by rm return code.

.DELETE_ON_ERROR is GNU-Make specific, but -Wno-portability is already
defined, and it's unlikely that anyone would build systemd with a
shell not supporting .DELETE_ON_ERROR. If they did, then
.DELETE_ON_ERROR would be silently ignored, i.e. in the worst case a
garbage file wouldn't be deleted, which is not very serious.
2012-07-18 01:30:01 +02:00
Kay Sievers
ecca17f6ee man: html - cross-ref man page references and add Index link 2012-07-17 23:04:48 +02:00
Harald Hoyer
e4d9640961 Makefile.am: fixed dependencies for man/index.html 2012-07-17 20:45:20 +02:00
Harald Hoyer
b694b00b45 Makefile.am: MKDIR_P man for man/index.html 2012-07-17 16:42:42 +02:00
Kay Sievers
95769b329e build-sys: distcheck - add seccomp*.h to SOURCES 2012-07-17 16:04:58 +02:00
Lennart Poettering
bc76549dd6 build-sys: use C preprocessor for key list, too 2012-07-17 15:55:53 +02:00
Zbigniew Jędrzejewski-Szmek
cc9f61b815 build-sys: automake needs to know about generated files
CC     src/core/libsystemd_core_la-syscall-list.lo
src/core/syscall-list.c:31:29: fatal error: syscall-to-name.h: No such file or directory
2012-07-17 12:22:16 +02:00
Lennart Poettering
8351ceaea9 execute: support syscall filtering using seccomp filters 2012-07-17 04:17:53 +02:00
Lennart Poettering
6fa9a61092 build-sys: make building of index.html fail sensibly 2012-07-16 19:10:57 +02:00
Lennart Poettering
9c4fa6ed10 min: generate an index page for all man pages
This makes use of python, if it is available
2012-07-16 17:19:39 +02:00
Kay Sievers
4cb72937d3 udev: get rid of TEST_PREFIX and use unshare() to fake /sys, /dev, /run 2012-07-15 22:10:46 +02:00
Kay Sievers
216e2aded6 build-sys: fix "make distcheck" 2012-07-15 15:48:26 +02:00
Lennart Poettering
95694951a0 build-sys: fix build 2012-07-13 23:38:32 +02:00
Lennart Poettering
976c46f84f man: add man page aliases for all macros/types too 2012-07-13 23:10:23 +02:00
Lennart Poettering
a4023a43d0 man: Split sd_randomize(3) from sd_id128_get_{machine,boot}(3)
They have too little to do with each other...
2012-07-13 22:55:52 +02:00
Lennart Poettering
9a1d541663 build-sys: don't install sd-readahead.h as include file, but as documentation
sd-readahead.h is supposed to be a drop-in API, nothing people should
ever link to or could make use without also adding sd-readahead.c to
their sources. Hence, don't install this header file into INCLUDES, but
instead install it as DOCS.
2012-07-13 22:47:46 +02:00
Lennart Poettering
639a6a2529 man: document sd_journal_seek_head() 2012-07-13 22:39:02 +02:00
Lennart Poettering
f4e761c4fc man: document sd_journal_add_match() 2012-07-13 22:18:17 +02:00
Lennart Poettering
e362b3725a man: suppress man page dates/authors in generated pages 2012-07-13 21:54:03 +02:00
Lennart Poettering
24fb2ddc12 build-sys: clean man pages when building them 2012-07-13 21:53:44 +02:00
Lennart Poettering
6ca9571edd man: document sd_journal_get_fd() 2012-07-13 21:03:58 +02:00
Lennart Poettering
4a010f4e6e man: document sd_journal_get_cursor() 2012-07-13 20:39:05 +02:00
Lennart Poettering
b59866aefa man: document sd_journal_get_cutoff_realtime_usec() 2012-07-13 20:17:37 +02:00