summaryrefslogtreecommitdiff
path: root/src/core/dbus-socket.c
Commit message (Collapse)AuthorAge
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | 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.
* socket: suffix newly added TCP sockopt time properties with "Sec"Lennart Poettering2014-08-19
| | | | | | This is what we have done so far for all other time values, and hence we should do this here. This indicates the default unit of time values specified here, if they don't contain a unit.
* socket: add bus property for bus property NoDelaySusant Sahani2014-08-14
| | | | Missed to add the SD_BUS_PROPERTY for no_delay.
* socket: Add support for TCP defer acceptSusant Sahani2014-08-14
| | | | | | | | | | | TCP_DEFER_ACCEPT Allow a listener to be awakened only when data arrives on the socket. If TCP_DEFER_ACCEPT set on a server-side listening socket, the TCP/IP stack will not to wait for the final ACK packet and not to initiate the process until the first packet of real data has arrived. After sending the SYN/ACK, the server will then wait for a data packet from a client. Now, only three packets will be sent over the network, and the connection establishment delay will be significantly reduced.
* socket: Add Support for TCP keep alive variablesSusant Sahani2014-08-14
| | | | | | | | | | | | | | The tcp keep alive variables now can be configured via conf parameter. Follwing variables are now supported by this patch. tcp_keepalive_intvl: The number of seconds between TCP keep-alive probes tcp_keepalive_probes: The maximum number of TCP keep-alive probes to send before giving up and killing the connection if no response is obtained from the other end. tcp_keepalive_time: The number of seconds a connection needs to be idle before TCP begins sending out keep-alive probes.
* Revert "socket: add support for TCP fast Open"Lennart Poettering2014-08-14
| | | | | | | | This reverts commit 9528592ff8d7ff361da430285deba8196e8984d5. Apparently TFO is actually the default at least for the server side now. Also the setsockopt doesn't actually take a bool, but a qlen integer.
* socket: add support for TCP fast OpenSusant Sahani2014-08-14
| | | | | | | | | | TCP Fast Open (TFO) speeds up the opening of successiveTCP) connections between two endpoints.It works by using a TFO cookie in the initial SYN packet to authenticate a previously connected client. It starts sending data to the client before the receipt of the final ACK packet of the three way handshake is received, skipping a round trip and lowering the latency in the start of transmission of data.
* socket: add SocketUser= and SocketGroup= for chown()ing sockets in the file ↵Lennart Poettering2014-06-05
| | | | | | | system This is relatively complex, as we cannot invoke NSS from PID 1, and thus need to fork a helper process temporarily.
* socket: add new Symlinks= option for socket unitsLennart Poettering2014-06-04
| | | | | | | | | | | With Symlinks= we can manage one or more symlinks to AF_UNIX or FIFO nodes in the file system, with the same lifecycle as the socket itself. This has two benefits: first, this allows us to remove /dev/log and /dev/initctl from /dev, thus leaving only symlinks, device nodes and directories in the /dev tree. More importantly however, this allows us to move /dev/log out of /dev, while still making it accessible there, so that PrivateDevices= can provide /dev/log too.
* socket: optionally remove sockets/FIFOs in the file system after useLennart Poettering2014-06-04
|
* core: rework cgroup mask propagationLennart Poettering2014-02-17
| | | | | | | Previously a cgroup setting down tree would result in cgroup membership additions being propagated up the tree and to the siblings, however a unit could never lose cgroup memberships again. With this change we'll make sure that both cgroup additions and removals propagate properly.
* core: no need to list properties for PropertiesChanged messages anymoreLennart Poettering2013-12-22
| | | | Since the vtable includes this information anyway, let's just use that
* bus: decorate the various object vtables with SD_BUS_VTABLE_PROPERTY_CONST ↵Lennart Poettering2013-12-22
| | | | where appropriate
* core: fix serialization of exec command structsLennart Poettering2013-11-25
|
* bus: rework message handlers to always take an error argumentLennart Poettering2013-11-21
| | | | | | | | | | | | | | | | | | | | Message handler callbacks can be simplified drastically if the dispatcher automatically replies to method calls if errors are returned. Thus: add an sd_bus_error argument to all message handlers. When we dispatch a message handler and it returns negative or a set sd_bus_error we send this as message error back to the client. This means errors returned by handlers by default are given back to clients instead of rippling all the way up to the event loop, which is desirable to make things robust. As a side-effect we can now easily turn the SELinux checks into normal function calls, since the method call dispatcher will generate the right error replies automatically now. Also, make sure we always pass the error structure to all property and method handlers as last argument to follow the usual style of passing variables for return values as last argument.
* core: convert PID 1 to libsystemd-busLennart Poettering2013-11-20
| | | | | | | | | | | | | | | | | | | | | | This patch converts PID 1 to libsystemd-bus and thus drops the dependency on libdbus. The only remaining code using libdbus is a test case that validates our bus marshalling against libdbus' marshalling, and this dependency can be turned off. This patch also adds a couple of things to libsystem-bus, that are necessary to make the port work: - Synthesizing of "Disconnected" messages when bus connections are severed. - Support for attaching multiple vtables for the same interface on the same path. This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus calls which used an inappropriate signature. As a side effect we will now generate PropertiesChanged messages which carry property contents, rather than just invalidation information.
* bus: remove static introspection file exportKay Sievers2013-10-21
|
* basic SO_REUSEPORT supportShawn Landden2013-07-11
|
* core: move ControlGroup and Slice properties out of the dbus "Unit" interfaceLennart Poettering2013-07-01
| | | | | | | | | | | Slice/ControlGroup only really makes sense for unit types which actually have cgroups attached to them, hence move them out of the generic Unit interface and into the specific unit type interfaces. These fields will continue to be part of Unit though, simply because things are a log easier that way. However, regardless how this looks internally we should keep things clean and independent of the specific implementation of the inside.
* dbus: expose cgroup properties in introspection everywhereLennart Poettering2013-07-01
|
* dbus: hookup runtime property changes for mouns, services, sockets, swaps tooLennart Poettering2013-06-27
|
* core: general cgroup reworkLennart Poettering2013-06-27
| | | | | | | | | | | | | | | | Replace the very generic cgroup hookup with a much simpler one. With this change only the high-level cgroup settings remain, the ability to set arbitrary cgroup attributes is removed, so is support for adding units to arbitrary cgroup controllers or setting arbitrary paths for them (especially paths that are different for the various controllers). This also introduces a new -.slice root slice, that is the parent of system.slice and friends. This enables easy admin configuration of root-level cgrouo properties. This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in /dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is turned off by DevicePolicy=).
* core/dbus: properly export cgroup properties on socketsZbigniew Jędrzejewski-Szmek2013-06-19
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=65945
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Add Listen* to dbus propertiesOleksii Shevchuk2013-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | sockets.socket - Test Loaded: loaded (/home/alxchk/.config/systemd/user/sockets.socket; static) Active: inactive (dead) Listen: Stream: /tmp/stream1 Stream: @stream4 Stream: [::]:9999 Stream: 127.0.0.2:9996 Stream: [::1]:9996 Datagram: /tmp/stream2 Datagram: @stream5 Datagram: [::]:9998 Datagram: 127.0.0.2:9995 Datagram: [::1]:9995 SequentialPacket: @stream6 SequentialPacket: /tmp/stream3 FIFO: /tmp/fifo1 Special: /dev/input/event9 Netlink: kobject-uevent 0 MessageQueue: /msgqueue1 [zj: - minor cleanups, - free i.listen, - remove sorting, because the order or sockets matters.]
* core: add bus API and systemctl commands for altering cgroup parameters ↵Lennart Poettering2013-01-14
| | | | during runtime
* Revert "Implement SocketUser= and SocketGroup= for [Socket]"Dave Reisner2012-11-06
| | | | | | This was never intended to be pushed. This reverts commit aea54018a5e66a41318afb6c6be745b6aef48d9e.
* Implement SocketUser= and SocketGroup= for [Socket]Dave Reisner2012-11-05
| | | | | | Since we already allow defining the mode of AF_UNIX sockets and FIFO, it makes sense to also allow specific user/group ownership of the socket file for restricting access.
* SMACK: Add configuration options. (v3)Auke Kok2012-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds SMACK label configuration options to socket units. SMACK labels should be applied to most objects on disk well before execution time, but two items remain that are generated dynamically at run time that require SMACK labels to be set in order to enforce MAC on all objects. Files on disk can be labelled using package management. For device nodes, simple udev rules are sufficient to add SMACK labels at boot/insertion time. Sockets can be created at run time and systemd does just that for several services. In order to protect FIFO's and UNIX domain sockets, we must instruct systemd to apply SMACK labels at runtime. This patch adds the following options: Smack - applicable to FIFO's. SmackIpIn/SmackIpOut - applicable to sockets. No external dependencies are required to support SMACK, as setting the labels is done using fsetxattr(). The labels can be set on a kernel that does not have SMACK enabled either, so there is no need to #ifdef any of this code out. For more information about SMACK, please see Documentation/Smack.txt in the kernel source code. v3 of this patch changes the config options to be CamelCased.
* selinux: rework selinux access check logicLennart Poettering2012-10-02
| | | | | | | | | | | | | | 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().
* unit: split off KillContext from ExecContext containing only kill definitionsLennart Poettering2012-07-20
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* move libsystemd_core.la sources into core/Kay Sievers2012-04-11