[bug-notifications] [alternatives 0004774]: The alternatives --set option fails for sudo/sudo_ldap

Mantis Bug Tracker noreply at opencsw.org
Wed May 25 16:26:10 CEST 2011


The following issue has been SUBMITTED. 
====================================================================== 
https://www.opencsw.org/mantis/view.php?id=4774 
====================================================================== 
Reported By:                jcraig
Assigned To:                
====================================================================== 
Project:                    alternatives
Issue ID:                   4774
Category:                   regular use
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-05-25 16:26 CEST
Last Modified:              2011-05-25 16:26 CEST
====================================================================== 
Summary:                    The alternatives --set option fails for
sudo/sudo_ldap
Description: 
With sudo and sudo_ldap installed the alternatives --auto sudo makes a
selection, but using the --set option one is unable to select a specific
alternative.

# alternatives --display sudo
Installed alternatives for sudo are:
/opt/csw/bin/sudo     sudo     /opt/csw/bin/sudo.ldap     60
/opt/csw/bin/sudoedit sudoedit /opt/csw/bin/sudoedit.ldap
/opt/csw/bin/sudo     sudo     /opt/csw/bin/sudo.minimal     50
/opt/csw/bin/sudoedit sudoedit /opt/csw/bin/sudoedit.minimal

# alternatives --set sudo /opt/csw/bin/sudo.minimal
Error: no installed match found for sudo /opt/csw/bin/sudo.minimal

The issue is with: 

297          check=`egrep -l "^[^ ]* $1 $2 " $PRIORITIESDIR/*`

This assumes a single space between fields.  Given the lack of
documentation for this file format it is reasonable that one would assume
the unix norm of one or more spaces between fields.  On fix for this would
be:

check=`egrep -l "^[^ ]* [ ]*$1 [ ]*$2 " $PRIORITIESDIR/*`

As an alternative you may wish to also add support for tab separators. 
Man page / documentation would be appreciated.

I chose to submit this as a alternatives bug rather than a sudo* bug
because I believe alternatives should support this functionality.
======================================================================



More information about the bug-notifications mailing list