summaryrefslogtreecommitdiffstats
path: root/src/shared/apparmor-util.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-11-17tree-wide: group include of libudev.h with sd-*Thomas Hindoe Paaboel Andersen24-23/+38
2015-11-17Some additions to NEWSLennart Poettering1-11/+45
2015-11-17tests: copy /etc/pam.d/systemd-user from the host on Debian, UbuntuEvgeny Vereshchagin1-0/+3
Fixes: systemd-testsuite systemd[34]: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth systemd-testsuite systemd[34]: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth systemd-testsuite systemd[34]: user@0.service: Failed at step PAM spawning /lib/systemd/systemd: Operation not permitted ... on Debian, Ubuntu
2015-11-17siphash: minor coding style fixes and modernizationsLennart Poettering2-48/+57
Only cosmetics really, doesn't change any actual logic.
2015-11-17siphash: fix another alignment issueLennart Poettering1-2/+2
2015-11-17tree-wide: make macros for converting fds to pointers and back generic and ↵Lennart Poettering6-23/+22
use them everywhere
2015-11-17remount-fs: modernize coding style a bitLennart Poettering1-36/+26
a) Use _cleanup_ where it makes sense b) Uniformly use negative errno-style errors internally, convert to EXIT_FAILURE/EXIT_SUCCESS only when actually exiting. c) Use log_oom() where appropriate d) Fix minor memory leak in hashmap addition error path. e) Don't pretend we could continue sensibly on OOM or fork() failure f) Use PR_SET_PDEATHSIG to make sure clients we don't kill on error are cleaned up. g) Make use of STRV_MAKE() where it's pretty to do so. h) Simplify error paths.
2015-11-17sd-ipv4ll: fix error path if sd-ipv4acd allocation failsLennart Poettering1-2/+2
Let's make sure the destructor cannot hit the n_ref == 0 case.
2015-11-17journald: trivial simplificationLennart Poettering1-2/+1
2015-11-17coredump: modernize error logging a bitLennart Poettering1-7/+4
2015-11-17core: don't generate warnings when write access to the cgroup fs fails in ↵Lennart Poettering1-12/+12
--user due to EACCES After all, in the classic hierarchy that's pretty much the default case.
2015-11-17tree-wide: use right cast macros for UIDs, GIDs and PIDsLennart Poettering10-30/+33
2015-11-16siphash24: let siphash24_finalize() and siphash24() return the result directlyDaniel Mack14-27/+27
Rather than passing a pointer to return the result, return it directly from the function calls. Also, return the result in native endianess, and let the callers care about the conversion. For hash tables and bloom filters, we don't care, but in order to keep MAC addresses and DHCP client IDs stable, we explicitly convert to LE.
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen205-352/+334
Sort the includes accoding to the new coding style.
2015-11-16tree-wide: add missing includesThomas Hindoe Paaboel Andersen2-0/+3
Add a few includes that we rely on to be include already.
2015-11-16siphash42: add tests with unaligned input pointersMartin Pitt1-11/+26
Add test case for calling siphash24 with unaligned input pointers, as we commonly get with calling it on the result on basename() or similar. This provides a test for PR #1916, rescued from the superseded PR #1911. Thanks to Steve Langasek for the test!
2015-11-16login: ignore JobRemoved of old jobsDavid Herrmann1-6/+5
If we requeue jobs, we are no longer interested in old jobs. Hence, we better ignore any JobRemoved signals for old jobs and concentrate on our replacements.
2015-11-16login: make sure to replace existing unitsDavid Herrmann1-1/+1
When queuing unit jobs, we should rather replace existing units than fail. This is especially important when we queued a user-shutdown and a new login is encountered. In this case, we better raplce the shutdown jobs. systemd takes care of everything else.
2015-11-16login: fix re-use of usersDavid Herrmann1-13/+30
If the last reference to a user is released, we queue stop-jobs for the user-service and slice. Only once those are finished, we drop the user-object. However, if a new session is opened before the user object is fully dropped, we currently incorrectly re-use the object. This has the effect, that we get stale sessions without a valid "systemd --user" instance. Fix this by properly allowing user_start() to be called, even if user->stopping is true.
2015-11-16login: group static fields in "struct User"David Herrmann1-4/+1
Make sure to put static fields together in "struct User". This makes it easier to figure out the lifetime of each field.
2015-11-16login: make user->service staticDavid Herrmann1-32/+20
Just like user->slice, there is no reason to store the unit name in /run, nor should we allocate it dynamically on job instantiation/removal. Just keep it statically around at all times and rely on user->started || user->stopping to figure out whether the unit exists or not.
2015-11-16login: make user_new() and user_free() follow coding-styleDavid Herrmann3-49/+48
Few changes to user_new() and user_free(): - Use _cleanup_(user_freep) in constructor - return 'int' from user_new() - make user_free() deal with partially initialized objects - keep reverse-order in user_free() compared to user_new() - make user_free() return NULL - make user_free() accept NULL as no-op
2015-11-16login: keep user->slice constantDavid Herrmann1-56/+39
Currently, we allocate user->slice when starting a slice, but we never release it. This is incompatible if we want to re-use a user object once it was stopped. Hence, make sure user->slice is allocated statically on the user object and use "u->started || u->stopping" as an indication whether the slice is actually available on pid1 or not.
2015-11-16login: simply XDG_RUNTIME_DIR managementDavid Herrmann2-46/+24
Lets not pretend we support changing XDG_RUNTIME_DIR via logind state files. There is no reason to ever write the string into /run, as we allocate it statically based on the UID, anyway. Lets stop that and just allocate the runtime_path in "struct User" at all times. We keep writing it into the /run state to make sure pam_systemd of previous installs can still read it. However, pam_systemd is now fixed to allocate it statically as well, so we can safely remove that some time in the future. Last but not least: If software depends on systemd, they're more than free to assume /run/user/$uid is their runtime dir. Lets not require sane applications to query the environment to get their runtime dir. As long as applications know their login-UID, they should be safe to deduce the runtime dir.
2015-11-16tmpfiles: create subvolumes for "v", "q", and "Q" only if / is a subvolumeLennart Poettering4-13/+49
It's not a good idea to create subvolumes for parts of the OS tree (such as /home, or /var) if the root directory is not a subvolume too. We shouldn't assume control of "heavier" objects such as subvolumes, if the originating object (the root directory) is a "light-weight" object, i.e. a plain directory. Effectively this means that chroot() environments that are run on a plain directory do not have to deal with problems around systemd creating subvolumes that cannot be removed with a simple "rm" anymore. However, if the chroot manager creates a proper subvolume for such an environment it will also get further subvolumes placed in there, under the assumption that the manager understands the concept of subvolumes in that case.
2015-11-16siphash24: change result argument to uint64_tMartin Pitt17-37/+39
Change the "out" parameter from uint8_t[8] to uint64_t. On architectures which enforce pointer alignment this fixes crashes when we previously cast an unaligned array to uint64_t*, and on others this should at least improve performance as the compiler now aligns these properly. This also simplifies the code in most cases by getting rid of typecasts. The only place which we can't change is struct duid's en.id, as that is _packed_ and public API, so we can't enforce alignment of the "id" field and have to use memcpy instead.
2015-11-16siphash24: fix memory alignmentDaniel Mack1-1/+2
Use unaligned_read_le64() to access input buffer when reading complete 64-bit words. This should fix memory traps on platforms with strict aliasing.
2015-11-16basic: add unaligned macros for little endianDaniel Mack2-1/+120
Also add test code for that.
2015-11-16TODO: sortDavid Herrmann1-226/+171
2015-11-16virt: sort #includes alphabeticallyMartin Pitt1-2/+2
nitpick from PR #1910
2015-11-16nspawn: set TasksMax= for containers to 8192 by defaultLennart Poettering2-0/+5
2015-11-16logind: change default to UserTasksMax= to 4096Lennart Poettering3-3/+3
2015-11-16core: enable TasksMax= for all services by default, and set it to 512Lennart Poettering5-7/+20
Also, enable TasksAccounting= for all services by default, too. See: http://lists.freedesktop.org/archives/systemd-devel/2015-November/035006.html
2015-11-16virt: add missing #includesMartin Pitt1-0/+2
src/basic/virt.c: In function 'detect_vm_device_tree': src/basic/virt.c:117:17: error: unknown type name '_cleanup_closedir_' _cleanup_closedir_ DIR *dir = NULL; src/basic/virt.c:128:17: error: implicit declaration of function 'FOREACH_DIRENT' [-Werror=implicit-function-declaration] FOREACH_DIRENT(dent, dir, return -errno)
2015-11-16tests: intsall /etc/login.defsEvgeny Vereshchagin1-0/+1
Fixes: systemd-testsuite login[31]: cannot open login definitions /etc/login.defs [No such file or directory] systemd-testsuite systemd[1]: Received SIGCHLD from PID 31 (login). systemd-testsuite systemd[1]: Child 31 (login) died (code=exited, status=1/FAILURE) systemd-testsuite systemd[1]: console-getty.service: Child 31 belongs to console-getty.service systemd-testsuite systemd[1]: console-getty.service: Main process exited, code=exited, status=1/FAILURE systemd-testsuite systemd[1]: console-getty.service: Changed running -> dead on Debian/Ubuntu Useful on other distros
2015-11-16Move daemon-reload from package %post scripts to file triggersZbigniew Jędrzejewski-Szmek4-10/+34
This uses new functionality added in rpm 4.13. Instead of doing one daemon-reload per packages, we do just one or two (When both installing and uninstalling packages, we do two. Unfortunately this also includes the common case of upgrades. When only installing or when only installing, we do just one.) New file triggers.systemd can be built, but the contents have to be copied into the rpm spec file by hand. Using %{load} does not seem to work. It can serve as documentation.
2015-11-15network: dhcp6 - fix mem leakThomas Hindoe Paaboel Andersen1-1/+1
from 7a695d8e CID#1338679
2015-11-15tests: fix pam_modules installation on Debian (and Debian-like systems)Evgeny Vereshchagin1-1/+4
libpam_modules installs modules into /lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security on Debian Fixes: systemd-testsuite login[36]: PAM unable to dlopen(pam_group.so): /lib/security/pam_group.so: cannot open shared object file: No such file or directory systemd-testsuite login[36]: PAM adding faulty module: pam_group.so systemd-testsuite login[36]: PAM unable to dlopen(pam_limits.so): /lib/security/pam_limits.so: cannot open shared object file: No such file or directory systemd-testsuite login[36]: PAM adding faulty module: pam_limits.so ... etc
2015-11-15machined,logind: be more careful when accepting PIDs and UIDs from clientsLennart Poettering2-6/+22
Always validate first before we start processing the data.
2015-11-15gitignore: add test-install-rootThomas Hindoe Paaboel Andersen1-0/+1
2015-11-15tests: install execs from user units tooEvgeny Vereshchagin1-6/+11
Fixes: systemd[39]: systemd-exit.service: Executing: /bin/kill -s 58 29 systemd[39]: systemd-exit.service: Failed at step EXEC spawning /bin/kill: No such file or directory systemd[29]: Received SIGCHLD from PID 39 ((kill)). systemd[29]: Child 39 ((kill)) died (code=exited, status=203/EXEC)
2015-11-15firstboot: log on take_etc_passwd_lock error tooEvgeny Vereshchagin1-1/+1
2015-11-15NEWS: typo fixesThomas Hindoe Paaboel Andersen1-3/+3
2015-11-15shell-completion: journalctl: add --syncMarcos Mello1-1/+1
From 94b6551
2015-11-15install: don't mix state and type enumsThomas Hindoe Paaboel Andersen1-1/+1
from 0ec0deaa
2015-11-14hwdb: updateKay Sievers4-36462/+39696
2015-11-13core: now that .snapshot unit are gone, we don't need the per-type .no_gc ↵Lennart Poettering2-6/+0
bool anymore
2015-11-13core: simplify scope unit GC checking code a bitLennart Poettering1-10/+4
2015-11-13logind: add a new UserTasksMax= setting to logind.confLennart Poettering8-28/+167
This new setting configures the TasksMax= field for the slice objects we create for each user. This alters logind to create the slice unit as transient unit explicitly instead of relying on implicit generation of slice units by simply starting them. This also enables us to set a friendly description for slice units that way.
2015-11-13logind: don't assert if the slice is missingLennart Poettering1-1/+0
After all, we don't actually really need the slice to work, it's just nice to have it.