summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-sysdeps-util-unix.c
Commit message (Collapse)AuthorAgeFilesLines
* check ConsoleKit database for detecting if user is on consoleLennart Poettering2009-10-171-73/+77
| | | | | | | | | In addtion to Solaris style /dev/console permission checking and pam_console style /var/run/console file existance checking add support for checking console status via the ConsoleKit database. This adds very basic support and will read the console database on every single read. These needs optimization.
* Bug 21161 - Update the FSF addressTobias Mueller2009-07-101-1/+1
| | | | | | No comment. Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 21646 - Fix a signed char comparisonColin Walters2009-07-101-4/+7
| | | | | | Original suggested patch from Marc-Andre Lureau <marcandre.lureau@gmail.com> Explicitly cast to unsigned char before we do comparisons.
* Merge branch 'dbus-1.2'Thiago Macieira2009-04-281-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Bug 18446: Keep umask for session busMatt McCutchen2009-01-061-4/+9
| | | | | | | | Signed-off-by: Colin Walters <walters@verbum.org>
| * Various compiler warning fixesColin Walters2009-01-061-0/+1
| |
| * Add uid, pid, and command to security logsColin Walters2008-12-181-0/+96
| | | | | | | | | | | | | | | | Extend the current security logs with even more relevant information than just the message content. This requires some utility code to look up and cache (as a string) the data such as the uid/pid/command when a connection is authenticated.
| * Add syslog of security denials and configuration file reloadsColin Walters2008-12-121-0/+32
| | | | | | | | | | We need to start logging denials so that they become more easily trackable and debuggable.
| * Bug 17061: Handle error return from sysconf correctlyJoe Marcus Clarke2008-10-011-1/+5
| | | | | | | | | | | | | | | | | | * dbus/dbus-sysdeps-unix.c: * dbus/dbus-sysdeps-util-unix.c: Cast return from sysconf temporarily so we actually see -1. Signed-off-by: Colin Walters <walters@verbum.org>
* | Bug 19502 - Sparse warning cleanupsKjartan Maraas2009-04-211-1/+2
| | | | | | | | | | | | | | This patch makes various things that should be static static, corrects some "return FALSE" where it should be NULL, etc. Signed-off-by: Colin Walters <walters@verbum.org>
* | Bug 19307: Add missing syslog includeColin Walters2009-01-061-0/+1
| |
* | Various compiler warning fixesColin Walters2008-12-191-0/+1
| |
* | Add uid, pid, and command to security logsColin Walters2008-12-171-0/+96
| | | | | | | | | | | | | | | | Extend the current security logs with even more relevant information than just the message content. This requires some utility code to look up and cache (as a string) the data such as the uid/pid/command when a connection is authenticated.
* | Add syslog of security denials and configuration file reloadsColin Walters2008-12-121-0/+32
| | | | | | | | | | We need to start logging denials so that they become more easily trackable and debuggable.
* | Bug 18446: Keep umask for session busMatt McCutchen2008-11-101-4/+9
| | | | | | | | Signed-off-by: Colin Walters <walters@verbum.org>
* | Bug 17061: Handle error return from sysconf correctlyJoe Marcus Clarke2008-09-041-1/+5
|/ | | | | | | | | * dbus/dbus-sysdeps-unix.c: * dbus/dbus-sysdeps-util-unix.c: Cast return from sysconf temporarily so we actually see -1. Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 16727: Handle ERANGE for getgr; fixes user in many groupsMarc Brockschmidt2008-07-281-12/+46
| | | | | | | | | | Patch originally from Noèl Köthe. Modified by Colin Walters <walters@verbum.org> * dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-unix-utils.c: Use a while() loop to reallocate buffer if we get ERANGE return. This fixes the case where a user is in a large number of groups.
* add _dbus_geteuid to fix EXTERNAL authentication in setuid applicationsJohn (J5) Palmieri2008-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | 2008-01-14 John (J5) Palmieri <johnp@redhat.com> * Patch by Andrea Luzzardi <scox at sig11 dot org>: creates a _dbus_geteuid function to fix EXTERNAL authentication in setuid applications * dbus/dbus-sysdeps-unix.c (_dbus_geteuid): used to get the effective uid of the running program (_dbus_credentials_add_from_current_process): use geteuid instead of getuid (_dbus_append_user_from_current_process): use geteuid instead of getuid * dbus/dbus-sysdeps-util-unix.c (_dbus_change_to_daemon_user): use geteuid instead of getuid (_dbus_unix_user_is_at_console): use geteuid instead of getuid * dbus/dbus-sysdeps-win.c (_dbus_geteuid): add a windows equivilant that returns DBUS_UID_UNSET
* do not call audit_init() from bus/ directory from files in dbus/Havoc Pennington2007-10-191-1/+0
| | | | | | | | | | | | 2007-10-19 Havoc Pennington <hp@redhat.com> * bus/bus.c (bus_context_new): put the audit_init() in here instead, which I believe ends up being the same as where it was before, though I'm not sure I understand why it goes here. * dbus/dbus-sysdeps-util-unix.c (_dbus_change_to_daemon_user): remove audit_init() from here, this file can't depend on code in bus/ directory
* fd.o bug #12429 Reverse check to setpcap and only init audit if we were rootJohn (J5) Palmieri2007-10-031-2/+3
| | | | | | | | | * patch by Dan Walsh <dwalsh@redhat.com> * https://bugs.freedesktop.org/show_bug.cgi?id=12429 * Reverse we_were_root check to setpcap if we were root. Also only init audit if we were root. So error dbus message will not show up when policy reload happens. dbus -session will no longer try to send audit message, only system will.
* 2007-08-17 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-08-171-53/+91
| | | | | | | | | | | | | | | * tools/dbus-launch-x11.c (set_address_in_x11): fix from Michael Lorenz to use long not int with XChangeProperty format 32 * dbus/dbus-sysdeps-util-unix.c (_dbus_write_pid_to_file_and_pipe): factor this out, and use the same code in _dbus_become_daemon (where the parent writes the pid file and to the pid pipe) and in bus_context_new (where the daemon writes its own pid file and to its own pid pipe) * bus/bus.c (bus_context_new): close the pid pipe after we print to it. Also, don't write the pid to the pipe twice when we fork, someone reported this bug a long time ago.
* 2007-07-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-141-1/+1
| | | | * Add indent-tabs-mode: nil to all file headers.
* 2007-06-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-131-4/+100
| | | | | | | | | | | * configure.ac, bus/selinux.c, dbus/dbus-sysdeps-unix-util.c: add libaudit support, no clue what this means really but now we have it. Patches from Fedora package. * bus/bus.c (bus_context_new): move selinux initialization after changing to daemon user, patch from Fedora package * dbus/dbus-transport.c (auth_via_unix_user_function): fix a typo
* 2007-06-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-091-0/+92
| | | | | | | | | | | | | | | | | | | * bus/policy.c (bus_policy_create_client_policy): gracefully continue if the connection has no unix user - just don't apply any unix user dependent rules. * bus/config-parser.c: remove dbus-userdb.h usage * bus/bus.c: remove dbus-userdb.h usage * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated): support Windows user function; also, fix the logic for checking auth as root in the default auth code (broken in the previous commit) * dbus/dbus-connection.c (dbus_connection_set_windows_user_function): new function (dbus_connection_get_windows_user): new function
* 2007-06-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-091-5/+32
| | | | | | | | | | | | | | | | | | | * bus/dispatch.c (check_get_connection_unix_process_id): adapt since sysdeps-unix.h stuff isn't included anymore * bus/bus.c (bus_context_new): use more abstract functions to change user, so they can be no-ops on Windows * dbus/dbus-credentials.c, dbus/dbus-credentials.h, dbus/dbus-credentials-util.c: new files containing a fully opaque DBusCredentials data type to replace the old not opaque one. * configure.in (DBUS_UNIX): define DBUS_UNIX to match DBUS_WIN on windows * dbus/dbus-userdb.h: prohibit on Windows, next step is to clean up the uses of it in bus/*.c and factor out the parts of cookie auth that depend on it
* 2007-03-11 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-03-121-7/+10
| | | | | | | | | | | | | | * tools/dbus-launch.c (do_close_stderr): fix C89 problem and formatting problem * Mostly fix the DBusPipe mess. - put line break after function return types - put space before parens - do not pass structs around by value - don't use dbus_strerror after calling supposedly cross-platform api - don't name pipe variables "fd" - abstract special fd numbers like -1 and 1
* * dbus/dbus-sysdeps-util-unix.c (_dbus_become_daemon): fix _dbus_pid_fd check.Ralf Habacker2007-03-121-1/+1
|
* * bus/bus.c, bus/bus.h, bus/main.c, bus/test.c, dbus/dbus-sysdeps-unix.c, ↵Ralf Habacker2007-03-101-2/+2
| | | | dbus/dbus-sysdeps-util-unix.c, dbus/dbus-sysdeps-util-win.c, bus/dbus-sysdeps-win.c,dbus/dbus-sysdeps.h: renamed _dbus_xxx_pipe to _dbus_pipe_xxx, completed _dbus_pipe support.
* * configure.in: Add a check for DIR *dirp->dd_fdJohn (J5) Palmieri2006-11-021-1/+3
| | | | | | * dbus/dbus-sysdeps-util-unix: if HAVE_DDFD is defined use DIR *dirp->dd_fd else use DIR *dirp->__dd_fd. This takes care of both Solaris and Irix
* * configure.in: define _POSIX_PTHREAD_SEMANTICS on solarisJohn (J5) Palmieri2006-10-081-3/+6
| | | | | avoid using dirfd on systems that don't have dirfd (Patch by Brian Cameron <brian dot cameron at sun dot com>)
* * dbus/dbus-sysdeps-util-unix.c (dirent_buf_size): Add check forJohn (J5) Palmieri2006-10-021-0/+2
| | | | MAXNAMELEN for Mac OSX. (Patch from Jonas B <sanoix at gmail dot com>)
* * tools/Makefile.am: use @EXPANDED_DATADIR@ instead of @DATADIRNAME@John (J5) Palmieri2006-09-181-0/+4
|
* 2006-09-16 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-09-161-1/+2
| | | | | | | | | | * dbus/dbus-sysdeps-unix.h: small change to Peter's patch to make dbus-sysdeps-unix-util.c build, add unix-specific sysdeps header. * dbus/dbus-sysdeps.h, dbus-sysdeps-unix.c: patch from Peter Kümmel bug #8249 to make the sysdeps.h read/write/open/close functions specifically for sockets only, and move generic read/write/open/close into unix-specific code.
* * dbus/dbus-sysdeps-util-unix.c: Forgot to pass NULL as the secondJohn (J5) Palmieri2006-09-141-1/+1
| | | | parameter to _dbus_close
* * dbus/dbus-sysdeps-util-unix.c (_dbus_write_pid_file):John (J5) Palmieri2006-09-141-1/+1
| | | | use _dbus_close instead of close
* * dbus/dbus-sysdeps-util-unix.c (_dbus_directory_get_next_file):John (J5) Palmieri2006-09-131-12/+67
| | | | use threadsafe readdir_r instead of readdir
* * remove a bunch of todo items from the 1.0 listJohn (J5) Palmieri2006-09-111-1/+2
|
* * doc/TODO, various source files: Audited todo's and FIXME's andJohn (J5) Palmieri2006-09-061-2/+2
| | | | | | prepended the ones we should be looking at with 1.0. Those prepended with 1.0? need clerification or might not be needed for 1.0
* 2006-08-29 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-08-301-0/+740
* dbus/dbus-sysdeps-util.c, dbus/dbus-sysdeps-util-unix.c: change from Ralf Habacker to move UNIX-specific sysdeps into a separate file.