Commit Graph

25 Commits

Author SHA1 Message Date
Daniel Mack b26fa1a2fb tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
2016-02-10 13:41:57 +01:00
Lennart Poettering 4a0b58c4a3 tree-wide: use right cast macros for UIDs, GIDs and PIDs 2015-11-17 00:52:10 +01:00
Lennart Poettering b5efdb8af4 util-lib: split out allocation calls into alloc-util.[ch] 2015-10-27 13:45:53 +01:00
Lennart Poettering 8752c5752f util-lib: move more locale-related calls to locale-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering 8b43440b7e util-lib: move string table stuff into its own string-table.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering b1d4f8e154 util-lib: split out user/group/uid/gid calls into user-util.[ch] 2015-10-26 01:24:38 +01:00
Lennart Poettering 07630cea1f util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.

This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.

Also touches a few unrelated include files.
2015-10-24 23:05:02 +02:00
Lennart Poettering 50e0d56cf3 sd-bus: fix error handling of pthread API calls
pthread APIs (unlike the rest of libc) return their errors as positive
error codes directly from the functions, rather than using errno. Let's
make sure we always handle things that way.
2015-10-17 16:48:21 +02:00
David Herrmann 97b11eedff tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
        free(foobar);
        foobar = NULL;
to this:
        foobar = mfree(foobar);
2015-07-31 19:56:38 +02:00
Daniel Mack b9191d7a52 bus-proxy: ignore 'log' attributes in XML policy
'log' is unsupported but nothing to warn about. Ignore it just like we
ignore 'eavesdrop'.
2015-06-25 13:13:17 +02:00
Ronny Chevalier 6482f6269c shared: add formats-util.h 2015-04-10 23:54:48 +02:00
Thomas Hindoe Paaboel Andersen 2eec67acbb remove unused includes
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.
2015-02-23 23:53:42 +01:00
Zbigniew Jędrzejewski-Szmek 1fa2f38f0f Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable.
Too bad.
2015-01-22 01:14:52 -05:00
David Herrmann 7447362c53 bus-proxy: don't print error-messages if we check multiple dests
If we test the policy against multiple destination names, we really should
not print warnings if one of the names results in DENY. Instead, pass the
whole array of names to the policy and let it deal with it.
2015-01-17 21:18:52 +01:00
David Herrmann 0d620e5336 bus-proxy: implement org.freedesktop.DBus.ReloadConfig()
Make sure to reload our xml policy configuration if requested via the bus.
2015-01-17 19:06:34 +01:00
David Herrmann c4bc1a8434 bus-proxy: share policy between threads
This implements a shared policy cache with read-write locks. We no longer
parse the XML policy in each thread.

This will allow us to easily implement ReloadConfig().
2015-01-17 18:27:23 +01:00
David Herrmann 87b934960a bus-proxy: implement 'at_console'
The 'at_console' policy-category allows to apply policy-items to clients
depending on whether they're run from within a valid user-session or not.
We use sd_uid_get_seats() to check whether a user has a valid seat (which
excludes remote-sessions like ssh).
2015-01-11 17:23:24 +01:00
David Herrmann b49c7806a3 bus-proxy: print message direction in policy logs
Make sure to print "dbus-1 to kernel" or "kernel to dbus-1" in policy logs
to better diagnose the situation.
2015-01-11 15:27:18 +01:00
David Herrmann fa188b9b24 bus-proxy: fix swapped path/interface debug messages
The policy debug messages swapped "path=" and "interface=", fix this.
2015-01-11 14:54:33 +01:00
Lennart Poettering 48aae6d6a0 bus-proxy-test: show parsed system/session policy 2015-01-09 19:30:01 +01:00
Lennart Poettering 585b46db6b bus-proxy: eat up "*" matches, they are pointless 2015-01-09 19:28:18 +01:00
Kay Sievers a2be9e047e bus-proxyd: xml - consider empty tags as recv 2015-01-09 18:46:08 +01:00
Lennart Poettering fe21f16764 bus-proxy: make sure sure eavesdrop= XML attributes are properly handled 2015-01-09 18:35:36 +01:00
Veres Lajos f131770b14 tree-wide: spelling fixes
https://github.com/vlajos/misspell_fixer

b6fdeb618c
Thanks to Torstein Husebo <torstein@huseboe.net>.
2014-12-30 20:07:04 -05:00
Lennart Poettering 3c70e3bb02 core: rearrange code so that libsystemd/sd-bus/ does not include header files from core
Stuff in src/shared or src/libsystemd should *never* include code from
src/core or any of the tools, so don't do that here either. It's not OK!
2014-12-23 19:15:27 +01:00
Renamed from src/bus-proxyd/bus-policy.c (Browse further)