stderr for alias problems. Requested by Tomas Sykora.
you do not exist in the passwd database
Your user ID does not appear in the system passwd database.
- {User,Runas,Host,Cmnd}_Alias referenced but not defined
+ Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
Either you are trying to use an undeclared
{User,Runas,Host,Cmnd}_Alias or you have a user or host name listed
that consists solely of uppercase letters, digits, and the
undefined alias was used. In -\b-s\bs (strict) mode these are errors,
not warnings.
- unused {User,Runas,Host,Cmnd}_Alias
+ Warning: unused {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias was defined but never
used. The message is prefixed with the path name of the _\bs_\bu_\bd_\bo_\be_\br_\bs
file and the line number where the unused alias was defined. You
may wish to comment out or remove the unused alias.
- cycle in {User,Runas,Host,Cmnd}_Alias
+ Warning: cycle in {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias includes a reference to
itself, either directly or through an alias it includes. The
message is prefixed with the path name of the _\bs_\bu_\bd_\bo_\be_\br_\bs file and the
when parsing the _\bs_\bu_\bd_\bo_\be_\br_\bs file.
unknown defaults entry "name"
- The _\bs_\bu_\bd_\bo_\be_\br_\bs file contains a Defaults variable not recognized by
+ The _\bs_\bu_\bd_\bo_\be_\br_\bs file contains a Defaults setting not recognized by
v\bvi\bis\bsu\bud\bdo\bo.
/etc/sudoers: input and output files must be different
file distributed with s\bsu\bud\bdo\bo or https://www.sudo.ws/license.html for
complete details.
-Sudo 1.8.20 November 12, 2016 Sudo 1.8.20
+Sudo 1.8.20 February 22, 2017 Sudo 1.8.20
.\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!
.\" IT IS GENERATED AUTOMATICALLY FROM visudo.mdoc.in
.\"
-.\" Copyright (c) 1996,1998-2005, 2007-2015
+.\" Copyright (c) 1996,1998-2005, 2007-2017
.\" Todd C. Miller <Todd.Miller@courtesan.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.TH "VISUDO" "8" "November 12, 2016" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
+.TH "VISUDO" "8" "February 22, 2017" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
.nh
.if n .ad l
.SH "NAME"
\fRyou do not exist in the passwd database\fR
Your user ID does not appear in the system passwd database.
.TP 6n
-\fR{User,Runas,Host,Cmnd}_Alias referenced but not defined\fR
+\fRWarning: {User,Runas,Host,Cmnd}_Alias referenced but not defined\fR
Either you are trying to use an undeclared {User,Runas,Host,Cmnd}_Alias
or you have a user or host name listed that consists solely of
uppercase letters, digits, and the underscore
\fB\-s\fR
(strict) mode these are errors, not warnings.
.TP 6n
-\fRunused {User,Runas,Host,Cmnd}_Alias\fR
+\fRWarning: unused {User,Runas,Host,Cmnd}_Alias\fR
The specified {User,Runas,Host,Cmnd}_Alias was defined but never
used.
The message is prefixed with the path name of the
file and the line number where the unused alias was defined.
You may wish to comment out or remove the unused alias.
.TP 6n
-\fRcycle in {User,Runas,Host,Cmnd}_Alias\fR
+\fRWarning: cycle in {User,Runas,Host,Cmnd}_Alias\fR
The specified {User,Runas,Host,Cmnd}_Alias includes a reference to
itself, either directly or through an alias it includes.
The message is prefixed with the path name of the
\fIsudoers\fR
file contains a
\fRDefaults\fR
-variable not recognized by
+setting not recognized by
\fBvisudo\fR.
.TP 6n
\fR@sysconfdir@/sudoers: input and output files must be different\fR
.\"
-.\" Copyright (c) 1996,1998-2005, 2007-2015
+.\" Copyright (c) 1996,1998-2005, 2007-2017
.\" Todd C. Miller <Todd.Miller@courtesan.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.Dd November 12, 2016
+.Dd February 22, 2017
.Dt VISUDO @mansectsu@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
as root.
.It Li you do not exist in the passwd database
Your user ID does not appear in the system passwd database.
-.It Li {User,Runas,Host,Cmnd}_Alias referenced but not defined
+.It Li Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
Either you are trying to use an undeclared {User,Runas,Host,Cmnd}_Alias
or you have a user or host name listed that consists solely of
uppercase letters, digits, and the underscore
In
.Fl s
(strict) mode these are errors, not warnings.
-.It Li unused {User,Runas,Host,Cmnd}_Alias
+.It Li Warning: unused {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias was defined but never
used.
The message is prefixed with the path name of the
.Em sudoers
file and the line number where the unused alias was defined.
You may wish to comment out or remove the unused alias.
-.It Li cycle in {User,Runas,Host,Cmnd}_Alias
+.It Li Warning: cycle in {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias includes a reference to
itself, either directly or through an alias it includes.
The message is prefixed with the path name of the
.Em sudoers
file contains a
.Li Defaults
-variable not recognized by
+setting not recognized by
.Nm .
.It Li @sysconfdir@/sudoers: input and output files must be different
The
-visudo: stdin:1 cycle in User_Alias "FOO"
+Error: stdin:1 cycle in User_Alias "FOO"
-visudo: stdin:1 unused User_Alias "A"
-visudo: stdin:2 unused User_Alias "B"
+Warning: stdin:1 unused User_Alias "A"
+Warning: stdin:2 unused User_Alias "B"
/*
- * Copyright (c) 1996, 1998-2005, 2007-2016
+ * Copyright (c) 1996, 1998-2005, 2007-2017
* Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
} else {
if (!quiet) {
if (errno == ELOOP) {
- sudo_warnx(U_("%s:%d cycle in %s \"%s\""),
+ fprintf(stderr, strict ?
+ U_("Error: %s:%d cycle in %s \"%s\"") :
+ U_("Warning: %s:%d cycle in %s \"%s\""),
file, lineno, alias_type_to_string(type), name);
} else {
- sudo_warnx(U_("%s:%d %s \"%s\" referenced but not defined"),
+ fprintf(stderr, strict ?
+ U_("Error: %s:%d %s \"%s\" referenced but not defined") :
+ U_("Warning: %s:%d %s \"%s\" referenced but not defined"),
file, lineno, alias_type_to_string(type), name);
}
+ fputc('\n', stderr);
if (strict && errorfile == NULL) {
errorfile = rcstr_addref(file);
errorlineno = lineno;
{
struct alias *a = (struct alias *)v1;
- sudo_warnx_nodebug(U_("%s:%d unused %s \"%s\""),
+ fprintf(stderr, U_("Warning: %s:%d unused %s \"%s\""),
a->file, a->lineno, alias_type_to_string(a->type), a->name);
+ fputc('\n', stderr);
return 0;
}