Fedora 10 /usr/bin/sudo is not readable so config is ignored

Bug #492986 reported by Alan Fitch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyneighborhood
Fix Released
Low
pyNeighborhood

Bug Description

I'm using 0.5.0

In __init__.py various programs are checked for R_OK + X_OK which I guess means they must be readable and executable (I don't know python).

On Fedora 10, /usr/bin/sudo is not readable (but still works fine). I guess this is a "feature" of Fedora?

So the sudo setting in pyNeighborhood keeps reverting back to /usr/bin/gksu (which don't have installed). It seems to me that sudo doesn't have to be readable, so should only be checked for X_OK.

Possibly this is a potential security hazard in that I am tempted to make sudo readable as a solution, and I assume Fedora makes it not readable for some security reason?

Alan

Revision history for this message
Alan Fitch (apfitch) wrote :

Also it looks to me like accessibility of sudo is checked even if sudo is not enabled.

I fixed it like this
1. change defaults to
defaults = {"nmblookup": "/usr/bin/nmblookup",
             "smbclient": "/usr/bin/smbclient",
             "smbtree": "/usr/bin/smbtree",
             "filemanager": "/usr/bin/nautilus"}

2. Add a clause like this:

for file in ["sudo"]:
    if config.get("Main", "enable_sudo") == "True":
        if not access( config.get("Main", file), X_OK):
      fallback = "/usr/bin/gksu"
      print_debug( "%s isn't accessible, falling back to default: %s"
                  % ( config.get("Main", file), fallback ) )
             config.set("Main", file, fallback)

Alan

Revision history for this message
Patrick Geltinger (patlkli) wrote :

pyNeighborhood is in fact intended to check the accessability of sudo even if it's not enabled.

Furthermore we're planning to switch to PolicyKit for root actions anyway.

Changed in pyneighborhood:
assignee: nobody → pyNeighborhood (pyneigborhood)
status: New → Confirmed
Revision history for this message
Patrick Geltinger (patlkli) wrote :

Fixed in revision 406...

Changed in pyneighborhood:
status: Confirmed → Fix Committed
Changed in pyneighborhood:
assignee: pyNeighborhood-failed (pyneigborhood) → pyNeighborhood (pyneighborhood)
milestone: none → 0.5.1
status: Fix Committed → Fix Released
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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