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. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
ee104e11e303499a637c5cd8157bd12ad5cc116d |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
user-util: move UID/GID related macros from macro.h to user-util.h |
a09561746f15b84da9471b5c4be74e53d19e4f3f |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: introduce dirent-util.[ch] for directory entry calls
Also, move a couple of more path-related functions to path-util.c. |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-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. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
b3a7ba896851708cce0e5026a814007fbb11b4cd |
|
07-Sep-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
tests: Skip test-cgroup-util test_mask_supported() when not running under systemd
Commit 5f4c5fef6 introduced this new test case, but this does not work in
build chroots where cgroupfs is not mounted. So skip the test if systemd is not
running. |
5f4c5fef66581383ee852b301db67f687663004c |
|
04-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgroup: always read the supported controllers from the root cgroup of the local container
Otherwise we might end up thinking that we support more controllers than
actually enabled for the container we are running in. |
185a08745957cbd32e8293daf8c51ab9c995a71e |
|
02-Jun-2015 |
Dimitri John Ledkov <dimitri.j.ledkov@intel.com> |
shared: Drop 'name=' prefix from SYSTEMD_CGROUP_CONTROLLER define.
In cgtop,mount-setup,nspawn the name= prefix is hard-coded in the
mount options, and the define is not used.
Everywhere else, we explicitly white-list allow 'name=' prefix to be
used with all controllers, and strip it out to 'normalise' the
controller name. That work is mostly inflicted on us due to 'name='
prefix in the define. Dropping this prefix makes everything more sane
overall. |
e66e5b612a9e5921d79a6aedab4983e33dff8cb1 |
|
06-May-2015 |
Lennart Poettering <lennart@poettering.net> |
cgroup-util: be more strict when processing slice unit names |
c96cc5822c165e86be78ed96dac6573986032fab |
|
30-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
core: catch some special cases in cg_slice_to_path() |
329ac4bc5429cd86c4ac76b13e7e2784f3982760 |
|
30-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus,sd-login: add api for querying the slice within the the user systemd instance of a process
units are organized in slice trees, not only for the system instance,
but also for user systemd instances, expose this properly. |
8b0849e9710d721c5d0b775aaf0fd662eefa1449 |
|
30-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rework cgroup path parse logic
Various cleanups, be stricter when parsing unit paths.
Most importantly: return the root slice "-.slice" when asked for slice
of paths that contain no slice component. |
cfeaa44a09756a93a881f786678973d9b1e382db |
|
29-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: properly handle creds that are known but undefined for a process
A number of fields do not apply to all processes, including: there a
processes without a controlling tty, without parent process, without
service, user services or session. To distuingish these cases from the
case where we simply don't have the data, always return ENXIO for them,
while returning ENODATA for the case where we really lack the
information.
Also update the credentials dumping code to show this properly. Fields
that are known but do not apply are now shown as "n/a".
Note that this also changes some of the calls in process-util.c and
cgroup-util.c to return ENXIO for these cases. |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
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. |
320814811417146cfa1e416f69f1101eed630c36 |
|
04-Feb-2015 |
Luke Shumaker <lukeshu@sbcglobal.net> |
cg_path_get_user_unit(): Did not correctly parse user-unit templates.
It ran either skip_session() or skip_user_manager(), then ran skip_slices()
iff skip_session() ran. It needs to run skip_slices() in either case.
Included is a test case demonstrating why. |
fed1e721fd0c81e60c77120539f34e16c2585634 |
|
28-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1 |
a13ee4c792cb5738c3dd13b2a4bb1a828e7994fd |
|
30-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
cgroup-util: shorten cg_path_get_session |
de0671ee7fe465e108f62dcbbbe9366f81dd9e9a |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove unnecessary casts in printfs
No functional change expected :) |
dd513a5dbfa0d5f97084c7c8e475530a03cfd973 |
|
12-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
test: fix "make check"
Let's remove the tests for cg_path_get_machine_name(), since they no
longer operate solely on the cgroup path, but actually look up data in
/run. Since we have a test for cg_pid_get_machine_name() this shouldn't
be too much of a loss. |
751bc6ac79320bc16e63e8c1bbb713c30a3b7bc9 |
|
24-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: properly shift cgroup data returned from kdbus by the container's root before parsing |
d4fffc4b8beb86e77fd710c1f43913a490ed083a |
|
23-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix extraction of _SYSTEMD_USER_UNIT
Units from user services underneath user@.service would not be detected
properly. |
e9174f29c7e3ee45137537b126458718913a3ec5 |
|
11-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: cache cgroup root path, instead of querying it on every incoming log message |
e13bb5d2b133f9ae51c0a2d20aa51071c780e9ae |
|
08-Dec-2013 |
Kay Sievers <kay@vrfy.org> |
test: cgroup-util - do not fail if cpu controller is not available |
143bfdaf0b890fa7acadf02d1eafacaef1b696bd |
|
22-Aug-2013 |
Holger Hans Peter Freyther <holger@moiji-mobile.com> |
test: Make testing work on systems without or old systemd
* Introduce a macro to conditionally execute tests. This avoids
skipping the entire test if some parts require systemd
* Skip the journal tests when no /etc/machine-id is present
* Change test-catalog to load the catalog from the source directory
of systemd.
* /proc/PID/comm got introduced in v2.6.33 but travis is still
using v2.6.32.
* Enable make check and make distcheck on the travis build
* Use -D"CATALOG_DIR=STR($(abs_top_srcdir)/catalog)" as a STRINGIY
would result in the path '/home/ich/source/linux' to be expanded
to '/home/ich/source/1' as linux is defined to 1. |
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61 |
|
11-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
cgroup: simplify how instantiated units are mapped to cgroups
Previously for an instantiated unit foo@bar.service we created a cgroup
foo@.service/foo@bar.service, in order to place all instances of the
same template inside the same subtree. As we now implicitly add all
instantiated units into one per-template slice we don't need this
complexity anymore, and instance units can map directly to the cgroups
of their full name. |
374ec6abf31ada6ca554cc8ea99b282373fac010 |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
libsystemd-logind: fix detection of session/user/machine of a PID |
1021b21bc6f8dd522b46116e8598b17f9f93f1b7 |
|
21-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
login: add an api to determine the slice a PID is located in to libsystemd-login |
9444b1f20e311f073864d81e913bd4f32fe95cfd |
|
20-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
than fixed croup locations.
- logind can now collect minimal information about running
VMs/containers. As fixed cgroup locations can no longer be used we
need an entity that keeps track of machine cgroups in whatever slice
they might be located. Since logind already keeps track of users,
sessions and seats this is a trivial addition.
- nspawn will now register with logind and pass various bits of metadata
along. A new option "--slice=" has been added to place the container
in a specific slice.
- loginctl gained commands to list, introspect and terminate machines.
- user.slice and machine.slice will now be pulled in by logind.service,
since only logind.service requires this slice. |
a016b9228f338cb9b380ce7e00826ef462767d98 |
|
17-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.
Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.
Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree. |
a0ab566574303be1ca12cdb334f284cfd407caa5 |
|
03-May-2013 |
Lennart Poettering <lennart@poettering.net> |
cgroup: when escaping a cgroup object name, also escape names that start with a dot |
38158b920e772ea3a7cc9dfcf705666ce3aa5ce3 |
|
01-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
cgls: add --machine/-M
cg_get_machine_path is modified to include the escaped machine name
+ ".nspawn" if the machine argument is nonnull. |
78edb35ab4f4227485cb9ec816b43c37e0d5e62a |
|
25-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
cgroup: always validate cgroup controller names
Let's better be safe than sorry. |
ae018d9bc900d6355dea4af05119b49c67945184 |
|
23-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
cgroup: make sure all our cgroup objects have a suffix and are properly escaped
Session objects will now get the .session suffix, user objects the .user
suffix, nspawn containers the .nspawn suffix.
This also changes the user cgroups to be named after the numeric UID
rather than the username, since this allows us the parse these paths
standalone without requiring access to the cgroup file system.
This also changes the mapping of instanced units to cgroups. Instead of
mapping foo@bar.service to the cgroup path /user/foo@.service/bar we
will now map it to /user/foo@.service/foo@bar.service, in order to
ensure that all our objects are properly suffixed in the tree. |
aff38e74bd776471f15ba54b305a24b0251eb865 |
|
23-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
nspawn: suffix the nspawn cgroups with ".nspawn"
As discussed with Dan Berrange it's a good idea to suffix all objects in
the cgroup tree with ".something", so that when the system is
partitioned using a resource management tool we can drop objects of
different types into the same partition directory without generate
namespace conflicts.
We'l add this to the Pax Control Group document as soon as write access
to the fdo wiki is restored. |
7027ff61a34a12487712b382a061c654acc3a679 |
|
16-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
nspawn: introduce the new /machine/ tree in the cgroup tree and move containers there
Containers will now carry a label (normally derived from the root
directory name, but configurable by the user), and the container's root
cgroup is /machine/<label>. This label is called "machine name", and can
cover both containers and VMs (as soon as libvirt also makes use of
/machine/).
libsystemd-login can be used to query the machine name from a process.
This patch also includes numerous clean-ups for the cgroup code. |
6c03089c32c251d823173bda4d809a9e643219f0 |
|
15-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: handle env vars safely
Make sure that our library is safe for usage in SUID programs when it
comes to env var handling |
96cde13ace6406582688028f3df5668a172ba628 |
|
18-Jan-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core/cgroup-util: simplify functions and add tests |