summaryrefslogtreecommitdiff
path: root/src/basic/macro.h
AgeCommit message (Collapse)Author
2015-07-23Merge pull request #537 from poettering/nss-mymachines-usernsDavid Herrmann
Hook up container userns with nss-mymachines
2015-07-22basic: more optimizable IN_SET macroMichal Schmidt
Making the array static allows gcc -O2 to generate smaller code: "size systemd" before: text data bss dec hex filename 1377286 128608 2632 1508526 1704ae systemd After: text data bss dec hex filename 1374326 128572 2664 1505562 16f91a systemd (IN_SET still results in worse generated code than using "x == FOO || x == BAR || ...". I don't think we'll be able to match that with the C preprocessor.) This change limits the use of IN_SET to sets with constant elements. All present callers use constants. The compiler would report an "initializer element is not constant" error otherwise.
2015-07-22basic: better readable IN_SET macroMichal Schmidt
Putting the set elements in an array variable and using ELEMENTSOF makes it clearer what's going on. Incidentally, it also makes gcc -O2 generate slightly smaller code: "size systemd", before: text data bss dec hex filename 1378318 128608 2632 1509558 1708b6 systemd After: text data bss dec hex filename 1377286 128608 2632 1508526 1704ae systemd
2015-07-09nss-mymachines: map userns users of containers to real user namesLennart Poettering
Given a container "foo", that maps user id $UID to container user, using user namespaces, this NSS module extenstion will now map the $UID to a name "vu-foo-$TUID" for the translated UID $UID. Similar, userns groups are mapped to "vg-foo-$TGID" for translated GIDs of $GID. This simple change should make userns users more discoverable. Also, given that many tools like "adduser" check NSS before allocating a UID, should lower the chance of UID range conflicts between tools.
2015-06-17sd-event: make errors on EPOLL_CTL_DEL pseudo-fatalDavid Herrmann
If we call EPOLL_CTL_DEL, we *REALLY* expect the file-descriptor to be present in that given epoll-set. We actually track such state via our s->io.registered flag, so it better be true. Make sure if that's not true, we treat it similar to assert_return() (ie., print a loud warning).
2015-06-11build-sys: split internal basic/ library from shared/Kay Sievers
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/