summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* config parser: Introduce config_parse_ip_portSusant Sahani2017-07-25
|
* improve readability (#5814)Matija Skala2017-07-25
|
* parse-util: introduce parse_dev() helperFranck Bui2017-07-25
|
* logind: when setting a new controller, don't prepare the VT if logind is ↵Franck Bui2017-07-25
| | | | | | | | | | | | | restarted When assigning a new session controller to a session, the VT is prepared so the controller can expect the VT to be in a good default state. However when logind is restarted and a session controller already took control of a session, there's no need to prepare th VT otherwise logind may screw up the VT state set by the controller. This patch prevents the preparation of the VT in this case.
* tmpfiles: use safe_glob()Zbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | | | This filters out "." and ".." from glob results. Fixes #5655 and #5644. Any judgements on whether the path is "safe" are removed. We will not remove "/" under any name (including "/../" and such), but we will remove stuff that is specified using paths that include "//", "/./" and "/../". Such paths can be created when joining strings automatically, or for other reasons, and people generally know what ".." and "." is. Tests are added to make sure that the helper functions behave as expected.
* basic: add readdir_no_dot and safe_glob functionsZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | safe_glob filters out "." and "..". This converts all users of glob_extend() and glob_exists() to safe_glob.
* test-sizeof: print the size of an enumZbigniew Jędrzejewski-Szmek2017-07-25
|
* bus: report builtins in GetManagedObjects() (#5799)David Herrmann2017-07-25
| | | | | | | | We already report builtin interfaces with InterfacesAdded and InterfacesRemoved. However, we never reported them in GetManagedObjects(). This might end up confusing callers that want to use those interfaces (or simply rely on the interface count to be coherent). Report the builtins for all objects that are queried.
* config parser: Introduce config_parse_uint8Susant Sahani2017-07-25
|
* fix parenthesis in pager.c (#5798)Matija Skala2017-07-25
| | | | | - result of dup2 should be compared against 0 - making parenthesis around comparisons just to be sure
* Export sd_bus_message_append_ap. It is renamed to sd_bus_message_appendv to ↵Federico2017-07-25
| | | | | | | follow elogind naming conventions. (#5753) Moreover, man page for sd_bus_message_append is updated with reference to new exposed function. Makefile-man is updated too, to reflect new alias.
* Add Geneve netlink properties to missing.hSusant Sahani2017-07-25
|
* redirect stdout/stderr back when closing the pager (#5661)Matija Skala2017-07-25
|
* shared/extract-word: replace enum with unsigned int to avoid undefined behaviourZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ../src/basic/extract-word.c:255:22: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] va_start(ap, flags); ^ ../src/basic/extract-word.c:244:77: note: parameter of type 'ExtractFlags' (aka 'enum ExtractFlags') is declared here int extract_many_words(const char **p, const char *separators, ExtractFlags flags, ...) { ^ ../src/basic/extract-word.c:286:22: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] va_start(ap, flags); ^ ../src/basic/extract-word.c:244:77: note: parameter of type 'ExtractFlags' (aka 'enum ExtractFlags') is declared here int extract_many_words(const char **p, const char *separators, ExtractFlags flags, ...) { ^ 2 warnings generated. I think the relevant part of C99 is 6.7.2.2 Enumeration specifiers: Each enumerated type shall be compatible with char, a signed integer type, or an unsigned integer type. The choice of type is implementation-defined, but shall be capable of representing the values of all the members of the enumeration. and 7.16.1.4: The parameter parmN is the identifier of the rightmost parameter in the variable parameter list in the function definition (the one just before the ...). If the parameter parmN is declared with the register storage class, with a function or array type, or with a type that is not compatible with the type that results after application of the default argument promotions, the behavior is undefined. This might cause a real issue if the compiler chooses something that is not an integer for ExtractFlags. Rework the code to avoid the warning, but add an assert_cc in a large-valued ExtractFlags element is ever defined and the type is bumped to something wider than an int.
* basic/log: expose log_dispatchZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | This is useful when we want to avoid printf formatting on the message. It's nicer than using log_struct with "%s" as the format, because printf is slow and with a large message (like from a backtrace) this would require extra unnecessary memory. I'm not exposing all the fields in the wrapper: only level and errno. Those are the most likely to be useful.
* tree-wide: mark log_struct with _printf_ and fix falloutZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | | | | | log_struct takes multiple format strings, each one followed by arguments. The _printf_ annotation is not sufficiently flexible to express this, but we can still annotate the first format string, though not its arguments (because their number is unknown). With the annotation, the places which specified the message id or similar as the first pattern cause a warning from -Wformat-nonliteral. This can be trivially fixed by putting the MESSAGE= first. This change will help find issues where a non-literal is erroneously used as the pattern.
* basic/log: fix _printf_ annotation on log_object_internalvZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | | | Fixup for 4b58153dd22172d817055d2a09a0cdf3f4bd9db3. I saw this because of a clang warning. With gcc the -Wformat-nonliteral warning doesn't seem to work as expected. In two places, a string constructed with strjoina is used as the pattern. This is safe, because we're taking a pattern which was already marked with _printf_ and prepending a known value to it. Those places are marked with #pragma to silence the warning.
* test-exec-util: drop duplicate constZbigniew Jędrzejewski-Szmek2017-07-25
| | | | gcc-7 warns about this with -Wduplicate-decl-specifier.
* basic/random-util: add new header for getrandom()Zbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | There's some confusion: older man pages specify that linux/random.h contains getrandom, but newer glibc has it in sys/random.h. Detect if the newer header is available and include it. We still need the older header for the flags.
* tree-wide: fix wrong indent (#5757)Yu Watanabe2017-07-25
| | | | Fixes wrong indent introduced by the commit 43688c49d1fdb585196d94e2e30bb29755fa591b.
* basic/missing.h: drop inclusion of macro.hZbigniew Jędrzejewski-Szmek2017-07-25
| | | | It's not necessary for anything.
* loginctl: fix typo causing ignoring multiple session IDs (#5732)slodki2017-07-25
| | | | Fixes #5733
* basic/def.h: drop TTY_GID definitionZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | We already provide a definition through the configuration system, this one is duplicate.
* logind: Stopped inhibitions should be considered inactive (#5698)afrantzis2017-07-25
|
* test-sizeof: add some struct-timespec related fieldsZbigniew Jędrzejewski-Szmek2017-07-25
| | | | Might help with #5264.
* test-sizeof: do not link with libelogind-sharedZbigniew Jędrzejewski-Szmek2017-07-25
| | | | This makes it much quicker to compile.
* basic: forbid rm_rf() to remove paths ending with ".." (#5653)Jan Synacek2017-07-25
| | | | Fixes: #5644
* logind: save/restore session devices and their respective file descriptorsFranck Bui2017-07-25
| | | | | | | | | | | | | | | | | | | This patch ensures that session devices are saved for each session. In order to make the revokation logic work when logind is restarted, the session devices are now saved in the session state files and their respective file descriptors sent to PID1's fdstore in order to keep them open accross restart. This is mandatory in order to keep the revokation logic working. Indeed in case of input-devices, the same file descriptors must be shared by logind and a given session controller in order EVIOCREVOKE to work otherwise multiple sessions can have device access in parallel. This should be the only remaining and missing piece for making logind fully restartable. Fixes: #1163
* check for _POSIX_C_SOURCE instead of __USE_POSIX*Matija Skala2017-07-25
| | | | | check for _GNU_SOURCE as well as sd_event_child_handler_t needs to be defined correctly while compiling elogind
* assigning stdout and stderr is not allowedMatija Skala2017-07-25
|
* fix includesMatija Skala2017-07-25
| | | | | | | linux/sockios.h is needed for the SIOCGSTAMPNS macro xlocale.h is included indirectly in glibc and doesn't even exist in other libcs
* headers: check that __INCLUDE_LEVEL__ is defined before using it (#5575)Zbigniew Jędrzejewski-Szmek2017-07-25
| | | | | That macro is a gcc extension, and while widely supported, not ubiquitous. In particular the coverity scanner is having trouble with it.
* Fix typo in function name (#5565)Michal Sekletar2017-07-25
|
* missing.h: add vxlan netlink propertiesSusant Sahani2017-07-25
|
* sd-bus: drop kdbus-related docs (#5533)AsciiWolf2017-07-25
|
* test: skip instead of fail if crypto kmods are not availableMartin Pitt2017-07-25
| | | | | | | | Package build machines may have module loading disabled, thus AF_ALG sockets are not available. Skip the tests that cover those (khash and id128) instead of failing them in this case. Fixes #5524
* Rip out setting of the log level from udev_new and put it in a new functionZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | This function is internal to elogind code, so external users of libudev will not see those log messages. I think this is better. If we want to allow that, the function could be put in libudev and exported. v2: check that the string is more than one char before stripping quotes
* basic/log: split max log level into multiple "realms"Zbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | | | | | The single log level is split into an array of log levels. Which index in the array is used can be determined for each compilation unit separately by setting a macro before including log.h. All compilation units use the same index (LOG_REALM_SYSTEMD), so there should be no functional change. v2: - the "realm" is squished into the level (upper bits that are not used by priority or facility), and unsquished later in functions in log.c. v3: - rename REALM_PLUS_LEVEL to LOG_REALM_PLUS_LEVEL and REALM to LOG_REALM_REMOVE_LEVEL.
* Version 233.3 ReleaseSven Eden2017-07-21
|
* Prep v233.3: Add HAVE_UTMP information to basic/build.hSven Eden2017-07-21
|
* Prep v233.3: Remove stray character.Sven Eden2017-07-21
|
* Prep v233.3: Add 'loginctl list' as a shorthand for list-sessionsSven Eden2017-07-20
|
* Prep v233.3: Moved four functions, that did not need adaptation in ↵Sven Eden2017-07-20
| | | | elogind-dbus.c, back to logind-dbus.c.
* Prep v233.3: Moved shutdown_or_sleep() and run_helper() to elogind-dbus.c, ↵Sven Eden2017-07-20
| | | | so elogind-action.c is not needed any more.
* Prep v233.3: Apply upstream updates to systemctl commands we mimic.Sven Eden2017-07-20
|
* Prep v233.3: Add a traget 'cccc' to Makefile.amSven Eden2017-07-20
|
* Prep v233.3: Add missing documentation for API functions exported by ↵Sven Eden2017-07-20
| | | | elogind. (unreviewed)
* Prep v233.3: Add all possible coverage tests for elogindSven Eden2017-07-20
|
* Prep v233.3: Unmask various functions for future coverage tests.Sven Eden2017-07-19
| | | | | These functions, although not used by elogind itself, are mostly tiny and crucial for important tests to work.
* Prep v233.3: Update po files to not include files that do not exist in elogind.Sven Eden2017-07-18
|