ALT Linux Bugzilla
– Attachment 5736 Details for
Bug 28277
Нельзя снять блокировку экрана e17
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Добавляет в libdbus функцию для явного указания адреса шины
dbus_setup_session_address.patch (text/plain), 1.87 KB, created by
manowar@altlinux.org
on 2013-02-14 02:54:46 MSK
(
hide
)
Description:
Добавляет в libdbus функцию для явного указания адреса шины
Filename:
MIME Type:
Creator:
manowar@altlinux.org
Created:
2013-02-14 02:54:46 MSK
Size:
1.87 KB
patch
obsolete
>diff --git a/dbus/dbus-bus.h b/dbus/dbus-bus.h >index 02a9571..6509b5f 100644 >--- a/dbus/dbus-bus.h >+++ b/dbus/dbus-bus.h >@@ -88,6 +88,9 @@ void dbus_bus_remove_match (DBusConnection *connection, > const char *rule, > DBusError *error); > >+DBUS_EXPORT >+void dbus_setup_session_address (const char *addr); >+ > /** @} */ > > DBUS_END_DECLS >diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c >index b4ecc96..d50dc84 100644 >--- a/dbus/dbus-sysdeps-unix.c >+++ b/dbus/dbus-sysdeps-unix.c >@@ -3654,6 +3654,22 @@ _dbus_lookup_session_address_launchd (DBusString *address, DBusError *error) > #endif > > /** >+ * Sets up the custom session bus address. >+ * >+ * This function is tend to be used by setuid/setgid >+ * programs to explicitly set up the desired bus address. >+ * To avoid security violations the address should be first >+ * carefully checked. >+ */ >+ >+static const char *custom_session_address = NULL; >+void >+dbus_setup_session_address(const char *addr) >+{ >+ custom_session_address = addr; >+} >+ >+/** > * Determines the address of the session bus by querying a > * platform-specific method. > * >@@ -3681,11 +3697,17 @@ _dbus_lookup_session_address (dbus_bool_t *supported, > *supported = TRUE; > return _dbus_lookup_session_address_launchd (address, error); > #else >- /* On non-Mac Unix platforms, if the session address isn't already >- * set in DBUS_SESSION_BUS_ADDRESS environment variable, we punt and >- * fall back to the autolaunch: global default; see >- * init_session_address in dbus/dbus-bus.c. */ >- *supported = FALSE; >+ if (!custom_session_address) >+ *supported = FALSE; >+ else >+ { >+ *supported = TRUE; >+ if (!_dbus_string_append (address, custom_session_address)) >+ { >+ _DBUS_SET_OOM (error); >+ return FALSE; >+ } >+ } > return TRUE; > #endif > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28277
: 5736 |
5737
|
5796