Pier Angelo Vendrame pushed to branch tor-browser-147.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
-
1d7f3225
by Pier Angelo Vendrame at 2026-02-05T14:41:51+00:00
2 changed files:
Changes:
| ... | ... | @@ -77,7 +77,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram, |
| 77 | 77 | mozilla::XREAppData::SanitizeNameForDBus(profileName);
|
| 78 | 78 | |
| 79 | 79 | aDestinationName =
|
| 80 | - nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get());
|
|
| 80 | + nsPrintfCString("org.torproject.%s.%s", aProgram, profileName.get());
|
|
| 81 | 81 | if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
|
| 82 | 82 | aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
| 83 | 83 | |
| ... | ... | @@ -91,7 +91,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram, |
| 91 | 91 | if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
|
| 92 | 92 | // We don't have a valid busName yet - try to create a default one.
|
| 93 | 93 | aDestinationName =
|
| 94 | - nsPrintfCString("org.mozilla.%s.%s", aProgram, "default");
|
|
| 94 | + nsPrintfCString("org.torproject.%s.%s", aProgram, "default");
|
|
| 95 | 95 | if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
|
| 96 | 96 | // We failed completelly to get a valid bus name - just quit
|
| 97 | 97 | // to prevent crash at dbus_bus_request_name().
|
| ... | ... | @@ -122,7 +122,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, |
| 122 | 122 | }
|
| 123 | 123 | |
| 124 | 124 | nsAutoCString pathName;
|
| 125 | - pathName = nsPrintfCString("/org/mozilla/%s/Remote", appName.get());
|
|
| 125 | + pathName = nsPrintfCString("/org/torproject/%s/Remote", appName.get());
|
|
| 126 | 126 | |
| 127 | 127 | static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
|
| 128 | 128 | RTLD_DEFAULT, "dbus_validate_path");
|
| ... | ... | @@ -133,7 +133,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, |
| 133 | 133 | }
|
| 134 | 134 | |
| 135 | 135 | nsAutoCString remoteInterfaceName;
|
| 136 | - remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get());
|
|
| 136 | + remoteInterfaceName = nsPrintfCString("org.torproject.%s", appName.get());
|
|
| 137 | 137 | |
| 138 | 138 | LOG(" DBus destination: %s\n", destinationName.get());
|
| 139 | 139 | LOG(" DBus path: %s\n", pathName.get());
|
| ... | ... | @@ -28,7 +28,7 @@ static const char* introspect_template = |
| 28 | 28 | "1.0//EN\"\n"
|
| 29 | 29 | "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
|
| 30 | 30 | "<node>\n"
|
| 31 | - " <interface name=\"org.mozilla.%s\">\n"
|
|
| 31 | + " <interface name=\"org.torproject.%s\">\n"
|
|
| 32 | 32 | " <method name=\"OpenURL\">\n"
|
| 33 | 33 | " <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n"
|
| 34 | 34 | " </method>\n"
|
| ... | ... | @@ -38,7 +38,7 @@ static const char* introspect_template = |
| 38 | 38 | bool nsDBusRemoteServer::HandleOpenURL(const gchar* aInterfaceName,
|
| 39 | 39 | const gchar* aMethodName,
|
| 40 | 40 | Span<const gchar> aParam) {
|
| 41 | - nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get());
|
|
| 41 | + nsPrintfCString ourInterfaceName("org.torproject.%s", mAppName.get());
|
|
| 42 | 42 | |
| 43 | 43 | if ((strcmp("OpenURL", aMethodName) != 0) ||
|
| 44 | 44 | (strcmp(ourInterfaceName.get(), aInterfaceName) != 0)) {
|
| ... | ... | @@ -131,7 +131,7 @@ static const GDBusInterfaceVTable gInterfaceVTable = { |
| 131 | 131 | HandleMethodCall, HandleGetProperty, HandleSetProperty};
|
| 132 | 132 | |
| 133 | 133 | void nsDBusRemoteServer::OnBusAcquired(GDBusConnection* aConnection) {
|
| 134 | - mPathName = nsPrintfCString("/org/mozilla/%s/Remote", mAppName.get());
|
|
| 134 | + mPathName = nsPrintfCString("/org/torproject/%s/Remote", mAppName.get());
|
|
| 135 | 135 | static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
|
| 136 | 136 | RTLD_DEFAULT, "dbus_validate_path");
|
| 137 | 137 | if (!sDBusValidatePathName ||
|
| ... | ... | @@ -205,7 +205,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName, |
| 205 | 205 | |
| 206 | 206 | mozilla::XREAppData::SanitizeNameForDBus(profileName);
|
| 207 | 207 | |
| 208 | - nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(),
|
|
| 208 | + nsPrintfCString busName("org.torproject.%s.%s", mAppName.get(),
|
|
| 209 | 209 | profileName.get());
|
| 210 | 210 | if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) {
|
| 211 | 211 | busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
| ... | ... | @@ -220,7 +220,8 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName, |
| 220 | 220 | |
| 221 | 221 | // We don't have a valid busName yet - try to create a default one.
|
| 222 | 222 | if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
| 223 | - busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default");
|
|
| 223 | + busName =
|
|
| 224 | + nsPrintfCString("org.torproject.%s.%s", mAppName.get(), "default");
|
|
| 224 | 225 | if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
| 225 | 226 | // We failed completelly to get a valid bus name - just quit
|
| 226 | 227 | // to prevent crash at dbus_bus_request_name().
|