1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 01:27:11 +03:00
Commit Graph

12436 Commits

Author SHA1 Message Date
Lennart Poettering
44b601bc79 macro: clean up usage of gcc attributes
Always use our own macros, and name all our own macros the same style.
2013-10-16 06:14:59 +02:00
Lennart Poettering
e0d856dd48 rules: don't limit some of the rules to the "add" action
Devices should show up in systemd regardless whether the user invoked
"udevadm trigger" or not. Before this change some devices might have
suddenly disappeared due issuing that command.
2013-10-16 06:14:59 +02:00
Lennart Poettering
da99906847 rules: expose loop block devices to systemd
Since the kernel no longer exposes a large number of "dead" loop devices
it is OK to expose them now in systemd, so let's do that. This has the
benefit that mount dependencies on loop devices start to work.
2013-10-16 06:14:59 +02:00
David Strauss
32d3c80969 saproxy: Fix for systemd's event library not deduping fds. 2013-10-15 18:55:25 -07:00
David Strauss
075376d596 Bump up the saproxy buffer to 16kB. 2013-10-15 17:29:51 -07:00
David Strauss
d1b38fac57 Rename sabridge to saproxy to be less cryptic 2013-10-15 17:00:18 -07:00
David Strauss
ae25936d0f Update TODOs with follow-up sabridge work. 2013-10-15 16:25:45 -07:00
David Strauss
912b54ad47 Add sabridge for socket activation of traditional daemons 2013-10-15 16:13:30 -07:00
David Herrmann
d7d1c8f983 logind: allow unprivileged session-device access
The session-device/control API was introduced for unprivileged device
access from within a session. Add the required dbus policy to the default
logind policies.

Note: logind validates that only root and the user of a session can
use the API. Furthermore, only a single API user gets access at a time.
2013-10-15 21:13:39 +02:00
Jan Engelhardt
775657712d man: document the -b special boot option 2013-10-15 09:57:26 -04:00
Igor Zhbanov
306e665022 Fix for SIGSEGV in systemd-bootchart on short-living processes
The function svg_ps_bars() dereferencess NULL pointer in the line
	endtime = ps->last->sampledata->sampletime;
because of partially initialized ps_struct (ps->last == NULL).

If some process terminates between scaning /proc directory in the log_sample()
function and reading additional information from /proc/PID/... files,
the files couldn't be read, the loop will be continued and partially
initialized structure returned.
2013-10-15 09:40:34 -04:00
Jan Engelhardt
72f4d9669c man: wording and grammar updates
This is a recurring submission and includes corrections to various
issue spotted. I guess I can just skip over reporting ubiquitous comma
placement fixes…
2013-10-15 08:19:49 -04:00
Anatol Pomozov
0c7225549d Fix misspellings with codespell tool 2013-10-14 23:56:59 -04:00
Kay Sievers
b0130bf608 build-sys: libsystemd-id128 - get rid of the needless selinux linking (again)
$ ldd libsystemd-id128.so
        linux-vdso.so.1 =>  (0x00007fffce377000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4de1fc1000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f4de1db9000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f4de1bb4000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f4de17f5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4de2406000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f4de158f000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4de1371000)

$ ldd libsystemd-id128.so
        linux-vdso.so.1 =>  (0x00007fff25187000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f41a3964000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f41a35a5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f41a3d89000)
2013-10-15 02:29:29 +02:00
Kay Sievers
9cada1952a build-sys: libudev - get rid of the needless selinux linking (again) 2013-10-15 02:11:56 +02:00
Zbigniew Jędrzejewski-Szmek
a0551d26ab Fix bad assert in show_pid_array
This function should get the same treatment as other qsort uses
did in 7ff7394 "Never call qsort on potentially NULL arrays".

Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-10-14 19:16:25 -04:00
Lennart Poettering
68313d3dfa bus: properly handle if new objects are installed in the node tree while we are dispatching to one 2013-10-14 21:58:06 +02:00
Lennart Poettering
8ce2afd634 bus: make sure that we always keep a ref to the bus when we dispatch callbacks
Otherwise the callback might unref the bus we are processing and destroy
the object while we are processing it.
2013-10-14 19:53:56 +02:00
Lennart Poettering
d68888227d bus: use assert_return() for more API calls 2013-10-14 19:40:37 +02:00
Lennart Poettering
690018ab40 git: add test-ellipsize to files to ignore by git 2013-10-14 19:02:44 +02:00
Lennart Poettering
be3f52f4ed backlight: include ID_PATH in file names for backlight settings
Much like for rfkill devices we should provide some stability regarding
enumeration order, hence include the stable bits of the device path in
the file name we store settings under.
2013-10-14 19:02:44 +02:00
Lennart Poettering
f6f738db72 rfkill: use ID_PATH as identifier for rfkill state files
Let's include the stable device path for the rfkill devices in the name
of the file we store the rfkill state in, so that we have some stability
regarding enumeration order.
2013-10-14 19:02:44 +02:00
Bastien Nocera
a8ccacf534 shared/util: Fix glob_extend() argument
glob_extend() would completely fail to work, or return incorrect
data if it wasn't being passed the current getopt "optarg" variable
as it used the global variable, instead of the passed parameters.
2013-10-14 10:11:33 -04:00
Lennart Poettering
71fda00f32 list: make our list macros a bit easier to use by not requring type spec on each invocation
We can determine the list entry type via the typeof() gcc construct, and
so we should to make the macros much shorter to use.
2013-10-14 06:11:19 +02:00
Lennart Poettering
14bf2c9d37 util: allow trailing semicolons on define_trivial_cleanup_func lines
Emacs C indenting really gets confused by these lines if they carry no
trailing semicolon, hence let's make this nicer for good old emacs. The
other macros which define functions already do this too, so let's copy
the scheme here.

Also, let's use an uppercase name for the macro. So far our rough rule
was that macros that are totally not function-like (like this ones,
which define a function) are uppercase. (Well, admittedly it is a rough
rule only, for example function and variable decorators are all
lower-case SINCE THE CONSTANT YELLING IN THE SOURCES WOULD SUCK, and
also they at least got underscore prefixes.) Also, the macros that
define functions that we already have are all uppercase, so let's do the
same here...
2013-10-14 06:11:19 +02:00
Lennart Poettering
416446221d update TODO 2013-10-14 06:11:18 +02:00
Mantas Mikulėnas
a0a6408e31 manager: connect to private bus even if $DBUS_SESSION_BUS_ADDRESS is not set
Because that's exactly the kind of situation where the private bus is
necessary.
2013-10-13 23:01:23 -04:00
Lennart Poettering
3990f24765 rfkill: add new rfkill tool to save/restore rfkill state across reboots
This works analogous to the existing backlight and random seed services
2013-10-14 04:31:49 +02:00
Lennart Poettering
0f4ba83c39 backlight: always prefer "firmware"/"platform" backlights over "raw" backlights if we have both for the same device 2013-10-14 02:22:35 +02:00
Zbigniew Jędrzejewski-Szmek
124b48b00d man: add more markup to udevadm(8) 2013-10-13 19:43:19 -04:00
Zbigniew Jędrzejewski-Szmek
0eb2e0e340 event: avoid derefencing null pointer 2013-10-13 17:56:55 -04:00
Zbigniew Jędrzejewski-Szmek
23c6f770cc bus: make sure we don't try to malloc 0 bytes 2013-10-13 17:56:55 -04:00
Zbigniew Jędrzejewski-Szmek
1ca208fb4f Introduce udev object cleanup functions 2013-10-13 17:56:55 -04:00
Zbigniew Jędrzejewski-Szmek
b506291ff1 gitignore: ignore clang --analyze output 2013-10-13 17:56:55 -04:00
Zbigniew Jędrzejewski-Szmek
f6d2d42147 Make sure that we don't dereference NULL
The code was actually safe, because b should
never be null, because if rvalue is empty, a different
branch is taken. But we *do* check for NULL in the
loop above, so it's better to also check here for symmetry.
2013-10-13 17:56:55 -04:00
Zbigniew Jędrzejewski-Szmek
97fec53e5e udev: use initialization instead of zeroing in one place 2013-10-13 17:56:55 -04:00
Zbigniew Jędrzejewski-Szmek
872c8faaf2 Fix write-only use of a few variables
Since the invention of read-only memory, write-only memory has been
considered deprecated. Where appropriate, either make use of the
value, or avoid writing it, to make it clear that it is not used.
2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
51d122af23 Introduce _cleanup_fdset_free_ 2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
a3e7f417d7 bus: fix access to unitialized variable in error path
src/machine/machined-dbus.c:237:13: warning: Branch condition evaluates to a garbage value
        if (m)
            ^
2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
6891529fe1 drop-ins: check return value
If the function failed, nothing serious would happen
because unlink would probably return EFAULT, but this
would obscure the real error and is a bit sloppy.
2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
7ca9dffae1 journald: use greedy_realloc in one place 2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
74dcc2df7b dbus-common: avoid leak in error path
src/shared/dbus-common.c:968:33: warning: Potential leak of memory pointed to by 'l'
                        return -EINVAL;
                                ^~~~~~
2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
b47d419c25 Modernization
Fixes minor leak in error path in device.c.
2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
7ff7394d9e Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero.
2013-10-13 17:56:54 -04:00
Zbigniew Jędrzejewski-Szmek
fb13164629 unicode: treat cute symbol block as fullwidth
UNICODE standards only talk about fullwidth characters for East
Asian scripts. But it seems that all those symbols are fullwidth
too.
2013-10-13 17:56:54 -04:00
Shawn Landden
35d811f521 test: test for ellipsize 2013-10-13 17:56:54 -04:00
Shawn Landden
f405e86de3 util, utf8: make ellipsize take multi-byte characters into account
rename old versions to ascii_*

Do not take into account zerowidth characters, but do consider double-wide characters.
Import needed utf8 helper code from glib.

v3: rebase ontop of utf8 restructuring work

[zj: tweak the algorithm a bit, move new code to separate file]
2013-10-13 17:56:54 -04:00
Dave Reisner
14a9283eb3 udevadm.xml: document --resolve-names option for test
And remove documentation of the --subsystem flag which doesn't actually
exist.
2013-10-13 17:42:51 -04:00
Lennart Poettering
4be391639f bus: properly implement logic for generating InterfacesAdded/InterfacesRemoved signals of ObjectManager 2013-10-11 23:23:46 +02:00
Lennart Poettering
92db139e34 bus: in GetManagedObjects() only return each object once. 2013-10-11 23:21:22 +02:00