summaryrefslogtreecommitdiff
path: root/src/socket.c
AgeCommit message (Collapse)Author
2012-04-11move libsystemd_core.la sources into core/Kay Sievers
2012-04-10rename basic.la to shared.la and put selinux deps in shared-selinx.laKay Sievers
Only 34 of 74 tools need libselinux linked, and libselinux is a pain with its unconditional library constructor.
2012-04-02Revert "socket: if we fail to create an instantiated service for a socket, ↵Michal Schmidt
don't put the socket in failure mode" This reverts commit 9586cdfab6a2638078702b7fea7e16b3a71899e2. (but not the TODO hunk). The bug was already fixed by 1a710b43. And if other errors occur, we don't want to leave the socket active in order to avoid having socket tarpits.
2012-03-14socket: make sure that the name for per-connection services are uniqueLennart Poettering
If a client connects to us repeatedly always using the same source port and we instantiate a service for the incoming connection this might clash with an old instance. Hence, include the connection number, the same way we do it for AF_UNIX to make connections unique. https://bugs.freedesktop.org/show_bug.cgi?id=45297
2012-03-14socket: if we fail to create an instantiated service for a socket, don't put ↵Lennart Poettering
the socket in failure mode An incoming connection that is immediately terminated might result in getpeername() or a similar call failing. Hence it is quite possible that while we are setting up an instantiated service for a socket we might get an error and we shouldn't take this as hint to take the listening socket down. https://bugs.freedesktop.org/show_bug.cgi?id=45297 https://bugzilla.novell.com/show_bug.cgi?id=741590
2012-03-13socket: add option for SO_PASSECLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=798760 (Note that this work is not complete yet, as the kernel seems to send us useless data with SCM_SECURITY enabled)
2012-03-06socket: rename 'broken' failure result to 'failed-permanent' on order not to ↵Lennart Poettering
introduce new terminology
2012-03-05socket: fail the socket if the service keeps dying on startMichal Schmidt
If the service reaches the start limit, mark the sockets that activate it as failed (with the result code 'service-broken'). This way the sockets won't act as tarpits for clients connecting to them.
2012-02-03automount: convert failure boolean to enumLennart Poettering
2012-02-03socket: replace failure boolean by enumLennart Poettering
2012-02-01socket: typo in dump outputMichal Schmidt
2012-01-27socket: if SO_RCVBUFFORCE fails, fall back to SO_RCVBUF, to have at least a ↵Lennart Poettering
little effect
2012-01-20socket: don't fail the socket on ENOTCONNMichal Schmidt
Albert Strasheim reported a socket unit with Accept=yes was failing sometimes. getpeername() returns ENOTCONN if the connection was killed by TCP RST. The socket unit must not fail when it happens. Reproducer available at: https://bugzilla.redhat.com/show_bug.cgi?id=783344
2012-01-16unit: use safe downcasts, remove pointless castsMichal Schmidt
Always use the macros for downcasting. Remove a few obviously pointless casts.
2012-01-16unit: use the UNIT() macro consistentlyMichal Schmidt
The UNIT() macro upcasts from specific unit types to the base Unit. Use it everywhere, rather than accessing the 'meta' member directly.
2012-01-16unit: remove union UnitMichal Schmidt
Now that objects of all unit types are allocated the exact amount of memory they need, the Unit union has lost its purpose. Remove it. "Unit" is a more natural name for the base unit class than "Meta", so rename Meta to Unit. Access to members of the base class gets simplified.
2012-01-16unit: reduce heap usage for unit objectsMichal Schmidt
The storage of the unit objects on the heap is currently not very efficient. For every unit object we allocate a chunk of memory as large as the biggest unit type, although there are significant differences in the units' real requirements. pahole shows the following sizes of structs: 488 Target 496 Snapshot 512 Device 528 Path 560 Timer 576 Automount 1080 Socket 1160 Swap 1168 Service 1280 Mount Usually there aren't many targets or snapshots in the system, but Device is one of the most common unit types and for every one we waste 1280 - 512 = 768 bytes. Fix it by allocating only the right amount for the given unit type. On my machine (x86_64, with 39 LVM volumes) this decreases systemd's USS (unique set size) by more than 300 KB.
2012-01-06unit: properly update references to units which are mergedLennart Poettering
When we merge units that some kind of object points to, those pointers might become invalidated, and needs to be updated. Introduce a UnitRef struct which links up all the unit references, to ensure corrected references. At the same time, drop configured_sockets in the Service object, and replace it by proper UNIT_TRIGGERS resp. UNIT_TRIGGERED_BY dependencies, which allow us to simplify a lot of code.
2012-01-03socket: only add dependency on kmsg socket to socket units which have any ↵Lennart Poettering
kind of exec program specified
2011-12-31socket: rename the PassCred= option to PassCredentials=, since we don't want ↵Lennart Poettering
to needlessly abbreviate options unless they are very well established
2011-11-30socket: add option for SO_PASSCREDMichal Schmidt
Add an option to enable SO_PASSCRED for unix sockets.
2011-09-23llvm-analyze: fix some bugs found by llvm-analyzeLennart Poettering
2011-09-23coverity: fix a couple of bugs found by coverityLennart Poettering
2011-08-20exec: optionally apply cgroup attributes to the cgroups we createLennart Poettering
2011-08-01load-fragment: speed up parsing by using a perfect hash table with ↵Lennart Poettering
configuration settings built by gperf
2011-07-28label: generalize label_get_socket_label_from_exe() a bitLennart Poettering
2011-07-13unit: use ESRCH as error when we don't find anybody to killLennart Poettering
2011-07-12service: properly handle who argument on D-Bus kill callsLennart Poettering
2011-06-21english: s/_per_/_by_/Lennart Poettering
2011-05-20socket: always use SO_{RCV,SND}BUFFORCE to allow larger valuesKay Sievers
2011-05-19socket: expose SO_BROADCASTLennart Poettering
2011-05-19socket: expose IP_TRANSPARENTLennart Poettering
2011-05-18exec: hangup/reset/deallocate VTs in gettysLennart Poettering
Explicitly disconnect all clients from a VT when a getty starts/finishes (requires TIOCVHANGUP, available in 2.6.29). Explicitly deallocate getty VTs in order to flush scrollback buffer. Explicitly reset terminals to a defined state before spawning getty.
2011-05-17socket: use 666 socket mode by default since neither fifos, nor sockets, nor ↵Lennart Poettering
mqueues need to be executable
2011-05-17socket: add POSIX mqueue supportLennart Poettering
2011-04-26socket: improve warning message when we get POLLHUPLennart Poettering
2011-04-20socket: support ListeSpecial= socketsLennart Poettering
2011-04-20socket: log more information about invalid poll eventsLennart Poettering
2011-04-16socket: reuse existing FIFOsLennart Poettering
2011-04-12socket: try creating a socket under our own identity if we have no perms to ↵Lennart Poettering
consult the selinux database
2011-04-10socket: be a bit more verbose when refusing to start a socket unitLennart Poettering
2011-04-10socket: support netlink socketsLennart Poettering
2011-03-31src: our lord is coverityLennart Poettering
2011-03-29exec: drop process group kill mode since it has little use and confuses the userLennart Poettering
2011-03-17def: centralize definition of default timeout in one placeLennart Poettering
2011-03-14socket: use 777 as default mode for socketsLennart Poettering
2011-03-03kill: always send SIGCONT after SIGTERMLennart Poettering
When we kill a process to terminate it make sure to send SIGCONT to ensure it is unpaused and processes the signal.
2011-02-28Spelling CorrectionsHarald Hoyer
Just some lame spelling corrections with no functionality.
2011-02-15exec: introduce global defaults for the standard output of servicesLennart Poettering
2011-02-15socket: refuse socket activation for SysV servicesLennart Poettering
Make sure that when a .socket unit is installed without its matching .service we don't end up activating a legacy SysV/LSB service with the same name. SysV/LSB style services do not support passing sockets and we don't want to extend SysV/LSB to ensure we don't break compatibility with other systems.