Confirmed users
971
edits
| Line 10: | Line 10: | ||
=== Overview === | === Overview === | ||
=== Random Notes To Be Edited === | |||
Random notes, restructure: | Random notes, restructure: | ||
| Line 23: | Line 23: | ||
* Exploit faulty permission checks so that normal apps can send or receive messages | * Exploit faulty permission checks so that normal apps can send or receive messages | ||
* Force a part of the software to emit messages | * Force a part of the software to emit messages | ||
In Gecko, components can inherit from mozilla::ipc::UnixSocketConsumer and then use BroadcastSystemMessage to send out system messages. For example BluetoothHfpManager does this: | |||
gecko/dom/bluetooth/BluetoothHfpManager.cpp | |||
424 void | |||
425 BluetoothHfpManager::NotifyDialer(const nsAString& aCommand) | |||
426 { | |||
427 nsString type, name; | |||
428 BluetoothValue v; | |||
429 InfallibleTArray<BluetoothNamedValue> parameters; | |||
430 type.AssignLiteral("bluetooth-dialer-command"); | |||
431 | |||
432 name.AssignLiteral("command"); | |||
433 v = nsString(aCommand); | |||
434 parameters.AppendElement(BluetoothNamedValue(name, v)); | |||
435 | |||
436 if (!BroadcastSystemMessage(type, parameters)) { | |||
437 NS_WARNING("Failed to broadcast system message to dialer"); | |||
438 return; | |||
439 } | |||
440 } | |||
=== Architecture === | === Architecture === | ||