| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The top-level form was left on screen after exit (this is visible only
on some types of terminal as vt100), breaking automated tests.
Fixes: b2fb80928e27dc29240e604bab4f391302fc71f3
|
|
|
|
|
|
|
|
|
|
| |
When the user runs nmtui and selects an operation (edit, connect or
set-hostname) from the initial menu, the expectation is that once the
operation terminates the initial menu is shown again, so that the user
can perform multiple operations (like creating a connection and
activating it) without quitting.
https://bugzilla.gnome.org/show_bug.cgi?id=763836
|
|
|
|
|
|
|
|
|
|
|
|
| |
For internal compilation we want to be able to use deprecated
API without warnings.
Define the version min/max macros to effectively disable deprecation
warnings.
However, don't do it via CFLAGS option in the makefiles, instead hack it
to "nm-default.h". After all, *every* source file that is for internal
compilation needs to include this header as first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- All internal source files (except "examples", which are not internal)
should include "config.h" first. As also all internal source
files should include "nm-default.h", let "config.h" be included
by "nm-default.h" and include "nm-default.h" as first in every
source file.
We already wanted to include "nm-default.h" before other headers
because it might contains some fixes (like "nm-glib.h" compatibility)
that is required first.
- After including "nm-default.h", we optinally allow for including the
corresponding header file for the source file at hand. The idea
is to ensure that each header file is self contained.
- Don't include "config.h" or "nm-default.h" in any header file
(except "nm-sd-adapt.h"). Public headers anyway must not include
these headers, and internal headers are never included after
"nm-default.h", as of the first previous point.
- Include all internal headers with quotes instead of angle brackets.
In practice it doesn't matter, because in our public headers we must
include other headers with angle brackets. As we use our public
headers also to compile our interal source files, effectively the
result must be the same. Still do it for consistency.
- Except for <config.h> itself. Include it with angle brackets as suggested by
https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
|
| |
|
| |
|
|
|
|
|
|
| |
Make /usr/bin/nmtui-* symbolic links to /usr/bin/nmtui.
https://bugzilla.gnome.org/show_bug.cgi?id=759824
|
|
|
|
|
|
|
|
|
|
| |
Up to now, the "include" directory contained (only) header files that were
used project-wide by libs, core, clients, et al.
Since the directory now also contains a non-header file, the "include"
name is misleading. Instead of adding yet another directory that is
project-wide, with non-header-only content, rename the "include"
directory to "shared".
|
| |
|
|
|
|
| |
by running "openconnect --authenticate" and getting secrets from it
|
|
|
|
|
|
|
| |
It should eventually move into libnm and ideally the data be obtained from VPN
plugins.
(No functional change, only moving the function).
|
|
|
|
|
| |
The file has not been used up to now. But it is going to be used by both
nmtui and nmcli later.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=756200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"nm-version-macros.h"
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy.
For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".
Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.
For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.
[1] https://github.com/hughsie/PackageKit/issues/85
Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b
|
|
|
|
|
|
|
|
|
|
| |
NetworkManager only allows one 'client:user-id' to register as secret
agent. Thus, when starting nmtui in two terminals, creating the secret
agent can fail.
This can lead to a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=755883
|
|
|
|
| |
Fixes: 19c3ea948a7c74774621baf62d68cb4826e1b97c
|
|
|
|
|
|
|
| |
The localization headers are now included via "nm-default.h".
Also fixes several places, where we wrongly included <glib/gi18n-lib.h>
instead of <glib/gi18n.h>. For example under "clients/" directory.
|
| |
|
|
|
|
|
|
| |
vpn-helper.c is currently not yet used. It was added for future
VPN support for nmtui. Refactor it to make use of the new vpn
helper functions in libnm.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than randomly including one or more of <glib.h>,
<glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include
"nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
nm-glib.h, include <gio/gio.h> from there, and then change all .c
files in NM to include "nm-glib.h" rather than including the glib
headers directly.
(Public headers files still have to include the real glib headers,
since nm-glib.h isn't installed...)
Also, remove glib includes from header files that are already
including a base object header file (which must itself already include
the glib headers).
|
|
|
|
| |
Fixes cdc8bd1.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=744853
|
|
|
|
|
|
| |
When there are no connections for a device, do not add the header.
https://bugzilla.redhat.com/show_bug.cgi?id=1119663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Program received signal SIGSEGV, Segmentation fault.
0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109
109 priv->ethernet_page = nmt_page_ethernet_new (conn, nmt_editor_page_device_get_device_entry (NMT_EDITOR_PAGE_DEVICE (dsl)));
Missing separate debuginfos, use: debuginfo-install libffi-3.0.10-3.fc18.x86_64 newt-0.52.15-1.fc19.x86_64
(gdb) bt
#0 0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109
#1 0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16203872, n_parameters=n_parameters@entry=2, parameters=parameters@entry=0xf74350)
at gobject.c:1741
#2 0x0000003e9ac16560 in g_object_new_valist (object_type=object_type@entry=16203872, first_property_name=first_property_name@entry=0x42e524 "connection",
var_args=var_args@entry=0x7fffffffcef8) at gobject.c:1830
#3 0x0000003e9ac16894 in g_object_new (object_type=16203872, first_property_name=first_property_name@entry=0x42e524 "connection") at gobject.c:1545
#4 0x000000000041b504 in nmt_page_dsl_new (conn=<optimized out>, deventry=deventry@entry=0x974690 [NmtDeviceEntry]) at nmt-page-dsl.c:47
#5 0x000000000041808e in nmt_editor_constructed (object=<optimized out>) at nmt-editor.c:355
#6 0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16174256, n_parameters=n_parameters@entry=4, parameters=parameters@entry=0xf6cec0)
at gobject.c:1741
...
(gdb) p priv
$1 = (NmtPageDslPrivate *) 0x0
|
| |
|
|
|
|
|
|
|
| |
We wait for each deletion to complete, so the connections were getting
removed from the connections array as we edited it (unlike with the
old transfer-container GSList-based code). Fix this by copying the
slaves out into their own list first.
|
|
|
|
|
| |
Coverity: Defect type: SWAPPED_ARGUMENTS
clients/tui/newt/nmt-newt-section.c:328: swapped_arguments: The positions of arguments in the call to "nmt_newt_widget_size_request" do not match the ordering of the parameters: * "&border_height" is passed to "width" * "&border_width" is passed to "height"
|
|
|
|
|
|
| |
Coverity:
Defect type: FORWARD_NULL
clients/tui/nmtui-edit.c:467: var_deref_op: Dereferencing null pointer "error".
|
| |
|
|
|
|
|
|
| |
As with NMVpnPluginOld, rename NMSecretAgent to NMSecretAgentOld, to
leave the name "NMSecretAgent" open for a new-and-improved version in
NM 1.2.
|
|
|
|
|
|
|
|
| |
nm_secret_agent_simple_enable()
set_connection_path() is almost always called right before enable(),
and it's unclear why it would be called anywhere else. So just
merge the two methods.
|
|
|
|
|
|
|
|
| |
nm_secret_agent_simple_*() functions should take an
NMSecretAgentSimple, not an NMSecretAgent.
The type macros were incorrectly validating against
NM_TYPE_SECRET_AGENT rather than NM_TYPE_SECRET_AGENT_SIMPLE.
|
|
|
|
|
|
|
| |
nmt-editor.c: In function ‘nmt_editor_constructed’:
nmt-editor.c:365:2: error: ‘page’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
add_sections_for_page (editor, grid, page);
^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an NmtEditorGrid row has a widget, but no label, then we make the
widget span both the label and widget columns. But previously we
weren't doing the same for rows with labels but no widgets. (In fact,
we didn't even allow rows with no widgets; label-only rows had to
specify dummy widgets.)
Fix it so that labels will span into an empty widget column. (This
ensures that a long section name won't force the entire grid to have
an overwide label column).
Also, in both the "no label" and "no widget" cases, still show the
"extra" column if it's present.
|
|
|
|
|
|
| |
Rather than having NmtEditor need to know that DSL requires a DSL
page, and Ethernet page, and a PPP page, just have the DSL page itself
return multiple sections.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having NmtEditorPage be a widget itself, have it just be an
object that returns a list of NmtEditorSections, where
NmtEditorSection is a subclass of NmtNewtSection.
(This will be important when adding VPN pages, which will be split up
into multiple sections, but with the different sections needing to
cooperate on updating the NMSettingVpn. This reorganization lets us
have an NMPageVpn containing multiple sections, with the NMPageVpn
object handling the coordination between the sections.)
|
|
|
|
|
|
| |
All page types except NmtPageMain are displayed as collapsible
sections. NmtPageMain behaved quite differently from everything else.
So merge it into its container, NmtEditor.
|
|
|
|
|
|
|
|
| |
Rename NmtPageDevice to NmtEditorPageDevice, and rename NmtPageGrid to
NmtEditorGrid.
Now all types with names starting with "NmtPage" are instantiable page
types, not abstract classes or low-level widgets.
|
|
|
|
|
|
|
|
|
|
|
| |
If we're activating the device without knowing the connection in advance, defer
servicing the requests for the secrets until we set the path.
[lkundrak@fedora20-2 ~]$ nmcli --ask c ifname wlan0
(process:18405): libnm-CRITICAL **: nm_object_get_path: assertion 'NM_IS_OBJECT (object)' failed
Error: Connection activation failed: The device has no connections available.
[lkundrak@fedora20-2 ~]$
|
|
|
|
|
|
|
|
| |
We were refreshing the list when the set of available devices changed,
or the set of active connections changed, but not when the set of
available connections changed.
https://bugzilla.gnome.org/show_bug.cgi?id=740333
|
|
|
|
|
|
|
|
|
|
|
| |
config.h should be included from every .c file, and it should be
included before any other include. Fix that.
(As a side effect of how I did this, this also changes us to
consistently use "config.h" rather than <config.h>. To the extent that
it matters [which is not much], quotes are more correct anyway, since
we're talking about a file in our own build tree, not a system
include.)
|
|
|
|
|
| |
When the Gateway field is empty, we need to set the property to NULL,
not "".
|
|
|
|
|
|
|
|
| |
Pop-up menus were slightly mis-aligned in the main window, and even
more mis-aligned in slave-editing windows. Fix that.
Also add a bit of padding to the pop-up window, because it just looks
better that way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since adding NMSettingIPConfig:gateway, we were just binding that
property to the Gateway entry as a string. But this caused two
different problems: first, we were trying to set the :gateway property
from the entry even when the IP address in the entry was incomplete
(causing warnings), and second, we were no longer enforcing the rule
that the gateway can only be set when there are static addresses
configured.
Fix this by adding back nm_editor_bind_ip_gateway_to_string(), but
with new semantics reflecting the new way NMSettingIPConfig:addresses
and :gateway work. (Besides just fixing the new bugs, this also makes
the Gateway entry insensitive when there are no addresses; before,
nmtui would allow you to type there, but the value would not be
saved.)
Fixes: Test263_nmtui_ipv4_addresses_delete_ip_and_back_to_auto
https://bugzilla.gnome.org/show_bug.cgi?id=740017
|
|
|
|
|
|
|
|
|
|
|
| |
When a connection is being activated, nmcli could ask for secrets for another
connection, which might confuse users. We check the request now and only ask
for secrets of connection being activated.
Test case:
$ nmcli con up my-ethernet0
Passwords or encryption keys are required to access the wireless network 'Red Hat'.
Warning: password for '802-1x.identity' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
|
|
|
|
|
|
| |
Now that "i" is being used in the first loop over all connections, we
need to reset it before using it again in the loop to find an
available name.
|
|
|
|
|
| |
Change NMIPRoute to use "-1" for "default", so that "0" is a valid
metric. Update everything for that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The gateway is a global property of the IPv4/IPv6 configuration, not
an attribute of any particular address. So represent it as such in the
API; remove the gateway from NMIPAddress, and add it to
NMSettingIPConfig.
Behind the scenes, the gateway is still serialized along with the
first address in NMSettingIPConfig:addresses, and is deserialized from
that if the settings dictionary doesn't contain a 'gateway' key.
Adjust nmcli's interactive mode to prompt for IP addresses and gateway
separately. (Patch partly from Jirka Klimeš.)
|
|
|
|
|
|
|
|
| |
Split a base NMSettingIPConfig class out of NMSettingIP4Config and
NMSettingIP6Config, and update things accordingly.
Further simplifications of now-redundant IPv4-vs-IPv6 code are
possible, and should happen in the future.
|
|
|
|
|
|
| |
Merge NMIP4Address and NMIP6Address into NMIPAddress, and NMIP4Route
and NMIP6Route into NMIPRoute. The new types represent IP addresses as
strings, rather than in binary, and so are address-family agnostic.
|