Commit Graph

992 Commits

Author SHA1 Message Date
Dan Williams
37a9303c2e libnm-util: fix hashing connections and settings
The first-level hash table key should be the setting name itself,
not the GType name of the setting's GObject.  There's probably a
better way to do this to reduce that confusion.
2011-01-27 10:37:01 -06:00
Dan Williams
e68e27aa75 libnm-util: add 'flags' argument to nm_connection_to_hash() and nm_setting_to_hash()
Simplifies code internally, and makes it easier for clients as well in
some cases where they want to control what ends up in the resulting
hash and what does not.
2011-01-26 14:14:37 -06:00
Dan Williams
b92e3cca6e build: fix distcheck with gobject introspection enabled 2011-01-26 11:26:08 -06:00
Giovanni Campagna
3ebecd2a29 introspection: add GObject introspection support (bgo #637032)
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.
2011-01-21 14:46:09 -06:00
Dan Williams
5dd4f1ea01 libnm-util: fix possible crash in nm_setting_update_secrets()
If a pointer to a valid GError was not passed the function could
crash.  Make it simpler and fix the possible crash by just converting
to hash table iters instead.
2011-01-19 18:17:40 -06:00
Dan Williams
2b65dcdf92 libnm-util: WiMAX setting requires a non-zero-length NSP name 2011-01-12 15:54:56 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams
694571a5c6 libnm-util: add defines for wifi modes 2011-01-09 02:00:29 -06:00
Dan Williams
0587ef1179 Merge remote branch 'origin/master' into wimax 2011-01-02 17:24:23 -06:00
Jiří Klimeš
b3800183b4 libnm-util: fix nm_utils_security_valid() checks for Ad-Hoc APs (rh #632123)
Without the fix fake Ad-Hoc APs created by nm-applet's "Create New Wireless
Network..." don't pass the check and nm-applet can crash.
2010-12-16 14:03:04 +01:00
Jiří Klimeš
d4ac3cd593 libnm-util: fix a memory leaks in nm_setting_to_string() 2010-12-13 20:55:02 +01:00
Dan Williams
09a6f45ead libnm-util: fix symbol visibility of nm_setting_connection_permissions_user_allowed 2010-11-18 12:29:50 -06:00
Dan Williams
ca063e4d0c libnm-util: add nm_setting_connection_permissions_has_user()
Utility function to determine whether a given username is in the ACL.
2010-11-18 10:36:18 -06:00
Dan Williams
cfaa80b261 Merge remote branch 'origin/master' into rm-userset 2010-11-16 18:08:48 -06:00
Dan Williams
389a297571 libnm-util: silence warning 2010-11-03 14:58:22 -05:00
Dan Williams
3d8b6acaba core: revert API parts of fe493ec91e
And add a default autoconnect retries value.
2010-11-03 13:23:09 -05:00
Jiří Klimeš
fe493ec91e core: add configurable auto connection retries (bgo #628825)
Presently, when automatic connecting fails, the connection is marked
as invalid and is not retried again. This commit adds a configuration
parameter to specify how many times the connection should be re-tried.
2010-11-03 16:22:55 +01:00
Dan Williams
8f699a77f2 libnm-util: check all valid permissions property types 2010-10-29 23:19:41 -05:00
Dan Williams
947efa3080 libnm-util: verify permissions property type
Connections are normally created from hashes using g_object_set()
which calls that object's set_property handler.  But GObject does
not allow errors to be returned from property handlers, so if the
type doesn't match what it should be, the property does not get
set, and error is printed to stdout, and life goes on.

But that's not what we want for the permissions property since the
client might expect that property to be set, but the connection now
is available to everyone.  So validate the permissions property
type (its really the only one we need to be so paranoid about)
and return an error when the incoming property type is wrong.
2010-10-29 22:31:23 -05:00
Dan Williams
8f7aedc7e0 Merge remote branch 'origin/master' into rm-userset 2010-10-18 19:02:27 -05:00
Dan Williams
82772191a9 libnm-util: simplify permissions somewhat; remove groups
Groups may come later, but they are also quite a bit more complicated
because getting the groups a user is in may require network access
if that user is backed by LDAP.  And it gets worse because you have
no idea that the glibc calls like getgrouplist(3) are backed by
the network and may take an arbitrary amount of time to complete.
Punt that.
2010-10-12 17:55:08 -05:00
Dan Williams
be97e7f104 build: include <config.h> for kill(2), isblank(3), and isascii(3)
config.h defines _GNU_SOURCE, which in turn defines the bits necessary
for kill, isblank, and isascii.  So wherever we use those, we need
to make sure config.h is included.
2010-10-08 22:46:55 -05:00
cee1
9ee77769af trivial: add missing includes 2010-10-08 16:43:16 -05:00
Dan Williams
8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
Dan Williams
a1731c6064 libnm-util: fix max APN length
It's not 20, it's DNS domain name length.
2010-09-22 13:44:18 -05:00
Dan Williams
0ec9bf2c73 libnm-util: enforce APN character restrictions
APNs can only contain alphanumeric characters, '.', and '-'.  To be
helpful we strip spaces off before setting the APN internally so that
previously (and incorrectly) valid APNs don't cause the whole
connection to fail validation and thus disappear.  The only case seen
in the wild was a Pelephone IL APN which erroneously had a trailing
space in the mobile broadband provider database.  Bad characters
cause the connection to fail with vague error messages about being
unable to activate the PDP context during PPP negotiation.
2010-09-22 13:20:02 -05:00
Daniel Gnoutcheff
94d26709cc WIP: libnm-util: added "permissions" property 2010-08-09 20:01:19 -04:00
Daniel Gnoutcheff
fa8c9304b5 libnm-*: remove user settings support
Remove code related to "connection scope" and such. Later, we will also
do lots of code flattening and simplification that's possible now that
user settings are gone.
2010-08-06 13:05:46 -04:00
Jiří Klimeš
707e2c84a3 doc: trivial fix in documentation of 's390-subchannels' property 2010-08-06 11:36:11 +02:00
Dan Williams
ec6d18ca66 libnm-util: bump soname for s390 updates 2010-08-03 15:56:01 -07:00
Dan Williams
f257c98193 libnm-util: register transform func for G_TYPE_STRV to GPtrArray
Needed for S390 subchannels property of the wired setting.
2010-07-28 10:05:22 -07:00
Dan Williams
4d43ce8fa0 Merge remote branch 'origin/master' into zvm 2010-07-27 23:24:10 -07:00
Dan Williams
bebf8d48b0 Revert "ip6: remove standalone DHCP method since DHCPv6 can't provide gateways" (rh #612445)
This reverts commit a729d2f649.

Turns out this is a valid IP config method that some sites use.
2010-07-27 21:43:42 -07:00
Dan Williams
81f030fe5b core: don't require PPP setting for PPPoE connections (bgo #623744)
The PPP setting will usually be all defaults anyway, so lets just
created it when needed if it doesn't yet exist.  Fixes an error
where the connection editor couldn't edit system DSL connections
because it tried to request secrets for the PPP setting that didn't
actually exist in the connection because the 'keyfile' plugin
wouldn't save all-default settings, thus that setting wouldn't
exist when read back in.
2010-07-21 15:55:33 -07:00
Dan Williams
16bccfd672 core: handle s390 options more cleanly
There are so many... so handle them as a table of key/value pairs
instead of having separate functions for each one.  At the moment
nothing but subchannels is used internally, but this allows plugins
to preserve options that NM doesn't care about when reading/writing
system configuration.
2010-06-29 00:37:14 -07:00
Dan Williams
e04281fdc7 Merge remote branch 'origin/master' into zvm 2010-06-28 22:46:22 -07:00
Dan Williams
6893b3d0dd libnm-util: ensure empty VPN secrets are not used (rh #587784) 2010-06-28 15:15:23 -07:00
Dan Williams
fd10f97d98 libnm-util: fix default s390 property values 2010-06-25 20:08:09 -07:00
Dan Williams
ac9d2804bd Merge remote branch 'origin/master' into zvm 2010-06-25 19:57:30 -07:00
Dan Williams
66319f616c libnm-util: add more necessary s390 properties 2010-06-24 11:59:40 -07:00
Jiří Klimeš
1b49f941a6 core: MAC address spoofing/cloning (rh #447827) (bgo #553771)
This commit implements MAC cloning feature in NetworkManager. To support that,
'PermHwAddress' property is added into *.Device.Wired and *.Device.Wireless
interfaces. The permanent MAC address is obtained when creating the device, and
is used for 'locking' connections to the device. If a cloned MAC is specified
in connection to be activated, the MAC is set to the interface in stage1. While
disconecting, the permanent MAC is set back to the interface.
2010-06-22 14:21:25 +02:00
Dan Williams
0b41797b49 s390: replace 'zvm' with s390
ZVM isn't the right terminology here.  s390 is.
2010-06-17 21:24:14 -07:00
Dan Williams
a5d8872c3e Merge remote branch 'origin/master' into zvm 2010-06-17 21:14:09 -07:00
Jiří Klimeš
12d26643e9 libnm-util: add nm_utils_wifi_* functions to handle frequencies/channels 2010-05-31 15:32:13 +02:00
Dan Williams
04370354f0 libnm-util: pretty-print DBUS_TYPE_G_ARRAY_OF_STRING 2010-05-26 17:04:32 -07:00
Dan Williams
9c45b52f38 libnm-util: add wired setting property for z/VM subchannel (rh #591533)
On s390 and z-Series, the hypervisor assigns the MAC address, so we
need to use subchannels to uniquely identify the device instead of
using the MAC address.
2010-05-26 15:31:01 -07:00
Dan Williams
7ffcb98afd doc: trivial fix 2010-05-26 01:20:20 -07:00
Dan Williams
71bae14f2c libnm-util: better error message about missing PPP setting 2010-05-26 00:32:05 -07:00
Dan Williams
22aee1ac8b libnm-util: remove useless semicolons 2010-05-26 00:30:32 -07:00
Dan Williams
7754690e7e libnm-util: use hash table iterators for simpler code 2010-05-26 00:28:26 -07:00