[Pkg-shadow-devel] [PATCH_01] a Debian patch for passwd.c
Tomasz Kłoczko
kloczek@zie.pg.gda.pl
Fri, 15 Apr 2005 22:58:28 +0200 (CEST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--568760595-645754174-1113598708=:5286
Content-Type: TEXT/PLAIN; charset=ISO-8859-2
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Fri, 15 Apr 2005, Nicolas [iso-8859-1] Fran=E7ois wrote:
> Tomasz,
>=20
> I found this patch in Debian:
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> --- shadow-4.0.3/src/passwd.c???2002-01-05 16:41:43.000000000 +0100
> +++ shadow-4.0.3_30.4/src/passwd.c??????2004-11-02 22:17:38.000000000 +01=
00
> @@ -1173,8 +1173,8 @@
>=20
> if (!amroot && pw->pw_uid !=3D getuid ()) {
> fprintf (stderr,
> - _("You may not change the password for %s.\n"),
> - name);
> + _("%s: You may not view or modify password infor=
mation for %s.\n"),
> + Prog, name);
> SYSLOG ((LOG_WARN, "can't change pwd for `%s'", name));
> closelog ();
> exit (E_NOPERM);
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
>=20
> This patch was done to fix #61313:
> "passwd -S root" (as a normal user) should not display "You may not chang=
e
> the password for root."
>=20
> I've also updated updated the syslog message.
> The attached patch is against your CVS.
My target is minimize Prog usaga if it is possible.
So above after indentation I'll commit in form:
--- passwd.c 6 Apr 2005 04:26:06 -0000 1.34
+++ passwd.c 15 Apr 2005 20:55:34 -0000
@@ -873,7 +873,9 @@
if (!amroot && pw->pw_uid !=3D getuid ()) {
fprintf (stderr,
- _("You may not change the password for %s.\n"), na=
me);
+ _
+ ("You may not view or modify password information =
for %s.\n"),
+ name);
SYSLOG ((LOG_WARN, "can't change pwd for `%s'", name));
closelog ();
exit (E_NOPERM);
klocze
--=20
-----------------------------------------------------------
*Ludzie nie maj=B1 problem=F3w, tylko sobie sami je stwarzaj=B1*
-----------------------------------------------------------
Tomasz K=B3oczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@rudy.mif.pg.gda.p=
l*
--568760595-645754174-1113598708=:5286--