Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2017 19:22:34 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-current@freebsd.org
Cc:        Matthias Apitz <guru@unixarea.de>
Subject:   Re: mount_smbfs gives error when stored crypted pw is used
Message-ID:  <20170607172234.GA3972@c720-r314251>
In-Reply-To: <20170607123531.GA4867@c720-r314251>
References:  <20170606100034.GA4245@c720-r314251> <20170606123738.GA5213@c720-r314251> <20170607123531.GA4867@c720-r314251>

next in thread | previous in thread | raw e-mail | index | archive | help

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

El d=C3=ADa mi=C3=A9rcoles, junio 07, 2017 a las 02:35:31p. m. +0200, Matth=
ias Apitz escribi=C3=B3:

> I have located the bug in /usr/src/contrib/smbfs/lib/smb/subr.c=20
>=20
> The printf(3C) calls have been added for debugging; the bug is the
> addition of 13 after crypting every char which let the mask used in ^ ope=
ration
> exceeding 256, i.e. more than one byte, if the string to be crypted is lo=
ng
> enough. The two lines added:
>=20
>                 if (pos > 256)
>                     pos =3D pos-256;
>=20
> fixes this issue and the crypting/decypting works fine; see below;
>=20
> I'll later file a PR and propose the patch;

The PR was already made in 2009: https://bugs.freebsd.org/bugzilla/show_bug=
=2Ecgi?id=3D132302
has a patch attached (nearly the same solution as I have found), but was
never ci'ed :-(

	matthias


--=20
Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d=
e/  =E2=98=8E +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
8. Mai 1945: Wer nicht feiert hat den Krieg verloren.
8 de mayo de 1945: Quien no festeja perdi=C3=B3 la Guerra.
May 8, 1945: Who does not celebrate lost the War.

--Nq2Wo0NMKNjxTN9z
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEXmn7rBYYViyzy/vBR8z35Hb+nREFAlk4NlMACgkQR8z35Hb+
nRFPEg/8D/jNZ+Qcxy8wM3j06IziChQ4UenjiQfEKewNpZig0sJXTI2ClmpKkFpR
N23trcVAe5OieLfbIwtaqmogJLX8cdbi5zt1Hn7vi03W+ArlhNzvJporOugcfavC
upeAHVBYPft+UftbzIih7xqPR56D9YMTUSK7LE72b2JDg3vmbeId+N1rFbKEfOdl
wz7jwV5oMR2fdf4todmR6xVolHH+mPlbBLcCEapspVVk2pMgcQCwocnJyfhXxEs1
OccGcpeGsNfk5N/Pl1QrbSyypYm8xmx2WBtmixNqI0rSu0VVrDpfKNTZRzL+mUy/
6I7w2fpzYC5vNdB0h+TkCJ6dpsq3Dlmibw2fcF1X+AikL9ijXQb54yQYV/a9i3qR
FvwS7O0EepZCpLj7M/OFOslKO06Ig6dznBW+p1klbfVi+jYZqQ3oMearhiR8Sw+9
m4VWa583SOn+XZGLta798Ss+uGjlHiLBI6xG88psl0domiSf7/HRQcl3mZwTLD5B
NJ/8xg6ncgwGEG2h1ZmytgIgI49MRRr/HI5LgVAkgymCyFCB0qCrIf+Fkhdv9l1E
SEb0z1eKulMjFeAkFo9Uq4tZkiUkhofsBm0QFVHIXLi1Xg7VUUhEdzMwXvZf2U73
13yei3tFhwbN8wYNjnNzg+Y6J1SHOBIk6niZCPBnEXTu9SpJEak=
=/1/P
-----END PGP SIGNATURE-----

--Nq2Wo0NMKNjxTN9z--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170607172234.GA3972>