[sudo-workers] change the "user is not in sudoers..." message
Todd C. Miller
Todd.Miller at courtesan.com
Wed Sep 6 11:29:47 MDT 2017
On Wed, 06 Sep 2017 14:20:20 -0300, Joao Pedro Abreu De Souza wrote:
> I need to change this message, but there's not conf option to do this.
> This message is hard-coded, so someone can give me some direction on
> which files I need to change besides def_data.in, defaults.c and
> sudoers.c to do this?
Those messages are in the log_denial() function in plugins/sudoers/logging.c.
There are several of them.
For the log messages, it is the following code:
/* Set error message. */
if (ISSET(status, FLAG_NO_USER))
message = _("user NOT in sudoers");
else if (ISSET(status, FLAG_NO_HOST))
message = _("user NOT authorized on host");
else
message = _("command not allowed");
For the message that the user sees, see the block of code
with the comment:
Inform the user if they failed to authenticate (in their locale).
- todd
More information about the sudo-workers
mailing list