bbaumbach/samba-autobuild/.git
24 years agofirst pass at updating head branch to be to be the same as the SAMBA_2_0 branch
Andrew Tridgell [Mon, 13 Dec 1999 13:27:58 +0000 (13:27 +0000)]
first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)

24 years agochanged function name of get_home_dir() to get_unixhome_dir(), to stop
Luke Leighton [Sun, 12 Dec 1999 21:00:35 +0000 (21:00 +0000)]
changed function name of get_home_dir() to get_unixhome_dir(), to stop
clash with gnu readline library.

fixed issue with [homes] service not being there - call lp_add_home()
just before starting the msrpc processing.
(This used to be commit 054195df9b6187c663ede5cf4489499abbdc29fc)

24 years agofinal part of "first" phase converting over to msrpc daemon architecture.
Luke Leighton [Sun, 12 Dec 1999 20:03:42 +0000 (20:03 +0000)]
final part of "first" phase converting over to msrpc daemon architecture.
done a minimal amout of clean-up in the Makefile, removing unnecessary
modules from the link stage.  this is not complete, yet, and will
involve some changes, for example to smbd, to remove dependencies on
the password database API that shouldn't be there.  for example,
smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa
API.

this first implementation has minor problems with not reinstantiating
the same services as the caller.  the "homes" service is a good example.
(This used to be commit caa50525220b0d0250fa139367593c2de2c12135)

24 years agodelineation between smb and msrpc more marked. smbd now constructs
Luke Leighton [Sun, 12 Dec 1999 01:25:49 +0000 (01:25 +0000)]
delineation between smb and msrpc more marked.  smbd now constructs
pdus, and then feeds them over either a "local" function call or a "remote"
function call to an msrpc service.  the "remote" msrpc daemon, on the
other side of a unix socket, then calls the same "local" function that
smbd would, if the msrpc service were being run from inside smbd.

this allows a transition from local msrpc services (inside the same smbd
process) to remote (over a unix socket).

removed reference to pipes_struct in msrpc services.  all msrpc processing
functions take rpcsrv_struct which is a structure containing state info
for the msrpc functions to decode and create pdus.

created become_vuser() which does everything not related to connection_struct
that become_user() does.

removed, as best i could, connection_struct dependencies from the nt spoolss
printing code.

todo: remove dcinfo from rpcsrv_struct because this stores NETLOGON-specific
info on a per-connection basis, and if the connection dies then so does
the info, and that's a fairly serious problem.

had to put pretty much everything that is in user_struct into parse_creds.c
to feed unix user info over to the msrpc daemons.  why?  because it's
expensive to do unix password/group database lookups, and it's definitely
expensive to do nt user profile lookups, not to mention pretty difficult
and if you did either of these it would introduce a complication /
unnecessary interdependency.  so, send uid/gid/num_groups/gid_t* +
SID+num_rids+domain_group_rids* + unix username + nt username + nt domain
+ user session key etc.  this is the MINIMUM info identified so far that's
actually implemented.  missing bits include the called and calling
netbios names etc.  (basically, anything that can be loaded into
standard_sub() and standard_sub_basic()...)
(This used to be commit aa3c659a8dba0437c17c60055a6ed30fdfecdb6d)

24 years agoOK. This code works on a RedHat 6.0 system. However smbpasswd
Gerald Carter [Thu, 9 Dec 1999 07:06:12 +0000 (07:06 +0000)]
OK.  This code works on a RedHat 6.0 system.  However smbpasswd
time out of sending the session setup on Solaris 2.6.  No idea.
I'll work on it some tomorrow.  This is to fix the "Unable to
setup password vectors" thingy.

Also changed an inet_aton() to inet_addr() as the former is
not very portable :-)

Luke,  I set the redir flag to false because the connection to
the smb-agent was failing and smbpasswd bombed.  Double check me
on this one.

-jc
(This used to be commit e1d2b174caf5f0c48a8fac25778f72a868ec6eb7)

24 years agojerry spotted that get_domain_sids() was being called with the wrong
Luke Leighton [Wed, 8 Dec 1999 23:03:42 +0000 (23:03 +0000)]
jerry spotted that get_domain_sids() was being called with the wrong
arguments: get_any_dc_name() was being called with a server name
not a domain name.  oops.
(This used to be commit 631814302d6992138cfe024ba7bd456cc7e0d3bf)

24 years agomoved sys/un.h to after sys/socket.h. done a gnu autoconf around sys/un.h
Luke Leighton [Wed, 8 Dec 1999 22:57:34 +0000 (22:57 +0000)]
moved sys/un.h to after sys/socket.h.  done a gnu autoconf around sys/un.h
(This used to be commit b2ea37a8f1a28a825719b46354a1244b359aca2c)

24 years agoparsing code for transferring unix and nt security credentials over-the-wire.
Luke Leighton [Wed, 8 Dec 1999 21:45:57 +0000 (21:45 +0000)]
parsing code for transferring unix and nt security credentials over-the-wire.
at present, a unix password is missing from the unix credentials, but is
not _actually_ expected to be needed.  weeelll... maybe :-)

this is used to transfer credentials between smbd and msrpc daemons, down
a unix socket, so that the unix and nt credentials can be inherited by
an msrpc daemon called up from smbd.
(This used to be commit 5e68403bbb6f18e754679d967fee9e259d24211c)

