Bug 76 - mail_always causing sudo to fail
mail_always causing sudo to fail
Status: RESOLVED DUPLICATE of bug 102
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.3
PC Linux
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-05 07:56 MST by Thiago Conde Figueiró
Modified: 2003-03-19 23:23 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Conde Figueiró 2002-04-05 07:56:27 MST
If you set mail_always and then try to run "sudo su user" the su command will fail:

[thiago@hermes thiago]$ alias w=whoami
[thiago@hermes thiago]$ w
thiago
[thiago@hermes thiago]$ sudo su teste
[thiago@hermes thiago]$ stty: standard input: Input/output error
[teste@hermes thiago]$ w
thiago
[thiago@hermes thiago]$ [teste@hermes thiago]$
[thiago@hermes thiago]$ exit

[thiago@hermes thiago]$

I alias'ed w to whoami because after the error any key you type is accepted as a command, thus when I tried to type whoami it issued the command 'w', then 'a', then etc.

My sudoers:
Defaults        syslog=auth, mail_always, insults
User_Alias      OPERADOR =      user1,\
                                user2,\
                                thiago
Cmnd_Alias      SU = /bin/su, /usr/bin/passwd
root    ALL=(ALL) ALL
OPERADOR        hermes = /bin/su [!-]*,\
                         !/bin/su *root*,\
                         !/bin/su *OPERADOR*
OPERADOR        hermes = /usr/bin/passwd [!-]*,\
                         !/usr/bin/passwd *root*,\
                         !/usr/bin/passwd *OPERADOR*

By the way, *OPERADOR* doesn't work, I was only testing :-).

I still received the command log by mail as expected, though.
Comment 1 Todd C. Miller 2003-03-19 19:23:03 MST
I believe this is the same issue as bug #102.  There is a patch for the problem attached to that bug number.

*** This bug has been marked as a duplicate of 102 ***