Bug#295298: gksu error reporting could be more friendly

Gustavo Noronha Silva Gustavo Noronha Silva <kov@debian.org>, 295298@bugs.debian.org
Mon, 21 Feb 2005 16:41:12 -0600


--=-32IuBE8lZ76BzTmkdE6I
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

reassign 295298 libgksu1.2-0
thanks

Em Seg, 2005-02-14 =C3=A0s 23:09 +0100, Sebastien Bacher escreveu:
> The displayed error message reads:
> "Failed to run /usr/bin/x-terminal-emulator as user root:
>  Child terminated with 1 status"
>=20
> It should explain that the cause of the error is an incorrect password in=
stead
> of some internal error in x-terminal-emulator:
> "Failed to run /usr/bin/x-terminal-emulator as user root:
>  Incorrect password"

This is actually what should happen. The code that tries to detect what
happened is here:

[...]
	  if(FD_ISSET(fdpty, &rfds))
	    {
	      bzero(buf, 256);
	      read (fdpty, buf, 255);

	      if (!first_line_read)
		{
		  read (fdpty, buf, 255);

		  if (!strncmp (buf, "su: Authentication failure", 26))
		    auth_failed =3D TRUE;
[...]
      if (WIFEXITED(status))
	{
	  if (WEXITSTATUS(status))
	    {
	      if (auth_failed)
		g_set_error (error, gksu_quark, GKSU_CONTEXT_ERROR_WRONGPASS,
			     _("Wrong password."));
	      else
		g_set_error (error, gksu_quark, GKSU_CONTEXT_ERROR_CHILDFAILED,
			     _("Child terminated with %d status"),
			     WEXITSTATUS(status));
[...]

Perhaps the user is using a localized version of su? Any suggestion of
how to handle this differently?

Thanks,

--=20
  kov@debian.org: Gustavo Noronha <http://couve.no-ip.org/~kov/>
 Debian: <http://www.debian.org/>  *  <http://www.debian-br.org/>

--=-32IuBE8lZ76BzTmkdE6I
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem
	assinada digitalmente

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBCGmOIt1anjIgqbEsRApytAKDkfZM5drBHh8jV87qi/SLQlPAlCwCeL1ss
W1WL0GCnSpOh3qUqYzlDBKc=
=VVdd
-----END PGP SIGNATURE-----

--=-32IuBE8lZ76BzTmkdE6I--