24 years agoABOUT TIME!!!!!!!!
Luke Leighton [Wed, 8 Dec 1999 21:43:03 +0000 (21:43 +0000)]
ABOUT TIME!!!!!!!!

damn, this one is bad.

started, at least two days ago, to add an authentication mechanism to
the smbd<->msrpc redirector/relay, such that sufficient unix / nt
information could be transferred across the unix socket to do a
become_user() on the other side of the socket.

it is necessary that the msrpc daemon inherit the same unix and nt
credentials as the smbd process from which it was spawned, until
such time as the msrpc daemon receives an authentication request
of its own, whereupon the msrpc daemon is responsible for authenticating
the new credentials and doing yet another become_user() etc sequence.
(This used to be commit 30c7fdd6ef10ecd35594311c1b250b95ff895489)

24 years agothe first independent msrpc daemon - lsarpcd.
Luke Leighton [Mon, 6 Dec 1999 00:44:32 +0000 (00:44 +0000)]
the first independent msrpc daemon - lsarpcd.

one horrible cut / paste job from smbd, plus a code split of shared
components between the two.

the job is not _yet_ complete, as i need to be able to do a become_user()
call for security reasons.  i picked lsarpcd first because you don't
_need_ security on it (microsoft botched so badly on this one, it's not
real.  at least they fixed this in nt5 with restrictanonymous=0x2).
fixing this involves sending the current smb and unix credentials down
the unix pipe so that the daemon it eventually goes to can pick them
up at the other end.

i can't believe this all worked!!!
(This used to be commit 2245b0c6d13c7c5886e81f9137b05df883598c26)

24 years agoreenabled retry_time (commented out accidentally in name_status)
Luke Leighton [Sun, 5 Dec 1999 02:22:28 +0000 (02:22 +0000)]
reenabled retry_time (commented out accidentally in name_status)
(This used to be commit bf9422832c335c8d283273eb1d0008ac15cd3531)

24 years agofirst version of msrpc agent redirector code. client-side only.
Luke Leighton [Sun, 5 Dec 1999 01:34:34 +0000 (01:34 +0000)]
first version of msrpc agent redirector code.  client-side only.
(This used to be commit 5e5a1dceee0b6088822697284d3e0af04d197477)

24 years agocreated create_pipe_socket() function.
Luke Leighton [Sun, 5 Dec 1999 00:13:17 +0000 (00:13 +0000)]
created create_pipe_socket() function.
(This used to be commit a3af3b4312144943413894b18b5845b56474ebb5)

24 years agoargh! how horrible! spent ages working out why packets weren't being
Luke Leighton [Sat, 4 Dec 1999 23:40:21 +0000 (23:40 +0000)]
argh!  how horrible!  spent ages working out why packets weren't being
received properly when a UDP "retry" occurs.  it's because reads and
writes must be interleaved / matched.

scenario:

nmblookup connects to agent, sends request.

agent receives request, broadcasts it on 137.

agent RECEIVES 137 broadcast, sends it to nmblookup

agent receives RESPONSE to 137 broadcast, sends it to nmblookup.

if reads are not equally interspersed with writes, then second send
will fail.

if you think this is odd behaviour and that the agent should be filtering
its own UDP traffic, think again.

agent will be, potentially, redirecting nmbd traffic (including WINS
server) not just client programs.
(This used to be commit 43e158c4261e51678d6e7f77ceb4a1c7281a2525)

24 years agoargh. trying to get the nmb agent code to filter out "self" packets.
Luke Leighton [Sat, 4 Dec 1999 22:22:37 +0000 (22:22 +0000)]
argh.  trying to get the nmb agent code to filter out "self" packets.
(This used to be commit 84d7cc63239ea67481f6382da58d0678a21011fb)

24 years agoeven more cool! nmb-agent moved over to new vagent style, too!
Luke Leighton [Sat, 4 Dec 1999 22:05:59 +0000 (22:05 +0000)]
even more cool!  nmb-agent moved over to new vagent style, too!
(This used to be commit 49c157eae4bb24164f0f976d1bf6cf0cfc068863)

24 years agocool! created higher-order function table for agent redirection.
Luke Leighton [Sat, 4 Dec 1999 21:55:39 +0000 (21:55 +0000)]
cool!  created higher-order function table for agent redirection.
(This used to be commit 7bb2e55d0d3a00a97bba99ebed722a4adf84093c)

24 years agomore similar agent code
Luke Leighton [Sat, 4 Dec 1999 20:43:45 +0000 (20:43 +0000)]
more similar agent code
(This used to be commit 2c778313b8c2b4535f16e11aea81a61edb3b2d45)

24 years agonmb agent memory free problems
Luke Leighton [Sat, 4 Dec 1999 20:29:03 +0000 (20:29 +0000)]
nmb agent memory free problems
(This used to be commit b4306cbf06f70dd9d2760bb005e15059d6f904f0)

24 years agotrying to make redirector agent code same base.
Luke Leighton [Sat, 4 Dec 1999 20:11:31 +0000 (20:11 +0000)]
trying to make redirector agent code same base.
(This used to be commit 9ba9df453abab1085b5537580b1da87d1dcdb7de)

24 years agojeremy is going to hate me for this.
Luke Leighton [Sat, 4 Dec 1999 19:14:37 +0000 (19:14 +0000)]
jeremy is going to hate me for this.

