CVS update: samba/source/rpc_pipes

Luke Leighton lkcl at samba.anu.edu.au
Fri Dec 19 06:32:09 EST 1997


Date:	Friday December 19, 1997 @ 6:32
Author:	lkcl

Update of /data/cvs/samba/source/rpc_pipes
In directory samba:/tmp/cvs-serv23960/rpc_pipes

Modified Files:
      Tag: BRANCH_NTDOM
	ntclientsamr.c pipesrvsvc.c pipeutil.c srvparse.c 
Added Files:
      Tag: BRANCH_NTDOM
	ntclientsrvsvc.c 
Log Message:

Issues
------

net file, server, share and session enumeration.  stubs in smbd, at enum
levels sufficient to give _some_ sort of info through using "SRVMGR.EXE".

one new command "srvinfo" which allows you to view the server name, num
of licenses, os version and comment.  there is also a "NetrSetServerInfo"
command, which *fortunately* only works if you are logged in as admin :-)

two new commands "srvfiles" and "srvsessions" in smbclient, which do remote
equivalents of smbstatus.  wow!  wow!  exciting!  (zzzz)  the next one will
be "srvshares".

[note: some of these info levels can be done using anon IPC$.  others need
 admin privileges].


yes, these should probably be called "showfiles" and "showsessions", because
yes, there are "NetrSetShare" commands, and yes, you can remotely disconnect
individual users, and yes, you can close individual or groups of files.

unfortunately, if we implement this, it's going to only be able to go into
the main "smb.conf" file, _not_ the smb.conf.%U or whatever, unless we do
something clever... like if you want to update smb.conf.%g, you log in under
the NIS group (e.g sales_users) and you end up "viewing" smb.conf.sales_users.

so, here's _another_ mechanism under which we can view and generate smb.conf
files :-) :-)  and given that it's a trivial job to either write perl scripts
to process smbclient output, or even to get smbclient to generate html itself,
we've got a web front-end directly onto NT server, NT workstations and samba
servers.

hur hur hur.


Modified Files
--------------

Makefile :

	added display.c and ntclientsrvsvc.c.

client.c :

	- added "srvinfo", "srvsessions", "srvfiles" commands.  srvinfo is the
	  only one that does display output.  the others are tonight's task.

	- having problems with anon ipc connection, so abandoned temporarily
	  using two connections: only using one at a time, now.

clientgen.c nmbsync.c :

	added an extra argument (a FILE*) to the higher order enumeration
	functions used by cli_NetServerEnum and cli_NetShareEnum.  these
	i will also have to put into the "srvsessions", "srvfiles" and
	"srvshares" functions, by the way...

ipc.c :

	not that it matters, but the \PIPE\srvsvc pipe is answered by "ntsvcs"
	not lsass.

ntclient.c :

	added cmd_srv_query_info; cmd_srv_query_sess; cmd_srv_query_files.

ntdomain.h rpc_pipes/pipesrvsvc.c rpc_pipes/srvparse.c :

	- added net server get and set info api defines

	- added session info levels 0, 1.

	- restructured these horrible enumeration containers several times.
	  they have been a pig to work out, even _with_ the help(?) of
	  netmon.exe.

smb.h :

	added a srvsvc_fnum for the \PIPE\srvsvc connection, to the client.

rpc_pipes/ntclientsamr.c :

	parsed this with sed to get it to use the rpc_api_pipe() function
	not cli_api_pipe().  rpc_api_pipe is the one that can handle SMBreadX
	while cli_api_pipe() just does a single DCE/RPC IPC$ send.


Added Files
-----------

display.c :

	if it goes to printf, it's not going to printf anymore: it's going
	to sprintf(FILE *out_hnd, ...) and it's going in here.  e.g
	display_share_info() which is a higher order function passed to
	cli_NetShareEnum, and prints out the received share info.

	no reason why we shouldn't make an html version of this module...

rpc_pipes/ntclientsrvsvc.c :

	client-side of the NetrServerGetInfo; NetrShareEnum and
	NetrSessionEnum code.




More information about the samba-cvs mailing list