summaryrefslogtreecommitdiffstats
path: root/source/rpc_client
Commit message (Collapse)AuthorAgeFilesLines
* printer notify code.Jean-François Micouleau2000-09-251-0/+295
| | | | | | | It only sends notifies to one client. The broadcasting notify code will code soon. J.F.
* spoolgetprinterdriver now returns "Windows NT x86" and "Windows 4.0"Gerald Carter2000-09-122-2/+2
| | | | | | | | | | driver information. Will merge into TNG. jerry
* Removed compiler warning.Tim Potter2000-08-311-5/+5
|
* changing some debug message levelsGerald Carter2000-08-181-12/+12
| | | | j-
* minor formatting fixes.Gerald Carter2000-08-141-9/+9
| | | | jerry
* FIxed some unmarshalling problems with relstr and unistr arraysGerald Carter2000-08-122-198/+158
| | | | jerry
* code formatting cleanupGerald Carter2000-08-101-6/+0
| | | | jerry
* Needed to add the SHARED attribute bit when creating a printerGerald Carter2000-08-101-3/+6
| | | | | | | | | | | | on a Samba host. Also needed to add an option to pass the share name (printer name) on the command line. And fixed the checking of the return code for spoolss_r_addprinterex() jerry
* More work on AddPrinterDriver() and AddPrinterEx() client RPC'sGerald Carter2000-08-092-10/+12
| | | | | | | | Also fixed init_unistr() to deal with a NULL source character string. -jerry
* All changes related to rpcclient...Gerald Carter2000-08-082-1/+53
| | | | | | | | | | | | | - cleaned up some code - Fixed a few memory leaks of my own making - Add AddPrinterDriver(); I'm missing some of the semantics here as the call is done correctly, but I'm not getting all the information right in the DRIVER_INFO_3 struct I think. Will work on it tomorrow some more... --jerry
* spoolss_addprinterex() was adding the printer and returning theGerald Carter2000-08-041-23/+25
| | | | | | | | | correct handle, but was deleting the connection to the server. Doh!! --jerry
* clunky support for calling AddPrinterEx(). The code currently reportsGerald Carter2000-08-041-11/+57
| | | | | | | | | | | that the call failed, but the printer shows up on the remote NT client. (note this is the client side call). I've botched the return value somewhere and will fix that today. jerry
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-011-7/+7
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* More work on rpcclient...Gerald Carter2000-07-312-87/+250
| | | | | | | | | | | | * Fixed to work with Jeremy's recent changes re: dunamic memory allocation when unmarshalling unistr[2] * included EnumPorts level 1 * more work on AddPrinterEx --jerry
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-277-95/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy.
* Found out that we are crashing spoolss in enumprinterdata.Jean-François Micouleau2000-07-262-11/+22
| | | | | | | | | So fixed enumprinterdatas in rpcclient to debug the server code, and found that the parsing code was missing 2 prs_align(). We are not crashing NT anymore. :-) J.F.
* Fixed memory leak in modify_trust_password()Tim Potter2000-07-261-0/+4
|
* some initial code for AddPrinterEx() project. Most is ifdef'd outGerald Carter2000-07-251-2/+30
| | | | | | | 'cause it's not all written. -jerry
* * Added EnumPorts()Gerald Carter2000-07-212-3/+137
| | | | | | | | * Fixed an off-by-one bug noticed by JF in GetPrinterDriverDirectory() jerry
* Fixed unitilized secdesc pointer which was causing spoolgetprinterGerald Carter2000-07-201-0/+5
| | | | | | | | | rpcclient command to fail on shared printers. jerry
* Fixed some more client SPOOLSS functions. The followingGerald Carter2000-07-183-76/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | functions work now: - spoolenum - spoolopen - spoolgetprinter - spoolgetprinterdriver Items todo: - track down memory bug with spoolenumdata - fix spoolgetprinterdriverdir - fix spoolgetdata - fix display_job_info_ctr in spooljobs All part of the rpcclient work. Jeremy, this check includes emthods for associating POLICY_HNDs and client states. See the RpcHndList_...() function calls (implemented in lib/util_list.c) --jerry
* Reverted changes from rpcclient merge - contains memory leak!Tim Potter2000-07-171-2/+9
|
* Lots of changes but no real progress in functionality.Gerald Carter2000-07-153-146/+92
| | | | | | | | | | | | | more changes to remove the ncarpc_l_* stuff. Fixed some cut and paste errors from TNG There are very subtle bugs in this code. I'll work on simplifying them in round two or three. --jerry
* More functions merged from TNG for rpcclient. They don't all workGerald Carter2000-07-144-310/+410
| | | | | | | | | currently as I have to do something about the policy handle caching issues. --jerry
* cleaned up access to prs_struct variables. Replaced all callsGerald Carter2000-07-141-10/+553
| | | | | | | | prs_free_data() => prs_mem_free prs_realloc_data => prs_grow --jerry
* removed references to loopback RPC connections.Gerald Carter2000-07-141-45/+80
| | | | | | | | added a few more kfunctions from TNG for rpcclient --jerry
* spoolenum commend (when compiled with the new prs_unistr())Gerald Carter2000-07-101-7/+9
| | | | | | | | | now works. :-) jerry
* Fix for passing NULL pointer as an array parameter inTim Potter2000-07-101-2/+2
| | | | domain_client_validate()
* More rpcclient merge issues:Gerald Carter2000-07-077-2/+972
| | | | | | | | | | | | * fixes some readline bugs from the merge * first attempt at commands (spoolenum almost works) * no changes to existing functions in HEAD; only additions of new functions. I'll weed out what I can as I go. --jerry
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-034-0/+938
| | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. --jerry
* moved secrets fns into secrets.cAndrew Tridgell2000-06-031-2/+2
|
* rpc_client/cli_lsarpc.c: Removed unused variable.Jeremy Allison2000-06-031-1/+1
| | | | | | rpc_server/srv_spoolss_nt.c: Fixed more memory leaks. smbd/nttrans.c: Fixed shadow variable problem. Jeremy.
* Fixed LsaQueryInformationPolicy level 3 to return primary domain info.Matthew Chapman2000-05-292-1/+31
| | | | | | | Domain SID is saved in secrets.tdb upon joining domain. Added "Authenticated Users" and "SYSTEM" well-known SIDs (under NT Authority).
* Added the NETDFS pipe to allow remote administration of the msdfs symlinksShirish Kalele2000-05-181-2/+3
| | | | on the samba server.
* Cutover from 2.2.x - missed in merge.Jeremy Allison2000-05-171-4/+2
| | | | Jeremy.
* the beginnings of a new scheme I've working on to allow an easierAndrew Tridgell2000-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | head/tng merge. It goes something like this: - headers from tng get copied over one at a time - the old headers get renamed to *_old.h - server side code that used the old headers gets a #define OLD_NTDOMAIN 1 #undef OLD_NTDOMAIN at the start and end of the code - mkproto.awk recognises these special defines and does magic stuff so that each .c file sees the right headers - we start moving the rpc client libraries from tng to head. if this goes OK then, in theory, we should be able to move the client side rpc code from tng to head without disturbing the existing head server side code. Then when that works we can consider merging the server side. it remains to be seen if this scheme will work. So far I've moved rpc_samr.h and don't seem to have broken anything. Note this this is still a very delicate operation, as at every step of the way I want to keep head fully functional. Please don't take part unless you discuss it with me first.
* added secrets.tdb and changed storage of trust account password to useAndrew Tridgell2000-05-081-2/+2
| | | | it
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-253-3/+0
|
* acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison2000-03-228-204/+0
| | | | | | | | | | | | | | include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy.
* added the following message to all dce/rpc client/server code, exceptLuke Leighton2000-03-228-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the spoolss code (it's cut from TNG) and the smb-dce/rpc interface code that jeremy has been working up to TNG-functionality. i also want this message to go into SAMBA_2_0 and SAMBA_2_0_RELEASE, because it is intolerable that potentially good modifications be made to code that is going to be thrown away, and people waste their time fixing bugs and adding enhancements that have already been carried out already, up to two years ago in the TNG branch. /* * THIS CODE IS OUT-OF-DATE BY TWO YEARS, IS LEGACY DESIGN AND VERY, VERY, * INCOMPLETE. PLEASE DO NOT MAKE ANY FURTHER ENHANCEMENTS TO THIS CODE * UNLESS THEY ARE ALSO CARRIED OUT IN THE SAMBA_TNG BRANCH. * * PLEASE DO NOT TREAT THIS CODE AS AUTHORITATIVE IN *ANY* WAY. * * REPEAT, PLEASE DO NOT MAKE ANY MODIFICATIONS TO THIS CODE WITHOUT * FIRST CHECKING THE EQUIVALENT MODULE IN SAMBA_TNG, UPDATING THAT * FIRST, *THEN* CONSIDER MAKING THE SAME MODIFICATION IN THIS BRANCH * * YOU WILL, ALMOST GUARANTEED, FIND THAT THE BUG-FIX OR ENHANCEMENT THAT * YOU THINK IS NECESSARY, HAS ALREADY BEEN IMPLEMENTED IN SAMBA_TNG. * IF IT HAS NOT, YOUR BUG-FIX OR ENHANCEMENT *MUST* GO INTO SAMBA_TNG * AS THE SAMBA_TNG CODE WILL REPLACE THIS MODULE WITHOUT REFERENCE TO * ANYTHING IN IT, WITH THE POSSIBLE RISK THAT THE BUG-FIX OR ENHANCEMENT * MAY BE LOST. * * PLEASE OBSERVE AND RESPECT THIS SIMPLE REQUEST. * * THANK YOU. * * lkcl@samba.org */
* system_name not server_nameTim Potter2000-02-011-1/+1
|
* this looks like a big commit, but it isn't really :)Andrew Tridgell2000-01-071-1/+0
| | | | | | | | This fixes our netbios scope handling. We now have a 'netbios scope' option in smb.conf and the scope option is removed from make_nmb_name() this was prompted by a bug in our PDC finding code where it didn't append the scope to the query of the '*' name.
* converted all our existing shared memory code to use a tdb databaseAndrew Tridgell1999-12-211-1/+1
| | | | | | | | | | | | | instead of either sysv or mmap shared memory or lock files. this means we can now completely remove locking_shm.c locking_slow.c shmem.c shmem_sysv.c and lots of other things also got simpler locking.c got a bit larger, but is much better compartmentalised now
* 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1999-12-1310-4126/+0
| | | | that were in the head branch but weren't in SAMBA_2_0
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-139-5232/+2753
|
* final part of "first" phase converting over to msrpc daemon architecture.Luke Leighton1999-12-122-2/+2
| | | | | | | | | | | | 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.
* delineation between smb and msrpc more marked. smbd now constructsLuke Leighton1999-12-122-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()...)
* OK. This code works on a RedHat 6.0 system. However smbpasswdGerald Carter1999-12-091-1/+1
| | | | | | | | | | | | | | | | | 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
* jerry spotted that get_domain_sids() was being called with the wrongLuke Leighton1999-12-081-2/+1
| | | | | arguments: get_any_dc_name() was being called with a server name not a domain name. oops.
* ABOUT TIME!!!!!!!!Luke Leighton1999-12-083-19/+22
| | | | | | | | | | | | | | | 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.