created an "nmb-agent" utility that, yes: it connects to the 137 socket
and accepts unix socket connections which it redirects onto port 137.

it uses the name_trn_id field to filter requests to the correct
location.

name_query() and name_status() are the first victims to use this
feature (by specifying a file descriptor of -1).
(This used to be commit d923bc8da2cf996408194d98381409191dd81a16)

24 years agoargh! you wouldn't believe what i had to do: use the mid (multiplex id)
Luke Leighton [Sat, 4 Dec 1999 00:49:13 +0000 (00:49 +0000)]
argh!  you wouldn't believe what i had to do: use the mid (multiplex id)
to redirect multiple socket-based connnections onto a single client state.

argh!
(This used to be commit 06390e792cd8aa57a91c3a3d1d267fd1bcdc17a1)

24 years agoargh! smb-agent redirection client reusage is a nightmare!
Luke Leighton [Fri, 3 Dec 1999 23:36:53 +0000 (23:36 +0000)]
argh!  smb-agent redirection client reusage is a nightmare!
moved smb-agent over to a single-process model instead of fork()
in order to reuse client connections.  except, of course, you
can't do a select() on the same socket connections!  argh!
(This used to be commit e9e5a34de8e8f9a69e817aceb8c16284334d4642)

24 years agostarting "connection reuse" system in smb-agent. added version number
Luke Leighton [Fri, 3 Dec 1999 22:02:03 +0000 (22:02 +0000)]
starting "connection reuse" system in smb-agent.  added version number
which isn't actually used right now :-)
(This used to be commit d54a64ae3ab7cdc1ac67fb49f7255e6a106d624e)

24 years agoi always get caught out with non-gnu-readline code mods :-)
Luke Leighton [Fri, 3 Dec 1999 19:59:44 +0000 (19:59 +0000)]
i always get caught out with non-gnu-readline code mods :-)
(This used to be commit a47cc6447036d0a8b8e3e096d7b51a37d10d3325)

24 years agosmb-agent improvements. added -D (daemon) option. smb agent is
Luke Leighton [Fri, 3 Dec 1999 19:55:34 +0000 (19:55 +0000)]
smb-agent improvements.  added -D (daemon) option.  smb agent is
restricted to connections from the current user (socket is created
with current user uid).
(This used to be commit 5af076e4b7ee13eebe0b89748e3f5a1ef21f8c73)

24 years agocool! a unix socket smb redirector. code based on smbfilter and
Luke Leighton [Fri, 3 Dec 1999 18:16:08 +0000 (18:16 +0000)]
cool!  a unix socket smb redirector.  code based on smbfilter and
ideas from ssh-agent.

the intent is to be able to share smb sessions using cli_net_use_add()
across multiple processes, where one process knows the target server
name, user name and domain, but not the smb password.
(This used to be commit 294b653f2e9cdc1864ec638ae8b4300df25723cf)

24 years agopromptline undefined (pline)
Luke Leighton [Fri, 3 Dec 1999 17:02:47 +0000 (17:02 +0000)]
promptline undefined (pline)
(This used to be commit f33e4ca930f8299c00f861215c5231eef9ecef94)

24 years agonew get_any_dc_name() function allows lookups of trusted domains from
Luke Leighton [Thu, 2 Dec 1999 20:16:34 +0000 (20:16 +0000)]
new get_any_dc_name() function allows lookups of trusted domains from
lp_trusted_domains() parameter, so trusted domain logins should work,
right, if you put user = TRUSTED_DOMAIN\NTuser in "domain name map", right?

right - as _long_ as you're not using NTLMv2, because the damn NT username
gets mapped to the damn unix name too early, and NTLMv2 challenge-responses
are based on the client's user name, client's domain name, client's host name
etc damn etc.

so it becomes necessary to stop using char* username because this allows
for massive amounts of confusion as to which username is being referred to.
the underlying unix username on the local unix system that is associated with
the smbd process that represents the NT username?  or the NT username itself?
(This used to be commit dd3ccdd7d996c107766cdad3c403e8b8947b9e65)

24 years agodomain_client_validate() no longer takes serverlist, it calls
Luke Leighton [Thu, 2 Dec 1999 19:07:13 +0000 (19:07 +0000)]
domain_client_validate() no longer takes serverlist, it calls
get_any_dc_name().
(This used to be commit e21367c0ebdc5e202cdc39d50950bff089bf67f8)

24 years agocleaning up: removing those horrible references to server list
Luke Leighton [Thu, 2 Dec 1999 19:03:23 +0000 (19:03 +0000)]
cleaning up: removing those horrible references to server list
functions (cli_net_use_addlist()).  needed originally because
there was no get_dc_any_name() function.
(This used to be commit 3a2b920ea2e6704b2574f404e1e41c7cfc0f96b2)

24 years agoadded get_any_dc_name() function.
Luke Leighton [Thu, 2 Dec 1999 18:49:28 +0000 (18:49 +0000)]
added get_any_dc_name() function.
(This used to be commit 455e17dbb7d451b462004f302f5c68770f17b65e)

24 years agoneed a domain resolving function, but get_trusted_serverlist() will do.
Luke Leighton [Thu, 2 Dec 1999 16:52:38 +0000 (16:52 +0000)]
need a domain resolving function, but get_trusted_serverlist() will do.
this is horrible.
(This used to be commit 9df973fe711f322075d86d6792d6c0b8539c1d00)

