Bug 4986 - chgpasswd.c/dochild() cannot control tty
Summary: chgpasswd.c/dochild() cannot control tty
Status: RESOLVED DUPLICATE of bug 5121
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: User & Group Accounts (show other bugs)
Version: unspecified
Hardware: x86 Solaris
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-23 07:17 UTC by Martin Cerveny
Modified: 2013-02-18 13:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Cerveny 2007-09-23 07:17:38 UTC
Process like "net rpc user add user password" return NT_STATUS_ACCESS_DENIED.
I use "passwd program" in smb.conf
Logs host.* contains "Error in ioctl call for slave pty" and "Could not re-direct stdin". 

On my Solaris 10u4 i need include explicit "#include <sys/stropts.h>" in file smbd/chgpasswd.c to get spawned terminal working (tcgetattr(3C)).

M.C>
Comment 1 Martin Cerveny 2007-09-23 07:21:57 UTC
(In reply to comment #0)
> Logs host.* contains "Error in ioctl call for slave pty" and "Could not
> re-direct stdin". 

Sorry, correct statement:
Logs host.* contains "Error in ioctl call for slave pty" and "could not read default terminal attributes on pty".

M.C>
Comment 2 Markus Zell 2007-11-21 07:41:56 UTC
I have the same problem with Solaris 8/10 at sparc and x86. The resulting error is that the "passwd program" is never executed because of the return false statement. Include of sys/stropts.h in chpasswd.c solves the problem.

SAMBA_3_2_0/source/smbd/chgpasswd.c?rev=23784:

	if (tcgetattr(0, &stermios) < 0)
	{
		DEBUG(3,
		      ("could not read default terminal attributes on pty\n"));
		return (False);
	}
Comment 3 Volker Lendecke 2008-03-18 09:57:09 UTC

*** This bug has been marked as a duplicate of 5121 ***