network-admin ask for root password instead of using sudo

Bug #8935 reported by Santiago Erquicia
28
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

I know that this is not the right component for this bug but I couldn't find the
correct one.

If you open gnome-nettools and try to configure one of the networks, it asks for
root password instead of using sudo.

Revision history for this message
Chris Jones (cmsj-bugz-ubu) wrote :

*** Bug 9210 has been marked as a duplicate of this bug. ***

Revision history for this message
Chris Jones (cmsj-bugz-ubu) wrote :

This seems to be gnome-system-tools asking for the password, from
src/common/gst-auth.c. Looking at that it's going to need to be patched to use
gksudo, or gnome-nettool needs to call 'network-admin' (the component of
gnome-system-tools the Configure button runs) via gksudo, but this does not
appear to be possible with gksudo because network-admin needs to take arguments
of its own and I don't think gksudo can do that in warty.

Revision history for this message
Chris Jones (cmsj-bugz-ubu) wrote :

OK, here is a draft patch to make it call su via sudo. Ideally I would think
gksudo's API would be the way to go, but this is simple and hopefully trivial
enough that it can squeeze into warty.

Revision history for this message
Chris Jones (cmsj-bugz-ubu) wrote :

Created an attachment (id=553)
Patch to call su via sudo internally

and here is the actual patch.
It's been a while, so I forget if I'm supposed to patch config.h.in manually or
not, but I have, so beware. I also had a problem making it build after applying
the patch. Copying /usr/share/intltool/intltool-update.in to the backends
directory in the g-s-t source seemed to do the trick.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thnaks for the patch but in fact it doesn't build here:
gst-auth.c:364: error: `SUDO_PATH' undeclared (first use in this function)
gst-auth.c:364: error: (Each undeclared identifier is reported only once
gst-auth.c:364: error: for each function it appears in.)

It don't want to just copy intltool-update.in without knowing why, but I'll try
to make it
working soon.

Revision history for this message
Chris Jones (cmsj-bugz-ubu) wrote :

(In reply to comment #5)
> Thnaks for the patch but in fact it doesn't build here:
> gst-auth.c:364: error: `SUDO_PATH' undeclared (first use in this function)

It comes from config.h, but it's a new entry so auto* need to play with things.
Just applying the patch and running make won't work. I don't really have a great
deal of auto* clue though, so I could have made the patch wrong.

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 12029 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

reassigning ask discussed on IRC, thanks for taking care of that :)

Revision history for this message
Michael Vogt (mvo) wrote :

fixed with the upload of g-s-t 1.1.4.1-0ubuntu4

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.