ifcfg-rh: use single quotes when quoting WPA passphrases (WPA_PSK) (rh #798102)

Single quotes ensure we don't break initscripts (bash processing) when the
string contains special characters. Special handling is necessary for single
quotes characters. They have to be escaped and the whole string has to be
prepended with '$' character so that bash is happy.
This change also filters out CR and LF characters as they break WPA_PSK
variable and could pose security issues.
wifi: fix entering an endless loop
vlan: try harder to get carrier state at device creation time

The carrier signal might be delayed a bit, so if we're creating
the device as a result of activating a connection, make sure the
carrier is up-to-date so we can proceed with activation.
libnm-glib: add NMDeviceVlan

And fix a small bug with bond devices too if their device type
isnt' set at construction time.
cli: add VLAN device support
libnm-glib: simplify setting device-type property

Instead of having the superclass check the GObject type
and translate that into an NMDeviceType, have each subclass
set its own device type.
Revert "wifi: fix entering an endless loop"

This reverts commit 84403ab84a0b5a0ce34594e5203b983da855ed0d.

It appears we want to loop until one of the callback says we're
done, while this patch would exit too early (possibly before we'd
received a reply) since nl_recvmsgs() returns 0 on success.  What
we really want do do here is wait for one of the callbacks we've
registered to tell us that they've successfully handled the message
and gotten a reply.
wifi: fix entering possible endless loop

Clarify how we're supposed to break out of the nl_recvmsgs() loop
and also break out if we get an error from nl_recvmsgs().  What's
supposed to happen is that one of the callbacks we've registered
figures out that we're done and sets the 'done' flag, which then
breaks out of the recvmsgs() loop.  Using 'err' there previously
was pretty unclear.
wifi: fix typo in wifi detection code (bgo #671276)

Would affect non-nl80211 drivers since all nl80211 drivers have the
phyX link in sysfs and thus this code wouldn't get run for them.

Found by Dmitri <mitya@mageia.org>
build: make VLAN code compatible with older kernels

Apparently VLAN_FLAG_LOOSE_BINDING isn't in older kernels like 2.6.32.
mandriva: add DefaultStop levels to initscript (bgo #669872)

Reported by Olav Vitters
ifnet: ignore per-user connections

Ifnet currently does not deal with user agent service. Any connection
that comes with flagged secrets or is not system connection will be
ignored by the plugin. Thanks to David Narvaez for his great help on
this problem.
ifnet: remove system prefix

As all connections are system connection so the prefix is meaningless.
Drop it now.
cli: fix VLAN priority map listing
trivial: fix completed VLAN connection name

VLAN is an acronym and thus should be capitalized.
po: updated Slovenian translation (bgo #671242)
Fix names of error enum values

When NM was registering all of its enum types by hand, it was using
NamesLikeThis rather than the default names-like-this for the "nick"
values. When we switched to using glib-mkenums, this resulted in
dbus-glib using different strings for the D-Bus error names, causing
compatibility problems.

Fix this by using glib-mkenums annotations to manually fix all the
enum values back to what they were before. (This can't be done in a
more automated way, because the old names aren't 100% consistent. Eg,
"UNKNOWN" frequently becomes "UnknownError" rather than just
"Unknown".)
libnm-glib: prevent possible access of freed memory

valgrind reported that 'path' is already freed by the time we get
to _nm_object_cache_remove_by_path().
libnm-glib: ensure nm_device_set_device_type() stays private

Internal only function and should not be exported.
libnm-glib: fix leaked NMDevice objects due to circular refcounting

Active Device objects held a reference to their ActiveConnection
which also held a reference  back to the Device.  Ensure that's
broken so everyone can get disposed correctly.