Bug 347 - THE AIX command odmget fails with sudo 169 and higher.
THE AIX command odmget fails with sudo 169 and higher.
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.1
IBM AIX
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-24 09:52 MDT by aedeson
Modified: 2010-08-02 15:06 MDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aedeson 2009-04-24 09:52:21 MDT
$ sudo -V
Sudo version 1.6.9p15
$ sudo odmget errnotify
0518-506 odmget: Cannot open object class errnotify
        Check path name and permissions.
*****************************************************
This problem does not exist in sudo version 1.6.6
jd1su012:/home/m535aae:sudo -V
Sudo version 1.6.6
jd1su012:/home/m535aae:sudo odmget errnotify |head

errnotify:
        en_pid = 0
        en_name = ""
        en_persistenceflg = 1
        en_label = "SCANOUT"
        en_crcid = 0
        en_class = ""
        en_type = ""
        en_alertflg = ""
*****************************************************
Comment 1 Todd C. Miller 2009-04-24 11:27:34 MDT
This is almost certainly due to odmget needing an environment variable set.  Starting with sudo 1.6.9, commands are run with a fresh copy of environment.  In 1.6.8 and below the command inherited the user's environment.

If you find the variable that needs to be set you can add it to the list of things to preserve with a line like:

Defaults env_keep += "VARIABLENAME"

If you need to preserve multiple variables you can list them together, separated by a space inside the double quotes, or just use multiple Defaults lines.

Alternately, you can restore the old environment behavior by using a line like:

Defaults !env_reset
Comment 2 Mark Janssen 2010-03-30 04:42:41 MDT
(In reply to comment #0)

The AIX ODM tools need the 'ODMDIR' variable to be set.

Put the following in your sudoers file/defaults entry:
env_keep+=ODMDIR
Comment 3 Todd C. Miller 2010-08-02 15:06:50 MDT
The AIX ODM tools need the 'ODMDIR' variable to be set.