Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes BMC#25884
|
|
Functions that add and remove interfaces to and from bridges now return
an appropriate error code.
|
|
Functions that add and remove routes now return an appropriate error
code. EEXIST and ESRCH are ignored when adding and removing routes
(respectively) to reduce spurious error messages in the logs.
|
|
|
|
|
|
Use for all memory allocation/dealocation operation the glib
functions. This allows us to use g_mem_profile().
|
|
If the user never registered an agent, agent_sender and agent_path
are NULL. D-Bus does not handle this gracefully, instead it kills
ConnMan. So let's skip the D-Bus part in this case.
connmand[4271]: src/agent.c:connman_agent_driver_unregister() Sending release to (null) path (null) iface net.connman.Agent
process 4271: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 1198.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
connmand[4271]: Aborting (signal 6) [./src/connmand]
connmand[4271]: ++++++++ backtrace ++++++++
connmand[4271]: #0 0x3a9920f500 in /lib64/libpthread.so.0
connmand[4271]: #1 0x3a98e36285 in /lib64/libc.so.6
connmand[4271]: #2 0x3a98e37b9b in /lib64/libc.so.6
connmand[4271]: #3 0x3c7602fff5 in /lib64/libdbus-1.so.3
connmand[4271]: #4 0x3c76026fc1 in /lib64/libdbus-1.so.3
connmand[4271]: #5 0x3c76018aea in /lib64/libdbus-1.so.3
connmand[4271]: #6 0x45b8b1 in connman_agent_driver_unregister() at src/agent.c:426
connmand[4271]: #7 0x457b7c in __connman_service_cleanup() at src/service.c:6756
connmand[4271]: #8 0x43f54f in main() at src/main.c:702
connmand[4271]: #9 0x3a98e2169d in /lib64/libc.so.6
connmand[4271]: +++++++++++++++++++++++++++
|
|
|
|
Print out a warning on an unknown group and unknown keys in the "General"
group.
|
|
|
|
When adding an rfkill device which is unblocked, soft block it immediately
if offline mode is enabled or the technology (enable_persistent) is
disabled.
Fixes BMC#25858
|
|
With VPN connections being handled by connman-vpnd, -EINPROGRESS is a
valid value to report to the caller if the VPN is already connecting.
|
|
When we have no plugin assigned we have to call the final
session callback directly.
Since __connman_session_create() doesn't know if a plugin was
called or not, create_policy_config() or __connman_session_create()
needs to free all allocated resources (also in the error path).
|
|
This helps to make the error path more readable.
|
|
We need to call those function from create_policy_config() therefore
more it in front of it.
|
|
In the case the callback is directly called we can use the
return value to provide it to the user.
|
|
There is no need to unref the pending message, because in all
cases we generate a reply message which takes care of unrefing
the message. Hence the dbus_message_unref() is not needed.
Furthermore, we need to pass the created error message to the bus
via g_dbus_send_message() so that the client gets always a response.
|
|
The error codes propagated over D-Bus are non-negative values.
|
|
free_session() will be also called from the error path (e.g.
__connman_session_create()). In case we have added a watch
we need to disarm it.
|
|
|
|
|
|
If the user provides the match all rule we should add the policy
bearer to the result.
|
|
Don't overwrite the user provided AllowedBearers
configuration. Instead just store it at session level. So we always
will apply the bearer filter on the user input.
Obviously, this might need some more improvements on how we want
to handle the AllowedBearers behavior when the policy plugin and
the application provide a configuration. For exmaple should
we update the AllowedBearers if the policy changes or just always
show only the user input. This patch is not perfect but it
improves the situation clearly.
|
|
Whenever a configuration gets invalid (e.g. a configuration
is removed) then we need to be able to drop back to the
default configutation.
|
|
We want to reuse these functions.
|
|
|
|
The error handling can get easily get pretty hairy, e.g.
reallocating memory for allowed_bearers. If we hit this situation
we allow the plugin to shutdown the session. That is consistent
with what we do when there is a problem while creating a new
session.
|
|
Give a policy plugin a way to inform the session core that
some of the config values have changed.
This could be done in a more clever way, e.g. figure out only
to update the necessary info entries but we keep it for now
as simple and assume everthing has changed.
|
|
ConnMan needs to identify application in a secure way when they are
using the Session API. The current D-Bus server implemention supports
two types of LSM, POSIX and SELinux. In order to support SMACK or
TOMOYO the D-Bus code base needs to be patch. This is the initial work
to support at least POSIX and SELinux. Maybe in the future we are able
to support also the other LSMs.
The idea behind gsec is to keep the LSM related code together in one
directory. The API introduces in this patch is not any way final. It
will need some more time figuring out how are able to intregrate this
in a nice way.
The current API introduces g_sec_get_selinux_label() which will return
the SELinux context. The function will issuing a
GetConnectionSELinuxSecurityContext method call.
Note, that this function is not documented in the D-Bus
specification. See for more details the source code dbus/bus/drivers.c
and dbus/bus/selinux.c in the D-Bus reference implementation.
|
|
When we do not watch watch for IN_MOVED_TO or IN_MOVED_FROM we can
easily inconsistent. The user creates a file and moves it then
from the watched directory. We wouldn't see this change and therefore
keep the configuration. That is a rather anoying behavoir
for the policy plugin.
|
|
The inotify code will be used by the core (config.c) and the session
policy plugin. We introduce a new API for file modifcation
notifcation.
We move the factored out code part from the last patch into a new file
and also change the inotify code so that it allows to monitor not only
STORAGEDIR. When registering a new observer, the callee has to tell
which directory should be watched. inotify.c will group the observers
together.
|
|
The inotify code can be reused. So before we introduce a new generic
inotify API, let's factor out in order to simplify the review process.
|
|
We need to set the provider into idle state when removing,
otherwise the default route will not be set properly after
provider removal.
Fixes BMC#25658
|
|
gcc complains about missing definition for malloc.
|
|
If the interface name is not set, then it is no use
checking if the interface would be ignored.
The interface name is not set if the interface is being
taken down and we get NEWLINK message with NULL interface.
Fixes BMC#25865
|
|
We must cleanup the plugin first before cleaning up the provider
because the vpn plugin needs providers from provider hash.
|
|
|
|
|
|
Because the vpnd Create() in manager API only creates and does
not connect the vpn, we must do the connect part after the
vpn is created. This requires a callback which is called when
the connection is established. Eventually this patch becomes
obsolete because the CreateProvider() connman API is deprecated.
|
|
The VPN configuration API is provided by connman-vpnd instead
of connmand.
|
|
|
|
The server and user route handling is refactored in order to
reflect the vpn dbus API changes. The routes are now array of
dicts in dbus API.
|
|
The ipconfig is marked as fixed when IP address is set to
that ipconfig.
|
|
|
|
The VPN support functionality is moved into connman-vpnd.
|
|
The VPN needs to be able to call the provider disconnect.
|
|
|
|
This allows the correct output when the log functions
are used from separate vpn daemon.
|
|
The device creation function should be part of device.c and
not inet.c. After this change the inet.c can be used by
separate vpn daemon.
|
|
Done so that connman_ipaddress_* functions can be used from
separate vpn daemon.
|