summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-17Let's clean up client side ntlmssp!Tim Potter1-10/+0
Removed a dead function. (This used to be commit a1c790b5ea8de120a1d8710ac190955aea28246f)
2003-01-14Added comment about a SMB_ASSERT()Tim Potter1-0/+3
(This used to be commit 056bdfbce73bbd7ddaa198d18e596b94b2224d3d)
2003-01-02BIG patch...Andrew Bartlett1-1/+1
This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2002-11-15A cool idea from mbp: create a big shared library of all Samba objectsTim Potter1-4/+3
which we can use to link against Samba unit test programs. Now we can compile and link unit tests without having to create 4MB executables for each program It's called libbigballofmud.so both to discourage casual usage and also to reflect what the dependencies within Samba have become. (This used to be commit fdce4be719d7a81f25a4bae05934a5590038ec47)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-10/+8
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
2002-11-07What is wrong with you, Jim? Check in the final version, not an interim one...Jim McDonough1-139/+17
(This used to be commit 1fd6d34526e577b8a5463e3abcfb8fc3682e6473)
2002-11-07Allow multiple fragment RPC's to be sent.Jim McDonough1-18/+175
(This used to be commit d423e6424bc3c61281ad30cd1c66540b522b5d3e)
2002-11-02Display pipe name in rpc bind failure debug.Tim Potter1-1/+2
(This used to be commit 62ab0f8cbe7c517084383bdc9a8c97404ad27147)
2002-11-01Tidyup of some DCERPC pipe connection debugs. The new LSA_DS stuffTim Potter1-4/+3
generates some errors we haven't seen before which are inappropriately logged at level 0. (This used to be commit bd64de3716ffa9c3ebec282aa5cc0f773d3d8096)
2002-10-17Do a SMB_ASSERT() in cli_nt_session_open() when the pipe index is outTim Potter1-2/+3
of range instead of silently failing. (This used to be commit b5111f47b5cf1820550e17663f983674b67bcaff)
2002-10-08merge from APP_HEADGerald Carter1-0/+16
* s/driverlocation/comment * detect native mode domain and enumerate local groups Also * Added sendfile stats from SAMBA_2_2 (This used to be commit 764b58e2c0b3179cffe157c0ab58761b156b8423)
2002-10-04merge native_mode flag in winbindd_domain struct from app-headGerald Carter1-31/+11
(This used to be commit dd948a302ad6bd4307ecdfb10510e12185150eae)
2002-10-04merge of working dsrolegetprimdominfo() client code from APP_HEADGerald Carter1-1/+1
(This used to be commit f70caa25e4ee198151b915cf2bc0a26b2d0e243d)
2002-10-04merge of new client side support the Win2k LSARPC UUID in rpcbindGerald Carter1-29/+78
from APP_HEAD (This used to be commit 38c9e4299845fd77cc8629945ce2d259489f7437)
2002-08-20The "max data count" value in SMB transacts indicates how much the other end canShirish Kalele1-1/+1
send us. As it stands, we incorrectly set it to the number of bytes we are sending. Correcting this by setting a static value of 1024 (This could even be something larger). Improves RPC client performance. (This used to be commit b0bd42c9466f41dc87a11fd6065620f93c8ebc40)
2002-06-18more debug classess activatedSimo Sorce1-0/+3
(This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-02Add prs_dump_before to dump everything from the start of the prsMartin Pool1-1/+1
buffer up to the current position, and use this to dump pipe buffers just before parsing. (This used to be commit 92a3ab274e6cf09a8ba39b91f8bbacba6de40b37)
2002-01-02Also capture received dataMartin Pool1-0/+5
(This used to be commit 93fadcd1118b390605d2504bee63a1e8b6373ac5)
2002-01-02struct cli_state remembers the pipe name that it's talking to, if any,Martin Pool1-3/+22
so that we can print it in later debug messages. Call prs_dump to dump out requests sent by the client at sufficiently high debug levels. (This used to be commit 9973b22b34dc2a88a20b821d4e69f39d2a6aa6a3)
2001-11-03Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison1-7/+7
Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy. (This used to be commit ee5e7ca547eff016818ba5c43b8ea0c9fa69b808)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-1/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-17move to SAFE_FREE()Simo Sorce1-8/+3
(This used to be commit 549fe42bd48b3418e63ba4872bc5992dae46d514)
2001-08-10Use new client error api.Tim Potter1-12/+13
(This used to be commit b196a52483a6e4ac1e4c311ff43d3c07fca031df)
2001-08-10Use the new client error api.Tim Potter1-2/+4
(This used to be commit 688da3c41dd944f7f69083518d25e9edbc55406f)
2001-06-29Use a logical cli_read(), removed the cli_read_one() hack.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 2999eab5abe86bf08e693800c01ad544f04e4d6c)
2001-06-22Use cli_read_one() for reading DCE/RPC reply fragments. We need to checkTim Potter1-29/+36
for and ignore ERRmoredata errors as the client library doesn't support 32-bit error messages. Added some annotations for the RPC pipe code to make it a bit clearer maybe. (This used to be commit f179e0ff61794073aedcf77544865ad2f18c6e6d)
2001-06-02Removed irritating and unecessary debug message.Tim Potter1-3/+0
(This used to be commit b49c4cd441717b0edf4ad3da0edddca474a08748)
2001-05-04Added a SMB_ASSERT() so that two cli_state structures aren't openedTim Potter1-0/+3
on different pipes. This seriously confuses NT. Unfortunately HEAD branch is limited to one rpc pipe per connection as the fnum is stored inside the cli_state structure. It should really be broken out into it's own structure so multiple pipes can be opened on one TCP/IP socket. What a good idea! But look over here! I've already done it in another workarea but it will require a day or two to refactor some of the internal samba rpc client stuff (i.e netlogon requests) so it will remain uncommitted for another while. (This used to be commit 657804f3be2b621c8ee15bdb905879e208f9ca2f)
2001-03-09Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.Jeremy Allison1-10/+34
We were reading the endainness in the RPC header and then never propagating it to the internal parse_structs used to parse the data. Also removed the "align" argument to prs_init as it was *always* set to 4, and if needed can be set differently on a case by case basis. Now ready for AS/U testing when Herb gets it set up :-). Jeremy. (This used to be commit 0cd37c831d79a12a10e479bf4fa89ffe64c1292a)
2001-02-20pipe opening now works with unicodeAndrew Tridgell1-2/+2
(This used to be commit ba3ce3404e1cd2e9da3ba1708f6fc8a12c085ef2)
2000-12-04fixed a typoAndrew Tridgell1-1/+1
(This used to be commit c9e4dea1cbcf6aa748f5cb10f226345dd2f1adbf)
2000-12-04pass the desired access into cli_nt_create()Andrew Tridgell1-1/+1
(This used to be commit a2d07994e0376a8d530d262573c96710bdff2236)
2000-08-01Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison1-7/+7
NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy. (This used to be commit c55bcec817f47d6162466b193d533c877194124a)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-9/+9
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. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-07-17Reverted changes from rpcclient merge - contains memory leak!Tim Potter1-2/+9
(This used to be commit dea06ad7a554089a7394cdcb6bf5a766e8e8a6c3)
2000-07-14More functions merged from TNG for rpcclient. They don't all workGerald Carter1-9/+2
currently as I have to do something about the policy handle caching issues. --jerry (This used to be commit 233b074f490b3b01f3a462284aa8117536df0082)
2000-07-07More rpcclient merge issues:Gerald Carter1-1/+1
* 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 (This used to be commit 61d2aad5dc2b212b11c981f1eca47efa627e9fc8)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-673/+766
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-12-12delineation between smb and msrpc more marked. smbd now constructsLuke Leighton1-3/+1
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)
1999-11-29first attempt at getting \PIPE\NETLOGON working. it's pretty horrible.Luke Leighton1-12/+0
(This used to be commit 44dd3efa6380544e9a515e91960f9271498cefaf)
1999-11-27further abstraction involving client states. main client-side codeLuke Leighton1-18/+4
is pretty much independent of SMB client states, which will make it easier to add other transports. (This used to be commit a1ff7e8fc3129ba4a04722f977bc2d3725d13624)
1999-11-25cool! completed a samr* API that _would_ look like an msdn samr* api...Luke Leighton1-0/+17
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)
1999-11-24ok. *whew*. this is the first completed part of the restructure.Luke Leighton1-6/+6
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)
1999-11-24first stages of removing struct cli_state* and uint16 fnum from allLuke Leighton1-5/+8
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)
1999-11-21you know what? this sort of thing makes me laugh. hmm, what functionsLuke Leighton1-1/+1
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)
1999-11-09debugging rpcclient spoolenum and spooljobs commands. oh, did i forgetLuke Leighton1-2/+2
to mention, there's a spooljobs <printer name> command, and it uses command-line completion? prints out NT print jobs really nicely, too. (This used to be commit e6e5caf16c8d120f0c11fa63061f2786098e3357)
1999-11-06horrible code to do SMBwriteX / SMBreadX for large MSRPC reads. ARGH!Luke Leighton1-93/+127
(This used to be commit 0f9d661ca2560e88a04bc529ba41ac4cf1579fa4)
1999-10-21various. debug levels changed. nmbd doesn't need libsmb/clienttrust.c.Luke Leighton1-6/+21
samr_lookup_rids() moved to a dynamic memory structure not a static one limited to 32 RIDs. cli_pipe.c reading wasn't checking ERRmoredata when DOS error codes negotiated (this terminates MSRPC code with prejudice). (This used to be commit 8976eca2db43576c32069dcda017e8777048e007)
1999-10-14adding CAP_EXTENDED_SECURITY support in a hurry last week. forgot toLuke Leighton1-29/+0
deal with linking issues in other binaries (This used to be commit 57f95a01988fb4035b2e4448f4fd3ef0d652c106)