Re: Password Security

2011-06-08 Thread Vratislav Podzimek
As Pantelis mentioned -- if you want to have password not visible for
common users, make it system wide. Otherwise you would have to keep your
eye on your laptop when logged in. 
Hint: You can always lock screen when leaving

On Wed, 2011-06-08 at 10:10 +0200, Timo Babst wrote:
> Hello, I am using NetworkManager Applet 0.8. It works great except for 
> one very annoying thing : there is a checkbox that says "show password" 
> and someone (luckily a friend) was able to copy my password just by 
> using this little funny feature. Could'nt you make sure that the user 
> has to be root in order to view the password? It IS very annoying, since 
> this feature makes every password absolutely useless. Sorry to be so 
> direct, but this really is a BIG issue for me (and I think it should not 
> be too hard to change it for the guy who developped it).
> 
> Best regards,
> 
> Timo Babst
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Password Security

2011-06-08 Thread José Queiroz
Even though you should not have allowed his friend from accessing your
account, I think it's possible to add a control so the hidden passwords are
only displayed if a master password is provided. This is the behavior of
Mozilla Firefox, for example.

This master password can live on the User Wallet, or wherever NM uses to
store the connections' passwords.

2011/6/8 Timo Babst 

> Hello, I am using NetworkManager Applet 0.8. It works great except for one
> very annoying thing : there is a checkbox that says "show password" and
> someone (luckily a friend) was able to copy my password just by using this
> little funny feature. Could'nt you make sure that the user has to be root in
> order to view the password? It IS very annoying, since this feature makes
> every password absolutely useless. Sorry to be so direct, but this really is
> a BIG issue for me (and I think it should not be too hard to change it for
> the guy who developped it).
>
> Best regards,
>
> Timo Babst
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] ModemManager: handle "change" uevents as well as "add"

2011-06-08 Thread Nathan Williams
The udev strategy used by ModemManager, as expressed in
80-mm-candidate.rules, expects "add" events to be emitted at startup
when device rules have been processed (said events usually being
generated by "udevadm trigger"). However, since udev-152, "udevadm
trigger" generates "change" events instead. It's possible for distros
or startup scripts to work around this, but I suggest we should just
go ahead and accept these events as-is.

- Nathan
From 4d51ee9ff7762d089fc85cb078c6a46bed0b6160 Mon Sep 17 00:00:00 2001
From: Nathan Williams 
Date: Wed, 8 Jun 2011 15:52:08 -0400
Subject: [PATCH] handle_uevent(): Handle "change" events as well as "add", since that's
 what the udev replay gives us these days (as of udev-152).

Change-Id: I5b194d72d8f46ac235748f183314a7c8e0393907
---
 src/mm-manager.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mm-manager.c b/src/mm-manager.c
