Commit graph

16 commits

Author SHA1 Message Date
GermanAizek
b1b8db6e7a
config-parser-common: remove duplicate check "auth" config param 2025-08-22 22:20:10 +03:00
Ralf Habacker
2dee523608 Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license
The full license texts are not added because they were already
added in a previous commit.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>

see #394
2023-01-04 07:53:44 +00:00
Simon McVittie
eeef787418 Normalize C source files to end with exactly one newline
Some editors automatically remove trailing blank lines, or
automatically add a trailing newline to avoid having a trailing
non-blank line that is not terminated by a newline. To avoid unrelated
whitespace changes when users of such editors contribute to dbus,
let's pre-emptively normalize all files.

Unlike more intrusive whitespace normalization like removing trailing
whitespace from each line, this seems unlikely to cause significant
issues with cherry-picking changes to stable branches.

Implemented by:

    find . -name '*.[ch]' -print0 | \
    xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g'

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-06-10 10:47:31 +00:00
Simon McVittie
39ea37b587 trivial: Remove trailing whitespace from copyright notices
We don't usually mass-remove trailing whitespace from the actual source
code because it would complicate cherry-picking bug fixes to older
branches, but that reasoning doesn't really apply to the comments
containing copyright and licensing notices.

Removing trailing whitespace makes it much easier to move code around:
we have a commit hook that rejects commits containing trailing
whitespace, but that commit hook counts moving a file as a delete + add
pair, so it objects to moving code that contains trailing whitespace.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-17 11:22:39 +00:00
Simon McVittie
21eb3317c5 Move defaults for some switches into a default case
This is clearly equivalent, and quiets -Wswitch-default.

Based on part of a patch by Thomas Zimmermann.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
2017-01-17 17:20:53 +00:00
Tyler Hicks
06033cb20f Add apparmor element support to bus config parsing
The <apparmor> element can contain a single mode attribute that has one
of three values:

 "enabled"
 "disabled"
 "required"

"enabled" means that kernel support is autodetected and, if available,
AppArmor mediation occurs in dbus-daemon. If kernel support is not
detected, mediation is disabled. "disabled" means that mediation does
not occur. "required" means that kernel support must be detected for
dbus-daemon to start.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-18 17:04:00 +00:00
Andre Heinecke
e0fc90bdf2 Do not use the name ELEMENT_TYPE
On Windows Systems ELEMENT_TYPE is already defined
in Winioctl.h this header is included indirectly
in dbus-sysdeps.h. By avoiding the use of the Name
ELEMENT_TYPE it is ensured that config-parser-common.h
can be included together with dbus-sysdeps.h

Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-03-07 13:50:38 +00:00
Marcus Brinkmann
dbecdeabb2 Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
Tobias Mueller
5baf2f856a Bug 21161 - Update the FSF address
No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-10 19:32:38 -04:00
Thiago Macieira
63196f69c4 Merge branch 'dbus-1.2'
Conflicts:
	bus/bus.c
	bus/config-parser-common.c
	bus/config-parser-common.h
	bus/config-parser.c
	bus/connection.c
	bus/dbus-daemon.1.in
	dbus/dbus-marshal-validate-util.c
	dbus/dbus-marshal-validate.c
	dbus/dbus-sysdeps-util-unix.c
	test/name-test/tmp-session-like-system.conf
2009-04-28 15:16:36 +02:00
Matt McCutchen
6663d1dd35 Bug 18446: Keep umask for session bus
Signed-off-by: Colin Walters <walters@verbum.org>
2009-01-06 18:20:13 -05:00
Colin Walters
69ed32cbcc Add syslog of security denials and configuration file reloads
We need to start logging denials so that they become more easily trackable
and debuggable.
2008-12-12 15:18:12 -05:00
Colin Walters
bb2a464067 Add syslog of security denials and configuration file reloads
We need to start logging denials so that they become more easily trackable
and debuggable.
2008-12-12 14:00:16 -05:00
Dennis Kaarsemaker
07a4ad4b04 Bug 15393 - support allow_anonymous config variable
* bus/bus.c: Set allow_anonymous if specified from
	parser.
	* bus/config-parser.c: Parse it.
	* bus/config-parser-common.h: Declare it.

Signed-off-by: Colin Walters <walters@verbum.org>
2008-11-12 08:51:00 -05:00
Matt McCutchen
0314e701c8 Bug 18446: Keep umask for session bus
Signed-off-by: Colin Walters <walters@verbum.org>
2008-11-10 08:55:27 -05:00
Richard Hughes
dd8f96b8af 2007-07-24 Richard Hughes <richard@hughsie.com>
* bus/config-parser-common.c:
(bus_config_parser_element_name_to_type),
(bus_config_parser_element_type_to_name):
* bus/config-parser-common.h:
We don't want to run the whole config parser with all it's deps in the
setuid program. We need to implement a stripped down config parser just
for the launcher, and to do so I need some common functions and
defines; add them here.
2007-07-24 11:47:31 +00:00