xdm password problem & fix
Alan Coopersmith
alan.coopersmith at sun.com
Sat Feb 3 11:17:42 PST 2007
You really type more than 32 characters every time you want to login? Wow...
I'd get carpal tunnel quickly. I don't know of any harm in increasing the
maximum size of the buffers - 192 more bytes isn't going to run anyone out of
memory, but the fix would be going in the Xorg modular (7.x) tree, as 6.9 is
no longer being maintained by X.Org.
The current form of the code looks like this - from looking at the FreeBSD
cvsweb, it appears it should be using the same logic as OpenBSD to get the
_PASSWORD_LEN from pwd.h - is that correct?
#ifdef __OpenBSD__
# include <sys/param.h>
/* 2.8 (200012) doesn't have _PW_NAME_LEN */
# if OpenBSD > 200012
# include <pwd.h>
# define NAME_LEN (_PW_NAME_LEN + 2)
# define PASSWORD_LEN (_PASSWORD_LEN + 2)
# endif
#endif
#ifdef USE_PAM
# define NAME_LEN PAM_MAX_RESP_SIZE
# define PASSWORD_LEN PAM_MAX_RESP_SIZE
#endif
#ifndef NAME_LEN
# define NAME_LEN 32
#endif
#ifndef PASSWORD_LEN
# ifdef PASS_MAX
# define PASSWORD_LEN PASS_MAX
# else
# define PASSWORD_LEN 32
# endif
#endif
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering
Atom Smasher wrote:
> xorg-clients-6.9.0_3
> xorg-6.9.0
> xorg-server-6.9.0_5
> FreeBSD 6.1-RELEASE
>
> i just started playing with xdm, and on an account with a short password
> the xdm login works fine... but on an account with a longer password,
> login failed every time. i ggogled and found a few other people having
> the same problem but no fix.
>
> attached is a patch (works fine in freeBSD ports) that seems to fix the
> problem.
>
> DISCLAIMER: i suck at C. i don't even know enough to scrape by. i don't
> know if the attached patch will break anything or cause more problems
> than it fixes. it seems to work for me but i'd be grateful if a *real* C
> programmer could give me some critical feedback, or fix it for real.
>
> thanks...
>
>
>
> ------------------------------------------------------------------------
>
> --- programs/xdm/greeter/Login.h.orig Fri Apr 23 15:54:43 2004
> +++ programs/xdm/greeter/Login.h Sat Feb 3 05:53:04 2007
> @@ -123,8 +123,8 @@
> #endif
>
> #ifndef HAVE_PW_NAME_LEN
> -#define NAME_LEN 32
> -#define PASSWORD_LEN 32
> +#define NAME_LEN 128
> +#define PASSWORD_LEN 128
> #else
> #include <pwd.h>
> #define NAME_LEN (_PW_NAME_LEN + 2)
>
>
> ------------------------------------------------------------------------
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (FreeBSD)
>
> iQEcBAABCAAGBQJFxHeSAAoJEAx/d+cTpVci9wEH/27I+W0PpAhQ4hd23IN090Ht
> vkZy9i8kAEGquA4yNmGIbrYoL3mHRUYENHNEBsuLmJ67znPnAF3UHQidMTvT5CdP
> N4s9rQ65FBMz/Ei9GUsSC7pLeFz6HimFwwND3CSn1Av7nHWTG0+BPO++4cFpTipv
> ApCvpCyx38t2tqIn2hRjYqpUlTr9ZXDr/q+eCqWQDyytvY7QV8mPV1A84J0VjTNk
> 4lvAyy7cIk3BiD/27TSTz1zsZ/SXtwS4j/JUXlwn9cuR9dRQCdkuAz+gg6R7QBjL
> m1RL9rrFBgmprS0k7F3iHtBk2DynyxLoM1g73B9aN2MH0bsapv0kZVagRQX9RVg=
> =SUaX
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
More information about the xorg
mailing list