index 561d427..cde0747 100644
--- a/src/mm-manager.c
+++ b/src/mm-manager.c
@@ -909,7 +909,8 @@ handle_uevent (GUdevClient *client,
 	/* We only care about tty/net devices when adding modem ports,
 	 * but for remove, also handle usb parent device remove events
 	 */
-	if ((!strcmp (action, "add") || !strcmp (action, "move")) && strcmp (subsys, "usb") !=0 )
+	if ((!strcmp (action, "add") || !strcmp (action, "move") !strcmp (action, "change")) 
+&& strcmp (subsys, "usb") !=0 )
 		device_added (self, device);
 	else if (!strcmp (action, "remove"))
 		device_removed (self, device);
-- 
1.7.3.1

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to Test NetworkManager 0.9

2011-06-08 Thread David Narvaez
On Wed, Jun 8, 2011 at 2:31 PM, Lamarque Vieira Souza
 wrote:
> You can use nm-tool to list all access points in the neighborhood. nm-tool
> talks directly to NM, Plasma NM is not involved. But if wireless is disabled
> in NM (you can check that using "nmcli nm") it will not list any access
> points even if your wireless card is working.

Ok. I don't have my laptop right now but I'll try nmcli nm as soon as
I get home. Thanks a lot for your fast answers, I now have a clear
picture of what the debugging path should be.

David E. Narváez
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to Test NetworkManager 0.9

2011-06-08 Thread Lamarque Vieira Souza
Em Wednesday 08 June 2011, David Narvaez escreveu:
> On Wed, Jun 8, 2011 at 10:03 AM, Lamarque Vieira Souza
> 
>  wrote:
> >> So I need them both to be able to list the wireless networks then?
> > 
> > Yes, Plasma NM from nm09 only talks to NM-0.9. The one in master branch
> > only talsk to NM-0.8.
> 
> Yes, that I know. The question was if I needed Plasma NM nm09
> installed in order for NM to list wireless networks available.

The answer for that question is no. Plasma NM depends on NM, not the 
other way around.
 
> > You said nm-tool did not show any wireless network, then NM-0.9 is not
> > able to list wireless and so is Plasma NM. Are you sure your wireless
> > card is working and enabled? You can test if it is enabled in NM using:
> > 
> > nmcli nm
> > 
> > rfkill list
> 
> My wireless card is surely working (I just have to resort to NM 0.8.2
> and Plasma NM from my repository and everything works fine up to the
> bugs I'm trying to escape from) but I haven't tried those two commands
> to ensure wireless networking is enabled. But I guess this answer
> means I should be able to list available wireless networks from NM 0.9
> alone, right? That is, before installing any NM Cllient. That would
> finally answer my question above.

You can use nm-tool to list all access points in the neighborhood. nm-
tool talks directly to NM, Plasma NM is not involved. But if wireless is 
disabled in NM (you can check that using "nmcli nm") it will not list any 
access points even if your wireless card is working.
 
-- 
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
http://planetkde.org/pt-br
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to Test NetworkManager 0.9

2011-06-08 Thread David Narvaez
On Wed, Jun 8, 2011 at 10:03 AM, Lamarque Vieira Souza
 wrote:
>> So I need them both to be able to list the wireless networks then?
>
> Yes, Plasma NM from nm09 only talks to NM-0.9. The one in master branch only
> talsk to NM-0.8.

Yes, that I know. The question was if I needed Plasma NM nm09
installed in order for NM to list wireless networks available.

> You said nm-tool did not show any wireless network, then NM-0.9 is not able
> to list wireless and so is Plasma NM. Are you sure your wireless card is
> working and enabled? You can test if it is enabled in NM using:
>
> nmcli nm
>
> rfkill list

My wireless card is surely working (I just have to resort to NM 0.8.2
and Plasma NM from my repository and everything works fine up to the
bugs I'm trying to escape from) but I haven't tried those two commands
to ensure wireless networking is enabled. But I guess this answer
means I should be able to list available wireless networks from NM 0.9
alone, right? That is, before installing any NM Cllient. That would
finally answer my question above.

David E. Narváez
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Password Security

2011-06-08 Thread nm
If you do not share your username and password of your computer then your
problem is solved. You won't be sharing your user settings then.

Happy Hacking,
Jos Collin

> Hello, I am using NetworkManager Applet 0.8. It works great except for
> one very annoying thing : there is a checkbox that says "show password"
> and someone (luckily a friend) was able to copy my password just by
> using this little funny feature. Could'nt you make sure that the user
> has to be root in order to view the password? It IS very annoying, since
> this feature makes every password absolutely useless. Sorry to be so
> direct, but this really is a BIG issue for me (and I think it should not
> be too hard to change it for the guy who developped it).
>
> Best regards,
>
> Timo Babst
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Password Security

2011-06-08 Thread Pantelis Koukousoulas
On Wed, Jun 8, 2011 at 11:10 AM, Timo Babst  wrote:
> Hello, I am using NetworkManager Applet 0.8. It works great except for one
> very annoying thing : there is a checkbox that says "show password" and
> someone (luckily a friend) was able to copy my password just by using this
> little funny feature. Could'nt you make sure that the user has to be root in
> order to view the password? It IS very annoying, since this feature makes
> every password absolutely useless. Sorry to be so direct, but this really is
> a BIG issue for me (and I think it should not be too hard to change it for
> the guy who developped it).

Sorry to be so direct but it doesn't make every password absolutely
useless because it is not common practice for security-sensitive
people to give away their laptops, while logged in even ...

Notice that for connections that have user session scope, only your
account has access to your password, if good job is done then noone
else, (even root) should be able to access it easily.

The best is not to give your laptop to your friend, but if you want to
keep doing this, you can make the connection "system scope" and then
only root can see the password, as you requested.

Pantelis
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Password Security

2011-06-08 Thread Timo Babst
Hello, I am using NetworkManager Applet 0.8. It works great except for 
one very annoying thing : there is a checkbox that says "show password" 
and someone (luckily a friend) was able to copy my password just by 
using this little funny feature. Could'nt you make sure that the user 
has to be root in order to view the password? It IS very annoying, since 
this feature makes every password absolutely useless. Sorry to be so 
direct, but this really is a BIG issue for me (and I think it should not 
be too hard to change it for the guy who developped it).


Best regards,

Timo Babst
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[nm-applet][PATCH 2/2] add CDMA registration status notification

2011-06-08 Thread Alex Chiang
The current UI requires the user to mouse-over and reveal a tool
tip (or click an indicator) to discover the registration state
(aka polling). If the user inadvertently re-registers on a
roaming network, the operation is silent until the user decides
to check the applet for network status, possibly incurring
expensive roaming tariffs in the mean time.

So, alert the user with a notification when the CDMA registration
status changes, either from home to roaming or vice versa, to
prevent silent registration changes.

Refactor internal function cdma_state_to_mb_state so it calls
helper function reg_state_to_mb_state.

The new helper function can be re-used to convert the EVDO and
CDMA1x registration states to an internal mb_state in
reg_info_changed_cb().

---
 applet-device-cdma.c |   47 +++
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/applet-device-cdma.c b/src/applet-device-cdma.c
index 7b0bf85..9fd4fbd 100644
--- a/src/applet-device-cdma.c
+++ b/src/applet-device-cdma.c
@@ -287,23 +287,24 @@ add_connection_item (NMDevice *device,
 }
 
 static guint32
+reg_state_to_mb_state (guint32 evdo_state, guint32 cdma1x_state)
+{
+   /* EVDO state overrides 1X state for now */
+   if (evdo_state)
+   return (evdo_state == 3) ? MB_STATE_ROAMING : MB_STATE_HOME;
+   else if (cdma1x_state)
+   return (cdma1x_state == 3) ? MB_STATE_ROAMING : MB_STATE_HOME;
+
+   return MB_STATE_UNKNOWN;
+}
+
+static guint32
 cdma_state_to_mb_state (CdmaDeviceInfo *info)
 {
if (!info->modem_enabled)
return MB_STATE_UNKNOWN;
 
-   /* EVDO state overrides 1X state for now */
-   if (info->evdo_state) {
-   if (info->evdo_state == 3)
-   return MB_STATE_ROAMING;
-   return MB_STATE_HOME;
-   } else if (info->cdma1x_state) {
-   if (info->cdma1x_state == 3)
-   return MB_STATE_ROAMING;
-   return MB_STATE_HOME;
-   }
-
-   return MB_STATE_UNKNOWN;
+   return reg_state_to_mb_state(info->evdo_state, info->cdma1x_state);
 }
 
 static guint32
@@ -836,7 +837,29 @@ reg_state_changed_cb (DBusGProxy *proxy,
   gpointer user_data)
 {
CdmaDeviceInfo *info = user_data;
+   guint32 mb_state;
+
+   /* Since we prefer EVDO over 1x, bail if EVDO state hasn't changed */
+   if (evdo_state && info->evdo_state == evdo_state)
+   goto out;
+
+   if (info->evdo_state != evdo_state || info->cdma1x_state != 
cdma1x_state) {
+   mb_state = reg_state_to_mb_state(evdo_state, cdma1x_state);
+   if (mb_state == MB_STATE_HOME)
+   applet_do_notify_with_pref (info->applet,
+_("CDMA network."),
+_("You are now registered on 
the home network."),
+"notification-gsm-high",
+
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+   else if (mb_state == MB_STATE_ROAMING)
+   applet_do_notify_with_pref (info->applet,
+   _("CDMA network."),
+   _("You are now registered on a 
roaming network."),
+   "notification-gsm-high",
+   
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+   }
 
+out:
info->cdma1x_state = cdma1x_state;
info->evdo_state = evdo_state;
info->skip_reg_poll = TRUE;
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[nm-applet][PATCH 1/2] add GSM registration status notification

2011-06-08 Thread Alex Chiang
The current UI requires the user to mouse-over and reveal a tool
tip (or click an indicator) to discover the registration state
(aka polling). If the user inadvertently re-registers on a
roaming network, the operation is silent until the user decides
to check the applet for network status, possibly incurring
expensive roaming tariffs in the mean time.

So, alert the user with a notification when the GSM registration
status changes, either from home to roaming or vice versa, to
prevent silent registration changes.

Refactor internal function gsm_state_to_mb_state so it calls
helper function reg_state_to_mb_state, which simply takes a
guint32 instead of a GsmDeviceInfo *. The new helper function can
be re-used to convert the registration state to an internal
mb_state in reg_info_changed_cb(), as a simple "add +1 to
registration state" is insufficient in the case where we are
roaming.

---
 applet-device-gsm.c |   33 +++--
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index 5d0d584..fb4f090 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -313,12 +313,9 @@ add_connection_item (NMDevice *device,
 }
 
 static guint32
-gsm_state_to_mb_state (GsmDeviceInfo *info)
+reg_state_to_mb_state (guint32 reg_state)
 {
-   if (!info->modem_enabled)
-   return MB_STATE_UNKNOWN;
-
-   switch (info->reg_state) {
+   switch (reg_state) {
case 1:  /* IDLE */
return MB_STATE_IDLE;
case 2:  /* HOME */
@@ -338,6 +335,15 @@ gsm_state_to_mb_state (GsmDeviceInfo *info)
 }
 
 static guint32
+gsm_state_to_mb_state (GsmDeviceInfo *info)
+{
+   if (!info->modem_enabled)
+   return MB_STATE_UNKNOWN;
+
+   return reg_state_to_mb_state(info->reg_state);
+}
+
+static guint32
 gsm_act_to_mb_act (GsmDeviceInfo *info)
 {
switch (info->act) {
@@ -1280,9 +1286,24 @@ reg_info_changed_cb (DBusGProxy *proxy,
  const char *op_name,
  gpointer user_data)
 {
+   guint32 mb_state = reg_state_to_mb_state(reg_state);
GsmDeviceInfo *info = user_data;
 
-   info->reg_state = reg_state + 1;
+   if (info->reg_state != mb_state) {
+if (mb_state == MB_STATE_HOME)
+applet_do_notify_with_pref (info->applet,
+_("GSM network."),
+_("You are now registered on the 
home network."),
+"notification-gsm-high",
+
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+else if (mb_state == MB_STATE_ROAMING)
+applet_do_notify_with_pref (info->applet,
+_("GSM network."),
+_("You are now registered on a 
roaming network."),
+"notification-gsm-high",
+
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+}
+   info->reg_state = mb_state;
g_free (info->op_code);
info->op_code = strlen (op_code) ? g_strdup (op_code) : NULL;
g_free (info->op_name);
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to Test NetworkManager 0.9

2011-06-08 Thread Lamarque Vieira Souza
Em Wednesday 08 June 2011, David Narvaez escreveu:
> On Tue, Jun 7, 2011 at 11:43 PM, Lamarque Vieira Souza
> 
>  wrote:
> > You need to install NetworkManager 0.9 and then compile the nm09 branch
> > from
> 
> > KDE's networkmanagement repository:
> So I need them both to be able to list the wireless networks then?

Yes, Plasma NM from nm09 only talks to NM-0.9. The one in master branch 
only talsk to NM-0.8.
 
> Btw, I already did the Plasma NM installation (from the nm09),
> actually following the info I read on your blog, and I was not able to
> see available wireless networks, but I'll give it a try again and
> continue  posting on Plasma NM's list then.

You said nm-tool did not show any wireless network, then NM-0.9 is not 
able to list wireless and so is Plasma NM. Are you sure your wireless card is 
working and enabled? You can test if it is enabled in NM using:

nmcli nm
rfkill list

-- 
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
http://planetkde.org/pt-br
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to Test NetworkManager 0.9

2011-06-08 Thread David Narvaez
On Tue, Jun 7, 2011 at 11:43 PM, Lamarque Vieira Souza
 wrote:
> You need to install NetworkManager 0.9 and then compile the nm09 branch from
> KDE's networkmanagement repository:

So I need them both to be able to list the wireless networks then?

Btw, I already did the Plasma NM installation (from the nm09),
actually following the info I read on your blog, and I was not able to
see available wireless networks, but I'll give it a try again and
continue  posting on Plasma NM's list then.

Thanks.

David E. Narvaez
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list