24 years agooops, pwdb_initialise() called unnecessarily from here (failure to read
Luke Leighton [Thu, 2 Dec 1999 16:38:16 +0000 (16:38 +0000)]
oops, pwdb_initialise() called unnecessarily from here (failure to read
trusted domains may cause rpcclient to fail).
(This used to be commit 12e2b973216c0798a939f68220b0e6a60acd5c01)

24 years agodefault SID map now reads in "trusted domains" from smb.conf.
Luke Leighton [Thu, 2 Dec 1999 16:31:24 +0000 (16:31 +0000)]
default SID map now reads in "trusted domains" from smb.conf.
(This used to be commit f0946d1ccafeb5f541935b41f2d54bcbc06797ed)

24 years agoimproved enumdomains added -i option.
Luke Leighton [Thu, 2 Dec 1999 01:46:01 +0000 (01:46 +0000)]
improved enumdomains added -i option.
(This used to be commit 50dc709fa95e86ebe2b3132176241cb3a2cc4e36)

24 years agoclearing up connection-related stuff. password credentials were messing
Luke Leighton [Thu, 2 Dec 1999 01:16:05 +0000 (01:16 +0000)]
clearing up connection-related stuff.  password credentials were messing
up.

added a complicated prompt which i don't like, but it tells you
domain\user@hostname$
(This used to be commit 338d08f69b0eeefa0f3f2c0217ef17ea3e815e1f)

24 years agoadded net use (actually net -S srv -U user -W dom) and net del (actually
Luke Leighton [Wed, 1 Dec 1999 22:39:27 +0000 (22:39 +0000)]
added net use (actually net -S srv -U user -W dom) and net del (actually
same as net use but with -d and -f) command options
(This used to be commit 586db87ea31ebb1b090527f61a4989461f626b1a)

24 years agomore cli_session_setup() calls. what the heck are these doing???
Luke Leighton [Wed, 1 Dec 1999 22:06:53 +0000 (22:06 +0000)]
more cli_session_setup() calls.  what the heck are these doing???
they should all be replaced with cli_establish_connection().

created cli_use_wait_keyboard() which waits on multiple cli_states
and swallows session keepalives.
(This used to be commit fcc39b3f4f2f8d04d3fab09db048b4f3dc1e97d5)

24 years agocli_session_setup() now takes an extra argument (host name). hey, what
Luke Leighton [Wed, 1 Dec 1999 21:47:30 +0000 (21:47 +0000)]
cli_session_setup() now takes an extra argument (host name).  hey, what
the heck is a cli_session_setup() call doing in here???  this should use
cli_establish_connection()server!
(This used to be commit fa054c96c62ed0f0a0c6649a7ad7a143fe09694b)

24 years agomake sure domain and name to generate trust account .mac file are upper case.
Luke Leighton [Wed, 1 Dec 1999 20:18:59 +0000 (20:18 +0000)]
make sure domain and name to generate trust account .mac file are upper case.
(This used to be commit fbfb350bdf17e84b512b745527886d942904b67d)

24 years agodamn, that took a while. nt login password was being stored incorrectly
Luke Leighton [Wed, 1 Dec 1999 20:18:21 +0000 (20:18 +0000)]
damn, that took a while.  nt login password was being stored incorrectly
in private .mac file (oops).  ntlogin test now works.
(This used to be commit c98c66690683965612e9631d77c2dff91ec8a872)

24 years agofixing joining to domain plus something weird going down with nt logins...
Luke Leighton [Wed, 1 Dec 1999 19:25:51 +0000 (19:25 +0000)]
fixing joining to domain plus something weird going down with nt logins...
(This used to be commit cef258f1c931ecb7c2dda9d5c9977153e4c1dc73)

24 years agoimproving createuser account command to be able to add workstations
Luke Leighton [Wed, 1 Dec 1999 18:47:29 +0000 (18:47 +0000)]
improving createuser account command to be able to add workstations
and then set a default random password.
(This used to be commit 7846818432a93295651c8c67445a2d6a0f3b21d8)

24 years ago1) when no domain used in ntlogin test command, should use default one
Luke Leighton [Wed, 1 Dec 1999 16:39:51 +0000 (16:39 +0000)]
1) when no domain used in ntlogin test command, should use default one
   from previous lsaquery command.  over-ridden from DOMAIN\username

2) initialisation of cli_state is a little more specific: sets use_ntlmv2
   to Auto.  this can always be over-ridden.

3) fixed reusage of ntlmssp_cli_flgs which was being a pain

4) added pwd_compare() function then fixed bug in cli_use where NULL
   domain name was making connections multiply unfruitfully

5) type-casting of mallocs and Reallocs that cause ansi-c compilers to bitch
(This used to be commit 301a6efaf67ddc96e6dcfd21b45a82863ff8f39a)

24 years agosys_select added one more argument (read, write selectors).
Luke Leighton [Wed, 1 Dec 1999 02:15:14 +0000 (02:15 +0000)]
sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9dfc51735e6932748f66a7c20b2c1cb6a)

