The comparison to decide whether or not to reuse the name buffer when
renaming a rootfs entry was reversed. For renames where the new name
was longer than the old one this resulted in writing beyond the name
buffer and corrupting random kernel memory.
A likely candidate for this to be triggered was when a audio cd was
renamed due to a CDDB lookup, as the placeholder "Audio CD" is quite
short and the actual CD name is usually longer.
Fixes: #10259. Possibly fixes the related #9528 and #9858.
* BNetworkSettings now set unspecified addresses to their empty family
specific addresses, instead of using AF_UNSPEC.
* This allows the net_server to set those addresses on the address
specific stack interface.
* Until now, only AF_UNSPEC addresses could be empty.
* Now, the unspecified IPV4/IPv6 address is considered empty, too.
* This corresponds to how the kernel modules handles this.
* _AddParameter() would ignore all BMessage::Add*() errors.
* _ConvertFromDriverParameter() would ignore most intermediate error,
but would fail badly over some incorrect settings file.
* Also, it checked for the parent value for each parameter, which
doesn't make any sense, but would add as often as there are
parameters -- which also may be none, in which case the value
got ignored.
* DNS add-on does not yet support it, the rest does.
* However, there seems to be some problems with the net_server when
changing interfaces -- not just with revert.
* And call it from the DNS client -- this is the only add-on that does
not trigger a configuration or settings update, so we have to notify
the changes manually.
* Otherwise there is nothing to it.
* Removed comment and commented out invalidation. Seems to work
just fine without it, and I cannot think of a reason why it should
be there.
* When you press the enable/disable button, it now stays disabled
for half a second before it is updated, and reenabled again.
* This is done so that the net_server has time to update its internal
state, so that it should look correct right from the start, even if
the server does not immediately react to the changes.
* Now uses the BNetworkServiceSettings::IsRunning() method.
* Added IsRevertable(), and Revert(), methods.
* Get{Interface|Network|Service}() methods are now const.
* Added variants of Interface(), and Service() that are const.
* Added new BNetworkServiceSettings::IsRunning() convenience method that
reflects the status quo rather than the settings.
* GetMessage() now checks if the only existing address is the default
wildcard address, and then omits it in the message (as it will be
created by default, anyway).
* If it does not exist yet, the sshd user is created upon enabling
the service.
* Also, it now uses kMsgIsServiceRunning to determine the current
label/function of the enable/disable button.
* Added BNetworkInterfaceListItem that can be used by interface protocol
add-ons to represent their functionality in the list view.
* It will automatically update itself on changes, and will show the
specified label, and address, if any, as well as indicate whether or
not the family has been disabled (which doesn't work perfectly yet,
as IFF_AUTO_CONFIGURED is on the interface level).
* Therefore, the interface list item will no longer show the address,
but the type of the device instead.
* Introduced the BNetworkConfigurationListener interface that is used
to broadcast network updates to.
* Via the BNetworkSettings class.
* The static IP mode still requires an extra apply button.
* IP input is not validated at all yet, we could also automatically
fill in the network mask once the IP has been entered.
* You can now optionally specify a converter that does the actual
message to settings conversion, and vice versa.
* This allows for more sophisticated and custom conversions.
* Network now monitors all network, and network settings changes, and
will notify all add-ons about those changes.
* Removed the global apply button. Instead, the static IP configuration
now got that button. All other changes will be instant.
* Added (still incomplete) helper classes for the settings messages.
* The net_server now uses these classes for its interfaces, and services.
* Renamed service_address to service_connection, as that better matches
what it is used for.
* As experimental API class BNetworkSettings.
* Added add/remove methods for interfaces, and services, too.
* Moved the conversion of the wireless networks into the settings class,
too, so that it only gives out converted ones (but accepts both
variants).
* Completely superfluous and expensive for BListView items, and just
wrong for BOutlineListView items.
* Also increased the width of the item, as we must take the tree offset
into account ourselves (really, great API).
* The interfaces logic is within the main application, so is the
new interface view.
* Disabling/renegotiating does not work yet.
* Reveals a bug in some interface code; when you click on an ethernet
device first, there is no place for the wireless menu. When you then
press on a wireless device, it crashes in BMenuField code.
In the other direction, there is then an empty space.
* Fixed list item width reporting.
* Fletched out new add-on API.
* Moved InterfaceListItem from the interfaces add-on into the
application.
* Renamed NetworkSetup* to Network* respectively NetworkSettings*.
* Added an extra looperName argument to the private BApplication
constructor that BServer is using.
* This is now used to fix the ugliness that gave the registrar
a different looper name, and even saves a string comparison.
It appears I was a bit too hasty in hrev48850, as if I had looked more
closely I would have noticied that this code depended on the menu bar
being initialized to function correctly.
Fixes#11914.