Commit graph

105 commits

Author SHA1 Message Date
Dan Williams
4e4bfeb499 core: add nm-secrets-flags.h for secret agent flags typedef
Make it clearer what's going on instead of using flags here and there
and numbers elsewhere.
2011-03-29 22:53:22 -05:00
Dan Williams
78df8c49a1 settings: name the default wired connection "Wired connection x"
Where 'x' is a number that's not yet used by any existing connection.
And clean up the default wired class initialization.  This name is
more friendly than "Auto eth0" which was confusing to quite a few
people.  This also checks to ensure there's no other connection with
the same name, which the old method did not.

Suggested by Jon McCann.
2011-03-27 16:57:14 -05:00
Dan Williams
6cbb44bc97 ifcfg-rh: fix some missing tests in tarball
The tests were missing, and because of the way the test was structured,
the tests passed.
2011-03-21 17:44:47 -05:00
Dan Williams
d815cb9f33 logging: fix format string/argument disagreement
Now that the logging fixes make format checking actually work, fix
the issues it brings up.
2011-03-19 12:44:14 -05:00
Mu Qiao
8d60cafd18 ifnet: fix tests and distcheck 2011-03-17 11:05:46 -05:00
Dan Williams
c3dc2a0608 agents: only commit connection changes if there were system secrets
It's pointless to save the connection if there weren't any system
secrets being changed.
2011-03-16 20:53:49 -05:00
Dan Williams
e89a50d779 agents: don't complain when there aren't any system secrets 2011-03-16 20:53:13 -05:00
Mu Qiao
08b2fa5401 ifnet: plugin updates and shared connection support 2011-03-16 15:39:13 -05:00
Kjartan Maraas
b224ab8e56 trivial: let g_free and g_strdup handle NULL (bgo #644763) 2011-03-15 00:08:58 -05:00
Kjartan Maraas
c2b4b9c1d7 build: fix return types (bgo #644665)
Some functions were returning FALSE or 0 instead of NULL.
2011-03-14 01:05:51 -05:00
Kjartan Maraas
6d0d302916 build: do the right thing with config.h (bgo #644664)
1) it shouldn't be included in headers
2) it should be the first thing included in source files
3) it's needed for getting translation right
2011-03-14 01:01:22 -05:00
Dan Williams
af7e26b39a ifcfg-rh: fix reading and writing of Dynamic WEP with EAP-LEAP connections
These are distinct from old-school LEAP (ie, Network EAP) in that
they are standard Dynamic WEP with LEAP as an EAP method and use
open-system authentication.  Old LEAP uses the non-standard LEAP
authentication algorithm.  The config for each is different and thus
we need to make sure we handle both cases.
2011-03-14 00:25:14 -05:00
Dan Williams
eaeb43bfad keyfile: ignore temp files ending with ~ 2011-03-13 23:59:09 -05:00
Michael Biebl
8119ecf6b0 core: depend on stable gudev API 2011-03-10 03:19:27 -06:00
Dan Williams
5c260cfe4a keyfile: trivial whitespace fixes 2011-03-08 10:19:01 -06:00
Dan Williams
9a3d762fdf settings: fix some code that required glib 2.26
Should be compatible with at least glib 2.24 and hopefully earlier.
2011-03-08 10:18:29 -06:00
Jiří Klimeš
c207d020f7 core: use nm_connection_get_id() and nm_connection_get_uuid() to simplify code 2011-03-08 13:41:28 +01:00
Jiří Klimeš
78b1260af4 ifcfg-rh: fix testcases now that timestamps are no longer written
Timestamps are no longer written to the connection file itself, but
are kept in a lookaside file in /var to allow for read-only or
stateless /etc and to ease system administration and deployment.
2011-03-08 11:58:00 +01:00
Jiří Klimeš
2e3e171171 ifcfg-rh: get rid of LAST_CONNECT
timestamps are now kept in /var/log/NetworkManager/timestamps
2011-03-08 11:49:49 +01:00
Jiří Klimeš
83d8677963 core: timestamp handling - don't touch /etc when updating timestamps (bgo #637825)
NM updates timestamp for active connections every 5 min. We don't
want to touch files in /etc due to this. This commit solves that
by not updating timestamp in the connection's property. Rather it
updates the timestamp internally. All timestamps are also kept track
of in /var/lib/NetworkManager/timestamps file.
When settings are requested via D-Bus GetSettings(), the proper
timestamp is put in the connection setting before returning.
2011-03-08 10:37:44 +01:00
Michael Biebl
f2f406b316 ifupdown: normalize keys using - or _ (debian #609831) 2011-03-07 09:57:05 -06:00
Daniel Trebbien
96044f7d94 ifupdown: use new logging API 2011-03-05 00:02:43 -06:00
Mikhail Efremov
77eeb95233 settings: don't dereference NULL pointer on request removal 2011-03-05 00:01:01 -06:00
Dan Williams
5bce4adfbb ifcfg-rh: clean up temporary testcase certificates files (fixes distcheck) 2011-03-03 19:15:49 -06:00
Dan Williams
9e45d7c8cb ifcfg-rh: test writing TLS secret flags and reading them back in 2011-03-03 18:37:33 -06:00
Dan Williams
e165511ed8 ifcfg-rh: fix handling of private key password secret flags 2011-03-03 17:32:29 -06:00
Dan Williams
bc4d3482e1 ifcfg-rh: handle secret flags
Some adjustments need to be made to read and write secret flags, and
to ensure that connections that don't have system-owned secrets are
still parsed as expected.  testcases for 802.1x connections to come
shortly.
2011-03-03 12:29:37 -06:00
Dan Williams
ecca85066d keyfile: write certificates and keys in a human-readable manner
Write actual paths, not integer lists.  When given certificate or
key blobs, write those out to files and put the path to that file
into the keyfile.
2011-03-03 00:03:44 -06:00
Dan Williams
e3cddc8d9f keyfile: allow paths to be used for certificates and private keys
No reason it should have to be bare byte arrays, ick.
2011-03-02 23:44:27 -06:00
Dan Williams
c9246b53ff ifcfg-rh: fix leak writing out certificate blobs 2011-03-02 23:39:42 -06:00
Dan Williams
97053ccb8c ifcfg-rh: consolidate variable definition 2011-02-28 17:51:52 -06:00
Dan Williams
781ea63209 ifcfg-rh: clean up EAP-TLS reading 2011-02-28 17:50:32 -06:00
Dan Williams
223b87b28d ifcfg-rh: shorten variable name 2011-02-28 17:47:29 -06:00
Dan Williams
a1a5342f1d ifcfg-rh: get rid of useless EAP reader prototypes
Shuffle stuff around and we don't need these prototypes.
2011-02-28 16:07:36 -06:00
Dan Williams
677cb1aaba keyfile: fix tests for no-longer-required serial and PPP settings 2011-02-25 12:52:28 -06:00
Dan Williams
125540471b core: don't require serial and PPP settings for mobile broadband
If they are there, use them.  If not, make them up on the fly.
2011-02-25 11:24:20 -06:00
Dan Williams
eab5851145 libnm-util: remove nm_warning/nm_info/nm_error macros
Clients need to do their own logging using glib or whatever; these
macros while somewhat helpful were not flexible and are not a
substitute for actual logging in the client.  g_warning, g_message,
and g_error are more suitable anyway.
2011-02-23 11:42:04 -06:00
Dan Williams
b599e3e5dc libnm-util: simplify nm_utils_ssid_to_utf8()
It's always used with a GByteArray anyway, as are most
functions in nm-utils.h.  Even better, we can skip the
memcpy since it turns out to be pointless.
2011-02-23 11:24:58 -06:00
Dan Williams
30f39c172b ifcfg-rh: remove pointless log message
It's just noise, and would get printed whenever the backing file
changed on-disk, even if the contents didn't change.
2011-02-23 00:02:17 -06:00
Dan Williams
47bc080af8 settings: fix connection removed signal for default wired connection
Somewhat confusingly named signals...
2011-02-15 12:27:52 -06:00
Dan Williams
9d79387966 ifnet: clean up after tests by removing generated files 2011-02-15 12:04:42 -06:00
Dan Williams
5bcb0832e5 settings: move system-settings/plugins => src/settings/plugins 2011-02-15 11:55:34 -06:00
Dan Williams
f82f0aa654 settings: fix NewConnection signal emission 2011-02-11 22:26:14 -06:00
Dan Williams
4d2957b3ae settings: fix NMSettingsConnection D-Bus Remove signal emission
We can't unregister the object with the bus during the remove signal,
because dbus-glib doesn't send the signal out over the bus until late
in the signal emission process, after we've unregisterd the object.
Thus the signal doesn't go out.  Fix that.
2011-02-11 22:26:12 -06:00
Dan Williams
76147fc5e1 settings: use the right permission for connection updates that change visibility
Make sure to use modify.system if the Update request changes the
visibility of the connection, since that update request would
affect more users than just the caller.
2011-02-11 22:26:08 -06:00
Dan Williams
a21c01a243 settings: check harder for system-owned secrets when validating agents
Can't just check whether we have existing system secrets, because
that doesn't catch the case for a completely new connection where
there may not be any secrets yet, but any that we do get should
be system-owned.
2011-02-11 22:26:07 -06:00
Dan Williams
dede4d3948 settings: fix warnings when no existing secrets are present
Since the hash table will be NULL in that case, don't try to do
anything with it.
2011-02-11 22:26:06 -06:00
Dan Williams
562dc6e0b6 settings: check modify 'own' not 'system' for personal connections
When a connection is visible only to one user, check 'own' instead
of 'system', allowing 'own' to be less restrictive since the change
won't affect any other users.
2011-02-11 22:26:05 -06:00
Dan Williams
016c56078d policy: rename HOSTNAME_MODIFY -> MODIFY_HOSTNAME for consistency 2011-02-11 11:32:57 -06:00
Dan Williams
f2c317e3d2 policy: rename "modfiy" permission to "modify system"
Meaning stays the same, but this will allow us to differentiate
in the future between personal connections (ie, just visible to
one user) and system connections (visible to more than one user).
2011-02-11 11:19:02 -06:00