Hi,
my previous mail was missing the attachment. Please find it attached.
BTW. I'd recommend to add a space after the double colon additional.
E.g.: "[sudo] password for %p: "
Best Regards
Patrick
diff -urN sudo-1.6.9p9/check.c sudo-1.6.9p9.patched/check.c
--- sudo-1.6.9p9/check.c 2007-07-06 21:52:13.000000000 +0200
+++ sudo-1.6.9p9.patched/check.c 2007-12-06 15:09:36.378177854 +0100
@@ -216,6 +216,19 @@
len += strlen(*user_runas) - 2;
subst = 1;
break;
+ case 'p':
+ p++;
+ if (def_rootpw) {
+ len += 2;
+ }
+ else if (def_targetpw || def_runaspw) {
+ len += strlen(*user_runas) - 2;
+ }
+ else {
+ len += strlen(user_name) - 2;
+ }
+ subst = 1;
+ break;
case '%':
p++;
len--;
@@ -261,6 +274,21 @@
goto oflow;
np += n;
continue;
+ case 'p':
+ p++;
+ if (def_rootpw) {
+ n = strlcpy(np, "root", np - endp);
+ }
+ else if (def_targetpw || def_runaspw) {
+ n = strlcpy(np, *user_runas, np - endp);
+ }
+ else {
+ n = strlcpy(np, user_name, np - endp);
+ }
+ if (n >= np - endp)
+ goto oflow;
+ np += n;
+ continue;
case '%':
/* convert %% -> % */
p++;
diff -urN sudo-1.6.9p9/debian/rules sudo-1.6.9p9.patched/debian/rules
--- sudo-1.6.9p9/debian/rules 2007-12-06 14:47:36.000000000 +0100
+++ sudo-1.6.9p9.patched/debian/rules 2007-12-06 13:46:44.479405985 +0100
@@ -21,7 +21,7 @@
--with-logging=syslog --with-logfac=authpriv \
--with-env-editor --with-editor=/usr/bin/vi \
--with-timeout=15 --with-password-timeout=0 \
- --with-passprompt="[sudo] password for %u:" \
+ --with-passprompt="[sudo] password for %p:" \
--disable-root-mailer --disable-setresuid \
--with-sendmail=/usr/sbin/sendmail \
--mandir=/usr/share/man --libexecdir=/usr/lib/sudo \
@@ -37,7 +37,7 @@
--with-logging=syslog --with-logfac=authpriv \
--with-env-editor --with-editor=/usr/bin/vi \
--with-timeout=15 --with-password-timeout=0 \
- --with-passprompt="[sudo] password for %u:" \
+ --with-passprompt="[sudo] password for %p:" \
--disable-root-mailer --disable-setresuid \
--with-sendmail=/usr/sbin/sendmail \
--with-ldap-conf-file=/etc/ldap/ldap.conf \
diff -urN sudo-1.6.9p9/sudoers.man.in sudo-1.6.9p9.patched/sudoers.man.in
--- sudo-1.6.9p9/sudoers.man.in 2007-12-06 14:47:36.000000000 +0100
+++ sudo-1.6.9p9.patched/sudoers.man.in 2007-12-06 15:12:32.159223917 +0100
@@ -912,6 +912,12 @@
.el .IP "\f(CW%u\fR" 4
.IX Item "%u"
expanded to the invoking user's login name
+.ie n .IP "%p" 4
+.el .IP "\f(CW%p\fR" 4
+.IX Item "%p"
+expanded to the user whose password is asked for (respects the presence of the
+rootpw, targetpw or runaspw options in the configuration)
+
.ie n .IP "\*(C`%%\*(C'" 4
.el .IP "\f(CW\*(C`%%\*(C'\fR" 4
.IX Item "%%"
diff -urN sudo-1.6.9p9/sudo.man.in sudo-1.6.9p9.patched/sudo.man.in
--- sudo-1.6.9p9/sudo.man.in 2007-12-03 11:27:12.000000000 +0100
+++ sudo-1.6.9p9.patched/sudo.man.in 2007-12-06 14:35:26.856071985 +0100
@@ -18,7 +18,7 @@
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.\" $Sudo: sudo.man.in,v 1.29.2.16 2007/12/03 10:27:12 millert Exp $
+.\" $Sudo: sudo.pod,v 1.70.2.19 2007/11/21 19:26:10 millert Exp $
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
@@ -46,11 +46,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
@@ -150,7 +150,7 @@
.\" ========================================================================
.\"
.IX Title "SUDO @mansectsu@"
-.TH SUDO @mansectsu@ "December 3, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
+.TH SUDO @mansectsu@ "Dezember 6, 2007" "1.6.9p9" "MAINTENANCE COMMANDS"
.SH "NAME"
sudo, sudoedit \- execute a command as another user
.SH "SYNOPSIS"
@@ -449,8 +449,8 @@
To prevent command spoofing, \fBsudo\fR checks \*(L".\*(R" and "" (both denoting
current directory) last when searching for a command in the user's
\&\s-1PATH\s0 (if one or both are in the \s-1PATH\s0). Note, however, that the
-actual \f(CW\*(C`PATH\*(C'\fR environment variable is \fInot\fR modified and is passed
-unchanged to the program that \fBsudo\fR executes.
+\&\f(CW\*(C`PATH\*(C'\fR environment variable is further modified in Debian because of
+the use of the \fI\s-1SECURE_PATH\s0\fR build option.
.PP
\&\fBsudo\fR will check the ownership of its timestamp directory
([EMAIL PROTECTED]@\fR by default) and ignore the directory's contents if
@@ -561,19 +561,19 @@
file system holding ~yazza is not exported as root:
.PP
.Vb 1
-\& $ sudo -u yazza ls ~yazza
+\& $ sudo \-u yazza ls ~yazza
.Ve
.PP
To edit the \fIindex.html\fR file as user www:
.PP
.Vb 1
-\& $ sudo -u www vi ~www/htdocs/index.html
+\& $ sudo \-u www vi ~www/htdocs/index.html
.Ve
.PP
To shutdown a machine:
.PP
.Vb 1
-\& $ sudo shutdown -r +15 "quick reboot"
+\& $ sudo shutdown \-r +15 "quick reboot"
.Ve
.PP
To make a usage listing of the directories in the /home
@@ -581,12 +581,16 @@
to make the \f(CW\*(C`cd\*(C'\fR and file redirection work.
.PP
.Vb 1
-\& $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
+\& $ sudo sh \-c "cd /home ; du \-s * | sort \-rn > USAGE"
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIgrep\fR\|(1), \fIsu\fR\|(1), \fIstat\fR\|(2), \fIlogin_cap\fR\|(3), \fIpasswd\fR\|(@mansectform@),
\&\fIsudoers\fR\|(@mansectform@), \fIvisudo\fR\|(@mansectsu@)
+.PP
+The file /usr/share/doc/sudo/OPTIONS describes the options used for building
+the Debian version of sudo, some of which change default behaviors documented
+elsewhere in this document.
.SH "AUTHORS"
.IX Header "AUTHORS"
Many people have worked on \fBsudo\fR over the years; this