24 years agosplit display.c into modules.
Luke Leighton [Wed, 1 Dec 1999 00:52:22 +0000 (00:52 +0000)]
split display.c into modules.
(This used to be commit 5b5719d6a08130db1062bfa24123cedcdc692bff)

24 years agoadded failed connections to the net use array, even though they'd been
Luke Leighton [Tue, 30 Nov 1999 18:01:03 +0000 (18:01 +0000)]
added failed connections to the net use array, even though they'd been
freed / cleaned up.  oops, dat bad, cos they get freed again when u quit.
(This used to be commit 3c4a6256dd790413ce96d208689e13c649787c4c)

24 years agook. this is where it gets interesting. client states are now maintained
Luke Leighton [Tue, 30 Nov 1999 00:08:39 +0000 (00:08 +0000)]
ok.  this is where it gets interesting.  client states are now maintained
by cli_net_use_add() and cli_net_use_del().  MSRPC connections are
established with cli_connection_init(), and automatically unlinked with
cli_connection_unlink.  client states are _reused_ by cli_connection_init.
(This used to be commit 0fcd8ce0967169362bd126a28aa309401abdf17d)

24 years agobug-fix
Luke Leighton [Mon, 29 Nov 1999 23:57:41 +0000 (23:57 +0000)]
bug-fix
(This used to be commit 1abdf9a45ff2e1d903a08891fbec0794349a9546)

24 years agothis is going to sound _really_ weird, ok, but i had to implement
Luke Leighton [Mon, 29 Nov 1999 23:56:09 +0000 (23:56 +0000)]
this is going to sound _really_ weird, ok, but i had to implement
equivalents of NetUseAdd and NetUseDel!
(This used to be commit 86f4b1d3cc3887c4bb7bd6433f5f932f7db1b88e)

24 years agosam sync - one of the files that use multiple connection server list
Luke Leighton [Mon, 29 Nov 1999 21:48:41 +0000 (21:48 +0000)]
sam sync - one of the files that use multiple connection server list
to \PIPE\NETLOGON.
(This used to be commit 2ae9ee148582cc0ba9e067be3d6338079aea49a1)

24 years agoattempting to resolve the issue that multiple servers often specified in
Luke Leighton [Mon, 29 Nov 1999 21:47:14 +0000 (21:47 +0000)]
attempting to resolve the issue that multiple servers often specified in
parameters to connect to \PIPE\NETLOGON.
(This used to be commit d1986ade30bdcac1f49707221a3e5a5ae597ce62)

24 years agook. got ntlogin command working. argh, it maintains a connection to
Luke Leighton [Mon, 29 Nov 1999 21:16:12 +0000 (21:16 +0000)]
ok.  got ntlogin command working.  argh, it maintains a connection to
the remote machine, because i don't know what to _do_ with it!!!!

argh!!!
(This used to be commit 85cc680736f17e3f879895be5dac8f1427653919)

24 years agofirst attempt at getting \PIPE\NETLOGON working. it's pretty horrible.
Luke Leighton [Mon, 29 Nov 1999 19:46:57 +0000 (19:46 +0000)]
first attempt at getting \PIPE\NETLOGON working.  it's pretty horrible.
(This used to be commit 44dd3efa6380544e9a515e91960f9271498cefaf)

24 years agorenamed PRINTER_HND to POLICY_HND.
Luke Leighton [Mon, 29 Nov 1999 17:45:47 +0000 (17:45 +0000)]
renamed PRINTER_HND to POLICY_HND.
(This used to be commit 8b92be25bd7d630a18c36bcd5d983386d6cd1d53)

24 years agocool! spooljobs works! this surprised me very much :-) helped to
Luke Leighton [Sat, 27 Nov 1999 23:31:45 +0000 (23:31 +0000)]
cool!  spooljobs works!  this surprised me very much :-)  helped to
specify \PIPE\spoolss instead of \PIPE\lsarpc...
(This used to be commit 4e92090016badc78ae6532f0eb57af6bbdb789bd)

24 years agowell, i stuffed up the spooler commands.
Luke Leighton [Sat, 27 Nov 1999 23:25:45 +0000 (23:25 +0000)]
well, i stuffed up the spooler commands.
(This used to be commit 7a696330586b9ad5157b0c1ab249cc66e9accef7)

24 years agomoved at command over to new abstract connection system. matthew, you
Luke Leighton [Sat, 27 Nov 1999 22:58:11 +0000 (22:58 +0000)]
moved at command over to new abstract connection system.  matthew, you
initialised dest_wks _after_ using it in at_soon() :-) so i fixed this :)
(This used to be commit 0aaf0c9c80b4a506955065e822a356b1c43a5ac5)

24 years agomoved browser command brsinfo over to new abstracted connection
Luke Leighton [Sat, 27 Nov 1999 22:53:28 +0000 (22:53 +0000)]
moved browser command brsinfo over to new abstracted connection
(This used to be commit 601d217f44ea1ce3735b9267b6f829b472a982b4)

24 years agothis one's a handle-based one (missed in the first round).
Luke Leighton [Sat, 27 Nov 1999 22:47:17 +0000 (22:47 +0000)]
this one's a handle-based one (missed in the first round).
(This used to be commit 4c3556fae73c60693355f95f48ac63834ba4dd10)

24 years agoremoved do_ prefix from srvsvc API
Luke Leighton [Sat, 27 Nov 1999 22:35:58 +0000 (22:35 +0000)]
removed do_ prefix from srvsvc API
(This used to be commit e4e5743a407b60c3695410eaf3df4ca3de4a870e)

24 years agoupdated \PIPE\wkssvc commands to use new abstracted connection system.
Luke Leighton [Sat, 27 Nov 1999 22:34:12 +0000 (22:34 +0000)]
updated \PIPE\wkssvc commands to use new abstracted connection system.

modified resolve_srv_name() to return dest host of *SMBSERVER if
server name is \\ip.add.ress.format
(This used to be commit 3204829225792974c8b20efb6ba6e24661a4f658)

24 years agousing "abstracted" cli_connection, got \PIPE\srvsvc commands up and running
Luke Leighton [Sat, 27 Nov 1999 22:19:51 +0000 (22:19 +0000)]
using "abstracted" cli_connection, got \PIPE\srvsvc commands up and running
again.
(This used to be commit 6b67d6164dbfda3ba690d86597ae560b7e5c7584)

24 years agomodified cli_connect_serverlist to take server list of format
Luke Leighton [Sat, 27 Nov 1999 22:14:37 +0000 (22:14 +0000)]
modified cli_connect_serverlist to take server list of format
\\server_name \\other_server etc.
(This used to be commit 4fd4aeb57455792bd8eaf81f8fa45bca6bd3e2e2)

24 years agofurther abstraction involving client states. main client-side code
Luke Leighton [Sat, 27 Nov 1999 21:50:11 +0000 (21:50 +0000)]
further abstraction involving client states.  main client-side code
is pretty much independent of SMB client states, which will make it
easier to add other transports.
(This used to be commit a1ff7e8fc3129ba4a04722f977bc2d3725d13624)

24 years agoremove use of client_info lsa_info_pol.
Luke Leighton [Sat, 27 Nov 1999 20:34:32 +0000 (20:34 +0000)]
remove use of client_info lsa_info_pol.
(This used to be commit 2dad9d912dbc6c4a14af63715821a51c279584c6)

24 years agoenhanced samuser command to do same thing as enumusers command (-g -u -a)
Luke Leighton [Sat, 27 Nov 1999 20:29:16 +0000 (20:29 +0000)]
enhanced samuser command to do same thing as enumusers command (-g -u -a)
except with only one user.  done by sharing same code.
(This used to be commit 4e029d50fcb9148f2d65c6be2703b1003e68cec7)

24 years agobug-fixing registry commands and the rpcclient "rpcclient" command.
Luke Leighton [Sat, 27 Nov 1999 00:02:03 +0000 (00:02 +0000)]
bug-fixing registry commands and the rpcclient "rpcclient" command.
the rpcclient "rpcclient" command allows user options to be reset
(e.g the username / password) _without_ terminating rpcclient.
try this:

rpcclient -S srv1 -U% -l log
srv1$ rpcclient -S srv2
srv2$

:-)
(This used to be commit c049865782d87ca09744ecdefb387b7852ec2ae7)

24 years agowhoa. _major_ restructure of rpcclient. fixed some buuugs, created a few.
Luke Leighton [Fri, 26 Nov 1999 23:04:19 +0000 (23:04 +0000)]
whoa.  _major_ restructure of rpcclient.  fixed some buuugs, created a few.
found out that getopt() _must_ have optind set to 0 before reuse.

still haven't decided what to do with the net* api yet...
(This used to be commit 29c480085e786905bfd92ea3cd93658f94e96e47)

24 years agothis file manages client states associated with handles.
Luke Leighton [Fri, 26 Nov 1999 22:47:50 +0000 (22:47 +0000)]
this file manages client states associated with handles.
(This used to be commit cda25778816f6d74f02c7e7c85e455b40e80bad2)

24 years agoprevious commit added an abstraction function that didn't even have
Luke Leighton [Thu, 25 Nov 1999 05:34:12 +0000 (05:34 +0000)]
previous commit added an abstraction function that didn't even have
struct cli_state, uint16 fnum into the code: rpc_hnd_api_req().
modified cli_lsarpc.c to use this.  the rest is const issues.
(This used to be commit c1ea396de21309c4cf19fd92f2573f5257c24588)

24 years agocool! completed a samr* API that _would_ look like an msdn samr* api...
Luke Leighton [Thu, 25 Nov 1999 05:26:48 +0000 (05:26 +0000)]
cool!  completed a samr* API that _would_ look like an msdn samr* api...
if microsoft bothered to publish it.  actually, there are good reasons
for not publishing it: people might write programs for it, and then
those programs wouldn't work on nt5, for example...
(This used to be commit 8ce93b80d3b4e1c1e28aa1dde38cdef184eff3c1)

24 years agoregistry API moved over to new format. reg_connect() is the top-level
Luke Leighton [Wed, 24 Nov 1999 23:40:20 +0000 (23:40 +0000)]
registry API moved over to new format.  reg_connect() is the top-level
function, which takes \\server_name.

tested a _few_ functions.  found that regcreatekey receives a Fault PDU.
(This used to be commit 45e92258e7df84c21d23c0be7e1d85457ccac551)

24 years agoservice control manager API completed. svcenum -i works, but does not
Luke Leighton [Wed, 24 Nov 1999 23:11:03 +0000 (23:11 +0000)]
service control manager API completed.  svcenum -i works, but does not
do so twice.  possible memory corruption, revolving around getopt().
(This used to be commit 7cacf8bd026f1ee274f1d352c68cf79cf4f3b499)

24 years agook. *whew*. this is the first completed part of the restructure.
Luke Leighton [Wed, 24 Nov 1999 22:45:09 +0000 (22:45 +0000)]
ok.  *whew*.  this is the first completed part of the restructure.

verified that lsaquery, lsalookupsids work, and found some bugs in the
parameters of these commands :-)

soo... we now have an lsa_* api that has the same arguments as the nt
Lsa* api!  cool!

the only significant coding difference is the introduction of a
user_credentials structure, containing user, domain, pass and ntlmssp
flags.
(This used to be commit 57bff6fe82d777e599d535f076efb2328ba1188b)

24 years agofirst stages of removing struct cli_state* and uint16 fnum from all
Luke Leighton [Wed, 24 Nov 1999 20:24:33 +0000 (20:24 +0000)]
first stages of removing struct cli_state* and uint16 fnum from all
msrpc client code.  the intent is to hide / abstract / associate
connection info behind policy handles.

this makes the msrpc functions look more and more like their nt equivalents.

who-hou!
(This used to be commit c01b18e632aede6fce7264ef6971d7ddba945cfb)

24 years agoWARNING! MOVED rpc_server/srv_lsa_hnd.c TO lib/util_hnd.c
Luke Leighton [Wed, 24 Nov 1999 18:15:50 +0000 (18:15 +0000)]
WARNING!  MOVED rpc_server/srv_lsa_hnd.c TO lib/util_hnd.c
CVS UPDATE MAY ISSUE WARNING ABOUT lib/util_hnd.c MODIFICATION
DATE BEING IN THE FUTURE.  CVS CHECKOUT A NEW REPOSITORY MAY BE
SAFER.
(This used to be commit c26e8a6ac59934ae580077df937439c2c538dbdb)

24 years agorewrote policy handle code to be generic (it's needed for client-side too)
Luke Leighton [Wed, 24 Nov 1999 18:09:33 +0000 (18:09 +0000)]
rewrote policy handle code to be generic (it's needed for client-side too)

attempted to fix regsetsec command
(This used to be commit eaac0923e0e5e3f4c3d944272a71f3235ac2a741)

24 years agooops, freed argc,argv arguments twice.
Luke Leighton [Tue, 23 Nov 1999 23:14:10 +0000 (23:14 +0000)]
oops, freed argc,argv arguments twice.
(This used to be commit 447143be81acbbcc148211183a512d4cab347ac7)

24 years agoattempted a svcset command. password is encrypted / messed up, therefore
Luke Leighton [Tue, 23 Nov 1999 23:05:47 +0000 (23:05 +0000)]
attempted a svcset command.  password is encrypted / messed up, therefore
command fails.
(This used to be commit 9193f0eff56399e9bc09787dbe785b603886eaa3)

24 years agooops!!!! wrong command!!!
Luke Leighton [Tue, 23 Nov 1999 20:32:52 +0000 (20:32 +0000)]
oops!!!! wrong command!!!
(This used to be commit cbbfef6d2a5335a6daa4fe09ea2d73197417894f)

24 years agoadding svcctl 0x1b function
Luke Leighton [Tue, 23 Nov 1999 18:57:07 +0000 (18:57 +0000)]
adding svcctl 0x1b function
(This used to be commit d5869df3716fec21d3a4237dbf5d2417d3350e11)

24 years agoshuffling msrpc code around so that it can be used independently of rpcclient
Luke Leighton [Tue, 23 Nov 1999 18:56:26 +0000 (18:56 +0000)]
shuffling msrpc code around so that it can be used independently of rpcclient
(This used to be commit e88e7d529b5bdf32ac3bc71fa8e18f6f2a98c695)

24 years agothe last one. that concludes the removal of all next_token() calls
Luke Leighton [Mon, 22 Nov 1999 20:14:13 +0000 (20:14 +0000)]
the last one.  that concludes the removal of all next_token() calls
from rpcclient/cmd_*.c.
(This used to be commit ca803c17fa51ace5f2b99b09f5c59893f43ba70d)

24 years agoanother four next_token() removals (using getopt instead)
Luke Leighton [Mon, 22 Nov 1999 19:46:26 +0000 (19:46 +0000)]
another four next_token() removals (using getopt instead)
(This used to be commit 3e76ca9b172e1a6886e714d6a36453f30ff3e771)

24 years agoanother two.
Luke Leighton [Mon, 22 Nov 1999 19:37:05 +0000 (19:37 +0000)]
another two.
(This used to be commit b0f8ef6168d04d55d53fc2d02df5f54176e4f893)

24 years agoanother one
Luke Leighton [Mon, 22 Nov 1999 19:26:56 +0000 (19:26 +0000)]
another one
(This used to be commit c1ba1bfd68fa96937decad8f1d7421daad6e30fe)

24 years agomoved two more commands over to getopt.
Luke Leighton [Mon, 22 Nov 1999 19:25:30 +0000 (19:25 +0000)]
moved two more commands over to getopt.
(This used to be commit de360d1e908b4e2e77cd028b19f3ccd07903a4dd)

24 years agookay :) all cmd_() functions now take int argc, char **argv :) that
Luke Leighton [Mon, 22 Nov 1999 19:02:39 +0000 (19:02 +0000)]
okay :)  all cmd_() functions now take int argc, char **argv :)  that
means that some commands need more work, as they still use next_token(),
the use of which i wish to avoid.

plus, i was getting fed up of the poor command-line processing in some
of these commands.  i'm starting to need getopt() in them, especially
in samsetuser.

WARNING: only cmd_samr has been modded to use getopt() so far!  reg
commands won't work, esp.
(This used to be commit 9a1efa03c8bb86c9b7e73f102a9d48fb6a57a523)

24 years agoimplement server-side generation of NTLMv2 session key. YESSS :-)
Luke Leighton [Sun, 21 Nov 1999 19:59:56 +0000 (19:59 +0000)]
implement server-side generation of NTLMv2 session key.  YESSS :-)
(This used to be commit 1092b4f6fbdf3770c0dab756b982a562def1738e)

24 years agoyou know what? this sort of thing makes me laugh. hmm, what functions
Luke Leighton [Sun, 21 Nov 1999 19:24:01 +0000 (19:24 +0000)]
you know what?  this sort of thing makes me laugh.  hmm, what functions
have we got.  and what data do we have.  hmm.. i wonder what the NTLMv2
user session key can be... hmmm... weell.... there's some hidden data
here, generated from the user password that doesn't go over-the-wire,
so that's _got_ to be involved.  and... that bit of data took a lot of
computation to produce, so it's probably _also_ involved... and md4 no, md5?
no, how about hmac_md5 yes let's try that one (the other's didn't work)
oh goodie, it worked!

i love it when this sort of thing happens.  took all of fifteen minutes to
guess it.  tried concatenating client and server challenges.  tried
concatenating _random_ bits of client and server challenges.  tried
md5 of the above.  tried hmac_md5 of the above.  eventually, it boils down
to this:

kr = MD4(NT#,username,domainname)
hmacntchal=hmac_md5(kr, nt server challenge)
sess_key = hmac_md5(kr, hmacntchal);
(This used to be commit ab174759cd210fe1be888d0c589a5b2669f7ff1e)

24 years agohmmm... have to add client-side support in domain_client_validate() to
Luke Leighton [Sun, 21 Nov 1999 17:27:20 +0000 (17:27 +0000)]
hmmm... have to add client-side support in domain_client_validate() to
_use_ user session key.
(This used to be commit be6a6b13939798a9c7242b38864f0ce842391a74)

24 years agoadding user session key into network netlogon response.
Luke Leighton [Sun, 21 Nov 1999 17:11:00 +0000 (17:11 +0000)]
adding user session key into network netlogon response.
(This used to be commit c73f6b0d02fa7700319ba696f54296006167e5d1)

24 years agomoving create user function into msrpc_samr.c
Luke Leighton [Sun, 21 Nov 1999 17:09:20 +0000 (17:09 +0000)]
moving create user function into msrpc_samr.c
(This used to be commit e885027eb705ab13c2800b8995661accad841643)

24 years agooops, #ifdef'd cli_shutdown out, as the fun has _already_ started:
Luke Leighton [Sat, 20 Nov 1999 22:05:31 +0000 (22:05 +0000)]
oops, #ifdef'd cli_shutdown out, as the fun has _already_ started:
NT refuses to play nice, and establish a trust relationship.
(This used to be commit 98c42764fba365d612a8ae4b3172b03367066112)

24 years agoattempting to establish inter-domain trust relationships. modified
Luke Leighton [Sat, 20 Nov 1999 21:59:16 +0000 (21:59 +0000)]
attempting to establish inter-domain trust relationships.  modified
smbpasswd so it can be used to set up inter-domain trust account.
(This used to be commit 99ec0620c3bf4af96440c684f880d414659de2e9)

24 years agomodified domain_client_validate to take trust account name / type. this
Luke Leighton [Sat, 20 Nov 1999 20:54:29 +0000 (20:54 +0000)]
modified domain_client_validate to take trust account name / type.  this
is to pass DOMAIN_NAME$ and SEC_CHAN_DOMAIN instead of WKSTA_NAME$ and
SEC_CHAN_WKSTA.

modified check_domain_security to determine if domain name is own domain,
and to use wksta trust account if so, otherwise check "trusting domains"
parameter and use inter-domain trust account if so, otherwise return
False.
(This used to be commit 97ec74e1fa99d773812d2df402251fafb76b181c)

24 years agodoing a code reshuffle. want to add code to establish trust relationships.
Luke Leighton [Sat, 20 Nov 1999 19:43:37 +0000 (19:43 +0000)]
doing a code reshuffle.  want to add code to establish trust relationships.
(This used to be commit 3ec269b402ba6898d905ea1029c427e1b645faf4)

24 years agodynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
Luke Leighton [Sat, 20 Nov 1999 18:17:29 +0000 (18:17 +0000)]
dynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
some of the server-side stuff.  Realloc() was being used, so it
Realloc()d some random area of memory.  oops.dynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
some of the server-side stuff.  Realloc() was being used, so it
Realloc()d some random area of memory.  oops.dynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
some of the server-side stuff.  Realloc() was being used, so it
Realloc()d some random area of memory.  oops.
(This used to be commit a51f62f4cf610c23e45251cedb543144747a3e54)