1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

108 Commits

Author SHA1 Message Date
Luke Leighton
a47cc64470 i always get caught out with non-gnu-readline code mods :-) -
Luke Leighton
294b653f2e 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.
-
Luke Leighton
f33e4ca930 promptline undefined (pline) -
Luke Leighton
12e2b97321 oops, pwdb_initialise() called unnecessarily from here (failure to read
trusted domains may cause rpcclient to fail).
-
Luke Leighton
f0946d1cca default SID map now reads in "trusted domains" from smb.conf. -
Luke Leighton
50dc709fa9 improved enumdomains added -i option. -
Luke Leighton
338d08f69b 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$
-
Luke Leighton
586db87ea3 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
-
Luke Leighton
fcc39b3f4f 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.
-
Luke Leighton
301a6efaf6 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
-
Luke Leighton
e4d92ff9df sys_select added one more argument (read, write selectors). -
Luke Leighton
5b5719d6a0 split display.c into modules. -
Luke Leighton
85cc680736 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!!!
-
Luke Leighton
44dd3efa63 first attempt at getting \PIPE\NETLOGON working. it's pretty horrible. -
Luke Leighton
a1ff7e8fc3 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.
-
Luke Leighton
4e029d50fc enhanced samuser command to do same thing as enumusers command (-g -u -a)
except with only one user.  done by sharing same code.
-
Luke Leighton
c049865782 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$

:-)
-
Luke Leighton
29c480085e 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...
-
Luke Leighton
8ce93b80d3 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...
-
Luke Leighton
45e92258e7 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.
-
Luke Leighton
7cacf8bd02 service control manager API completed. svcenum -i works, but does not
do so twice.  possible memory corruption, revolving around getopt().
-
Luke Leighton
57bff6fe82 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.
-
Luke Leighton
c01b18e632 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!
-
Luke Leighton
9193f0eff5 attempted a svcset command. password is encrypted / messed up, therefore
command fails.
-
Luke Leighton
cbbfef6d2a oops!!!! wrong command!!! -
Luke Leighton
ca803c17fa the last one. that concludes the removal of all next_token() calls
from rpcclient/cmd_*.c.
-
Luke Leighton
9a1efa03c8 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.
-
Luke Leighton
569babb393 added \PIPE\browser plus experimental brsinfo command. you wouldn't
believe the XXXX that MIGHT be involved in getting nt5rc2 to join
a samba domain...
-
Luke Leighton
c3913f8ae2 added samuserset2 rpcclient command to test ACB_XXX bit-setting on
samr opcode 0x25.  _yet_ another failed attempt to get nt5rc2 to join
a samba domain.  what _is_ it with this stuff, dammit?
-
Luke Leighton
98ddeaf442 added regqueryval command (experimental) to get reg_io_q_info() and
reg_io_r_info() working properly.  previously they weren't well
understood (well, they were the first of the registry functions i did,
back in december 97, ok??? :-)

set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
-
Luke Leighton
3273bc068d oops, mistake in parsing command-arguments. repeated calls to
next_token() should not have line to parse as first arg.  oops.
-
Luke Leighton
3146aa6b60 added rpcclient "enumdomains" command. enumerates names of domains
for which a PDC is responsible.  typical answers are:
<Name of Domain> plus <Builtin>.

against a hierarchical, down-level-compatible NT5 PDC, there's likely to
be more than these two entries!!!!!
-
Luke Leighton
e6e5caf16c debugging rpcclient spoolenum and spooljobs commands. oh, did i forget
to mention, there's a spooljobs <printer name> command, and it uses
command-line completion?  prints out NT print jobs really nicely, too.
-
Luke Leighton
e0eb390ab3 const feeding frenzy -
Luke Leighton
6947f8fac7 added command-completion printer enum code. -
Luke Leighton
135eaa9773 added rpcclient spoolenum command. enumerates printers.
spoolss_r_io_enumprinters doesn't decode strings correctly
as printer_info_1/2 code has only been written to write
structures, not read them.
-
Luke Leighton
ef7fa58fd3 spoolss openprinterex / closeprinter client-code.
experimental spoolopen <printer name> command added.

jean-francois, f.y.i. i changed the #define for SPOOLSS_OPENPRINTEREX from
op code 0x44 to 0x45.
-
Luke Leighton
c86edef90e experimental spoolss rpcclient commands -
Luke Leighton
b3f16e6b5a adding experimental set user password command to rpcclient, it returns
error wrong password against nt.  ????
-
Luke Leighton
0c700fb609 added samalias <aliasname> rpcclient command (shows info on alias)
added samaliasmem <aliasname> rpcclient command (shows members in alias)

added tab command-completion to SAM alias related commands (inc 2 above).
-
Luke Leighton
953fe6ba94 added lsaenumdomains command.
attempting to get blood out of a stone^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H
querysecret to work, it keeps returning access denied.
-
Luke Leighton
926fe6273a added rpcclient svcstop <service name> command. gnu readline
command-completion works.
-
Luke Leighton
2903f22e7e added yet another rpcclient command: svcstart <service name> [arg0] [arg1] ...
works with command-line completion on the service name (ohh yesss, this
is becoming my favourite bit of functionality-on-the-side hee hee :)

had to fix the svc_io_q_start_service() code which was missing the
ptr_argv[] array in between the array-size and the UNISTR2-array.
i.e it's actually an array of _pointers_ to unicode strings...
-
Luke Leighton
5ca07721ba command-line completion for new svcinfo command -
Luke Leighton
c243231d85 added svcinfo <service name> command. -
Luke Leighton
37f4aac06f NetServerTransportEnum parsing, client-side and rpcclient "srvtransports" added. -
Luke Leighton
bc5d021916 general, drastic improvements to rpcclient.
added samgroup <groupname> command
added samgroupmem <groupname> command

added proper registry key completion

added sam command user-completion (e.g samuser [tab])

added sam command group-completion (e.g samgroup [tab])
-
Luke Leighton
a5e805806a messing with command-line completion. it sort-of works to be able
to enumerate down a key tree, but it's a serious fudge.  oops.
-
Luke Leighton
50890516fd added gnu readline command-line completion to the regenum command. -
Luke Leighton
de69f3ef77 no CLIX, no !HAVE_READLINE blah blah. argh. -