CVS update: samba/source
lkcl at samba.anu.edu.au
Thu Nov 20 04:17:37 EST 1997
Date: Thursday November 20, 1997 @ 4:17
Update of /data/cvs/samba/source
In directory samba:/tmp/cvs-serv2819
Makefile client.c clientgen.c clientutil.c ntclient.c
ntdomain.h password.c proto.h pwd_validate.c reply.c server.c
smb.h smbpass.c util.c
[hee hee hee been at it again].
- domain client:
this is the *first* version that successfully logs in to an NT 4.0 server
using smbclient. hooray! this means that we can start exploring the other
trust relationships (the SERVER and DOMAIN, not just the WORKSTATION). this
means that we can possibly do backup domain controller and inter-domain trust
relationships. it also means that pam-ntdom can easily be written.
oh, by the way, the implementation (in microsoft code) of the rpc pipes is
over anonymous IPC$ connection. therefore, andrew, you are absolutely right:
we can't shut down anonymous IPC$ access, because you close off access to
DCE/RPC if you do that!
[if you put in an invalid username or password, then yes you can refuse it].
i also modified the nt client code to use clientgen.c and cli_state...
- code moving:
i split ntclient.c down into separate modules, because a) it was getting
cumbersome b) we need separate functions for logins, for status checks,
for trust account checks etc.
- smb_io_unistr2() and smb_io_unihdr():
this one's a pain. every unicode string has a pointer before it. if the
pointer is NULL, the unicode string is NOT put into the data stream.
sometimes this is done explicitly; sometimes it is done using a UNIHDR
structure. eventually, i added an extra argument to smb_io_unistr2() to
tell it whether to bother to transfer the unicode string into/out of the
data stream, or whether to bzero the unicode string structure.
i got caught out on the SMB login, because some of the profile parameters
were NULL strings :-)
split ntclient.c into rpc_pipes/ntclient[login/trust/status].c
don't use clientutil.c, use clientgen.c. new way of calling nt
due to bugs in microsoft's code, they don't initialise their
buffers before writing data to them. therefore, there are some
random bits of data appearing in between the 4-byte word-aligned
sections. in _case_ these are important (they are to os/2), i
modified cli_send_trans to take not only the pipe name but the
pipe name length, and to use memcpy() instead of strcpy.
the generic version cli_api(). cli_api() is specifically for
\PIPE\LANMAN. this function can also take setup arguments as
well as param and data arguments.
only calls cli_api_pipe() in #ifdef NTDOMAIN.
if the dest_ip address is zero, then assume that actually, we
want to do a gethostbyname(), rather than connect to ip address
removed temporary hack which made a copy of the clear-text
contains one simple function now, which is a test-wrapper for the
actual nt domain client code.
renamed unicode string "undoc" to "buffer_ptr".
whoops! baad one! missed out a switch value (3) on the end of the
SAM Logon and SAM Logoff Queries! this was interesting, as it
caused an "rpc fail" from the NT server...
removed smb password checking: calling smb_password_ok() instead.
this is to avoid code duplication. had to add explicit checking
of the smb and unix userids, because this is deliberately *not*
done in smb_password_ok().
was disconnecting after the SMBtconX. got my true/false checks
the wrong way round...
made sess_trust_acct variable local.
not using (no-longer-global) sess_trust_acct variable.
got the ACB_xxxx thingy to print out in |:0080:| format, not |: 80:|.
also, specified the correct length. i hope.
smb_io_unistr2() added extra buffer parameter.
true: read/write data stream. false: zero structure.
- make_sam_info() and smb_io_sam_info()
added missing switch_value2 parameter, used at the end of SAM
Logon and SAM Logoff data streams.
removed explicit call_id parameter: use get_rpc_call_id() to make it.
use of cli_state and client_gen.c functions instead of explicit
Client and cnum stuff, which was using clientutil.c...
- do_lsa_sam_logon() and do_lsa_sam_logoff()
missing an extra parameter at the end (switch value of 3).
not needed: it's actually cli_open() from clientgen.c, with a few
extra parameters. you then call rpc set named pipe state, and you're
happy. if we supported NT create X, we'd probably not need the set
named pipe state...
More information about the samba-cvs