mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-11 14:10:34 +01:00
* Released 0.92
* dbus/dbus-threads.c (dbus_threads_init): change the documentation to reflect the init late change * bus/bus.c (bus_context_new): Check user before we fork so we can print out an error message a user will be able to see
This commit is contained in:
parent
7cd5291944
commit
79b1e99664
4 changed files with 52 additions and 22 deletions
12
ChangeLog
12
ChangeLog
|
|
@ -1,3 +1,15 @@
|
|||
2006-08-18 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* Released 0.92
|
||||
|
||||
2006-08-18 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* dbus/dbus-threads.c (dbus_threads_init): change the documentation
|
||||
to reflect the init late change
|
||||
|
||||
* bus/bus.c (bus_context_new): Check user before we fork so we can
|
||||
print out an error message a user will be able to see
|
||||
|
||||
2006-08-18 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
Patch provided by Ralf Habacker (ralf dot habacker at freenet dot de)
|
||||
|
|
|
|||
16
NEWS
16
NEWS
|
|
@ -1,3 +1,19 @@
|
|||
D-Bus 0.92 (18 August 2006)
|
||||
==
|
||||
- Proper thread locking added to pending calls
|
||||
- Threading semantics changed from init early to init before the second thread
|
||||
is started
|
||||
- Correctly error out when an application tries to acquire or release the
|
||||
org.freedesktop.DBus name instead of sending false result codes
|
||||
- kqueue directory watching code can now be used to monitor config file changes
|
||||
on FreeBSD
|
||||
- --with-dbus-daemondir configure switch added so the daemon can be installed
|
||||
separate from the user binaries
|
||||
- Makefiles fixed for cygwin
|
||||
- Various fixes for the ongoing Windows port
|
||||
- Fixed docs and comments to use the D-Bus spelling instead of D-BUS
|
||||
- Many memleaks and bugs fixed
|
||||
|
||||
D-Bus 0.91 (24 July 2006)
|
||||
==
|
||||
- Remove some lingering bits left over from the bindings split
|
||||
|
|
|
|||
38
bus/bus.c
38
bus/bus.c
|
|
@ -531,7 +531,8 @@ bus_context_new (const DBusString *config_file,
|
|||
{
|
||||
BusContext *context;
|
||||
BusConfigParser *parser;
|
||||
|
||||
DBusCredentials creds;
|
||||
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
|
||||
context = NULL;
|
||||
|
|
@ -657,7 +658,25 @@ bus_context_new (const DBusString *config_file,
|
|||
BUS_SET_OOM (error);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
||||
/* check user before we fork */
|
||||
if (context->user != NULL)
|
||||
{
|
||||
DBusString u;
|
||||
|
||||
_dbus_string_init_const (&u, context->user);
|
||||
|
||||
if (!_dbus_credentials_from_username (&u, &creds) ||
|
||||
creds.uid < 0 ||
|
||||
creds.gid < 0)
|
||||
{
|
||||
dbus_set_error (error, DBUS_ERROR_FAILED,
|
||||
"Could not get UID and GID for username \"%s\"",
|
||||
context->user);
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now become a daemon if appropriate */
|
||||
if ((force_fork != FORK_NEVER && context->fork) || force_fork == FORK_ALWAYS)
|
||||
{
|
||||
|
|
@ -749,21 +768,6 @@ bus_context_new (const DBusString *config_file,
|
|||
*/
|
||||
if (context->user != NULL)
|
||||
{
|
||||
DBusCredentials creds;
|
||||
DBusString u;
|
||||
|
||||
_dbus_string_init_const (&u, context->user);
|
||||
|
||||
if (!_dbus_credentials_from_username (&u, &creds) ||
|
||||
creds.uid < 0 ||
|
||||
creds.gid < 0)
|
||||
{
|
||||
dbus_set_error (error, DBUS_ERROR_FAILED,
|
||||
"Could not get UID and GID for username \"%s\"",
|
||||
context->user);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (!_dbus_change_identity (creds.uid, creds.gid, error))
|
||||
{
|
||||
_DBUS_ASSERT_ERROR_IS_SET (error);
|
||||
|
|
|
|||
|
|
@ -480,12 +480,10 @@ init_locks (void)
|
|||
* the D-Bus library will not lock any data structures.
|
||||
* If it is called, D-Bus will do locking, at some cost
|
||||
* in efficiency. Note that this function must be called
|
||||
* BEFORE using any other D-Bus functions.
|
||||
* BEFORE the second thread is started.
|
||||
*
|
||||
* This function may be called more than once, as long
|
||||
* as you pass in the same functions each time. If it's
|
||||
* called multiple times with different functions, then
|
||||
* a warning is printed, because someone is confused.
|
||||
* This function may be called more than once. The first
|
||||
* one wins.
|
||||
*
|
||||
* @param functions functions for using threads
|
||||
* @returns #TRUE on success, #FALSE if no memory
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue