Samba - Unix password sync

SATOH Fumiyasu fumiya at cij.co.jp
Mon Nov 8 03:43:31 GMT 1999


"Johannes Weberhofer" <Johannes.Weberhofer at ibm.net> wrote:
>in the last weeks I've unsuccessfully tried to get Samba (2.0.5a) -
>Unix (Suse 6.2) password sync working. Maybe somebody can give me a
>hint, what's wrong. Enclosed you'll find additional information.
>[1999/10/20 17:46:25, 100] smbd/chgpasswd.c:talktochild(276)
>  talktochild: sendbuf=[fisch
>  ]
>[1999/10/20 17:46:29, 10] lib/util_sock.c:read_with_timeout(386)
>  read_with_timeout: timeout read. select timed out.

Deadlock and timeout occured.

The passwd(1) command uses getpass(3) function that calls
tcsetattr(3) function with NOECHO termios and TCSAFLUSH action
to prevent from echoing password.

If smbd sends a string of `passwd chat' parameter before passwd
calls getpass(3), that string is discarded! Then smbd and passwd
are waiting for each other while timed out by smbd.

AFAIK there is same problem in Solaris 2.x, some Linux distributions
(redhat and so on), FreeBSD.

>From tcsetattr(3) on Solaris 2.6:
	*** snip ***

     int tcsetattr(int fildes, int optional_actions,
          const struct termios *termios_p);

	*** snip ***

     o If optional_actions is TCSAFLUSH, the  change  will  occur
       after all output written to fildes is transmitted, and all
       input so far received  but  not  read  will  be  discarded
       before the change is made.

-- >8 -- signature -- >8 --
SATOH Fumiyasu
fumiya at cij.co.jp,   http://www.bento.ad.jp/~fumiya/
fumiya at samba.gr.jp, http://www.samba.gr.jp/


More information about the samba mailing list