summaryrefslogtreecommitdiff
path: root/source3/smbd/ipc.c
AgeCommit message (Collapse)AuthorFilesLines
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-20This is the current patch from Luke Leighton <lckl@samba-tng.org> to add aAndrew Bartlett1-6/+8
degree of seperation betwen reading/writing the raw NamedPipe SMB packets and the matching operations inside smbd's RPC components. This patch is designed for no change in behaviour, and my tests hold that to be true. This patch does however allow for the future loadable modules interface to specify function pointers in replacement of the fixed state. The pipes_struct has been split into two peices, with smb_np_struct taking the information that should be generic to where the data ends up. Some other minor changes are made: we get another small helper function in util_sock.c and some of the original code has better failure debugs and variable use. (As per on-list comments). Andrew Bartlett (This used to be commit 8ef13cabdddf58b741886782297fb64b2fb7e489)
2001-11-05Don't put a \n on the end of the arg to exit_server()Tim Potter1-5/+5
(This used to be commit dfb8566220c3e90ca2b757ea124f53aed103269e)
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-14/+8
(This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
2001-08-27converted smbd to use NTSTATUS by defaultAndrew Tridgell1-19/+9
major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night (This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518)
2001-07-04The big character set handling changeover!Andrew Tridgell1-1/+1
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-29Win9x weirdness. When setting the named pipe handle state on a UnicodeTim Potter1-2/+10
server, Win9x only sends \PIPE instead of \PIPE\. Looks suspiciously like an off-by one bug in the Win9x dce/rpc pipe code. (This used to be commit b4a9079833c261705e18fdcaab752cb5292a078f)
2001-06-09*Wonderful* patch from Andrew Bartlett that will help ensure tdb's areJeremy Allison1-3/+6
cleaned on clients abending connections. Thanks Andrew ! Jeremy. (This used to be commit 1b3977c5367a0b713b194f369abd9872ae01ac2a)
2001-03-13Fix from Jim McDonough of IBM for using Win9x user manager.Jeremy Allison1-2/+9
Jeremy. (This used to be commit f1839d469e1fc6054b407bd8c4d7c505d4212b45)
2001-03-13this patch does a number of things:Andrew Tridgell1-2/+2
- removes SMB_ALIGNMENT. That macro caused all sorts of problems with getting unicode aligned right in sub-protocols (such as SMBtrans and SMBtrans2). I believe the performance reasons for having SMB_ALIGNMENT has gone away with the new variants of the SMB protocol anyway, as newer commands tend to have their own internal alignment. - fix the locations where we set smb_flg2 to absolute values. We must never do this if we want a hope of coping with unicode. - add initial support for unicode on the wire in smbd. Currently enabled using SMBD_USE_UNICODE environment variable. (This used to be commit b98b1435e9d8f8622444c9ff33082977e661f16b)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-2/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2000-10-11changes to sync with 2.2. treeHerb Lewis1-2/+12
.cvsignore remove config.h - not in this directory include/profile.h profile changes lib/messages.c added message to return debug level libsmb/clierror.c cast to get rid of compiler warning libsmb/smbencrypt.c cast to get rid of compiler warning profile/profile.c add flush profile stats changes for profile struct rpc_parse/parse_samr.c fix for compiler warning rpc_server/srv_samr.c cast to get rid of compiler warning smbd/ipc.c profile stats message.c profile stats smbd/negprot.c profile stats smbd/nttrans.c profile stats smbd/trans2.c profile stats utils/smbcontrol.c new flush stats command (This used to be commit bbb24daa25dca4e4b6b1f8942cd84ee3aa1bed8e)
2000-05-12fixed error code for buffer_too_large in trans replyAndrew Tridgell1-1/+1
(This used to be commit a0a556a36b8ad0f14f97a1b7ccc5d429bf8f950e)
2000-05-10more merging voodooAndrew Tridgell1-0/+2
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell1-1/+0
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-19patch from luke to split out lanman code from ipc.c into lanman.cAndrew Tridgell1-3147/+1
(This used to be commit 95246a8432e04bcdeed962d1a6112dfd90518941)
2000-04-19- got rid of the "passive" optionAndrew Tridgell1-7/+7
- cleaned up the standard_sub_*() calls a lot (This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
2000-04-16converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell1-91/+59
to support some of this I added the following functions in util_file.c file_lines_pload : load lines from a pipe file_pload : load a pipe into memory (This used to be commit a09470817c5b21dba42f9ef4ce5e8b768a254c0b)
2000-04-16removed old commentsAndrew Tridgell1-2/+0
(This used to be commit 9f49d17d4cf904034ce3718626450dc25541b420)
2000-04-16use some symbolic names for print queue statusAndrew Tridgell1-11/+17
(This used to be commit e8418ab73667e011b15e00a844240723ff4a8cd6)
2000-04-16added helper fns to change from internal status codes to nt spoolss codesAndrew Tridgell1-5/+41
(This used to be commit 8af879b3f513e7e8ca5f63848d22824b05e68398)
2000-04-16the changes to the main smb codeAndrew Tridgell1-347/+292
------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places. (This used to be commit d870542c2884510bd45fd5b54ff2157434d53f4c)
2000-04-11finally got sick of the "extern int Client" code and the stupidAndrew Tridgell1-4/+3
assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed. (This used to be commit 5937ab14d222696e40a3fc6f0e6a536f2d7305d3)
2000-03-29Fixed bug found by JF where if the amount of data to return in the prs_structJeremy Allison1-1/+1
was small enough to pass the SMBtrans max data test we weren't setting the "more data needed" error. I was fogetting the RPC_HEADER_LEN.... I now check the correct length (current pdu staging area length). More printer spool enum stuff works now. This bug does not affect TNG. Jeremy. (This used to be commit 1c9d2c016a78b0ed11dc68adeabb709903444837)
2000-03-10getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau1-1/+0
undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F. (This used to be commit 87da4404aba29a2ebd999886e4c06958c96d3e05)
2000-03-09Big update moving the multi-pdu support from 2.0.x into HEAD for JFJeremy Allison1-26/+5
and the printer functions. Also tidied up some header includes and got the order right so you can now do a : make proto make clean make Jeremy. (This used to be commit 833cd9fba92e4ad5297b235d108dd2be8c17079b)
2000-02-23lib/system.c: Fixed gcc warnings.Jeremy Allison1-1/+1
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0. Others - preparing for multiple pdu write code. Jeremy. (This used to be commit 9f879ec396230deba34fbe5e82d8a65f92137c54)
2000-02-03Put back lots of missing calls to dos_to_unix(). Thanks toTim Potter1-10/+17
aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO) (This used to be commit 176c405d2702a4245561ff56c8eac3c754a0dea3)
2000-02-03Mega-VFS merge. Yeah baby!Tim Potter1-1/+1
Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct. (This used to be commit 3aad500c0fb61232ed3431ff4b743b5d18ec852f)
2000-01-05Moved check_plaintext_password() into smbd/chgpasswd.c from smbd/ipc.c.Jeremy Allison1-43/+0
configure configure.in include/config.h.in: Added <sys/un.h> autoconf code for Luke's UNIX domain sockets code. Jeremy. (This used to be commit 210d61db08136122f51a93428607fccd582c9e7d)
2000-01-05client/client.c: I18N fixes.Jeremy Allison1-9/+92
smbd/dir.c: Reformatting comments. smbd/ipc.c: New password change code for Win98. Jeremy. (This used to be commit 9e90122afd1b6a7cf38660fc3bc3aa8e526bf08b)
2000-01-03simple mods to add msrpc pipe redirection. default behaviour: fall backLuke Leighton1-5/+26
to using internal msrpc code in smbd. (This used to be commit 8976e26d46cb991710bc77463f7f928ac00dd4d8)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-231/+262
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-12-12delineation between smb and msrpc more marked. smbd now constructsLuke Leighton1-21/+6
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-15- added DCE/RPC "fault" PDU support.Luke Leighton1-4/+5
- disabled (AGAIN) the GETDC "if (MAILSLOT\NTLOGON)" code that will get NT5rc2 to work but WILL break win95 (AGAIN). this needs _not_ to be re-enabled but to be replaced with a better mechanism. - added SMBwrite support (note: SMBwriteX already existed) as NT5rc2 is sending DCE/RPC over SMBwrite not SMBwriteX. (This used to be commit 25c70e3c984c4fed19763ed405741e83fe14f87e)
1999-09-27don't leak printer handles,Jean-François Micouleau1-2/+5
don't coredump when adding forms, and a small non obvious memory leak in the rpc buffers J.F. (This used to be commit bee11f8889378b9f1cc6e2818fd0f8dd7ddcf10d)
1999-08-13pnum should be a uint16.Luke Leighton1-2/+2
(This used to be commit 41cb8b0ba071ef73bf00130ec863b592c16d359a)
1999-04-04Use VFS operations for file I/O.Tim Potter1-1/+1
(This used to be commit cfddbdb62485256a947a30e04c753200451cbe1c)
1999-03-25SAM database "set user info".Luke Leighton1-1/+1
---------------------------- - removed DOM_RID4 - removed SAMR_UNKNOWN_32 - added SAMR_SET_USERINFO (opcode 0x32) - added level 0x1 to SAMR_QUERY_DOM_INFO (needed for create user) - fixed pwdb_gethexpwd() it was failing on XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - added mod_sam21pwd_entry() - preparing to call mod_sam21pwd_entry() - added "user session key" to user_struct.dc. this is md4(nt#) and is needed to decode user's clear-text passwords in SAMR_SET_USERINFO. - split code out in chgpasswd.c to decode 516 byte password buffers. (This used to be commit 2e58ed742435befe419aa366c4052019fede8c23)
1999-02-24Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending onMatthew Chapman1-7/+10
whether the client supports 32-bit error codes. (This used to be commit cb5428308d6978f7bd76c1b878dd4a43135a274d)
1999-02-24Win9x user level security.Matthew Chapman1-0/+4
* Added SAMR_LOOKUP_DOMAIN (-> SamrLookupDomainInSamServer) * Added real SAMR_ENUM_DOM_GROUPS (corresponding to SamrEnumerateGroupsInDomain). The existing one is just an alias for SamrQueryDisplayInformation (see below). * Added three extra info levels to SAMR_QUERY_DISPINFO. Info level 3 is what was previously SAMR_ENUM_DOM_GROUPS; info levels 4 and 5 are simple user/group list requests used by Win9x and I suspect (haven't checked) the "low speed connection" User Manager. * Added another two aliases for SAMR_QUERY_DISPINFO, opcodes 0x30 and 0x33. Usually the first is with info level 3 and the second 4 but there is some overlap so indeed these should be implemented as just aliases. * Return ERRDOS/ERRmoredata on extra data instead of STATUS_BUFFER_OVERFLOW for Win95's benefit. On a named pipe this results in an SMBreadX as usual. Still need to fix SAMR_QUERY_DOMAIN_INFO which has a hard-coded number of users and groups - which Win95 proceeds to truncate at. (This used to be commit 7d03e6e21908f3a759a4e65c5edd850622335e3e)
1999-02-09when multiple independent large rpc calls come in on the same pipe,Luke Leighton1-1/+2
prev_pdu_file_offset was not being re-initialised to zero. (This used to be commit fcaa1214412f5a417a648d4da5c4332f75f59f57)
1998-11-19Sync up with 2.0 code.Jeremy Allison1-0/+20
Added HPUX autoconf changes. Added "gross hack" printer code. Jeremy. (This used to be commit 1ef6d3bd63722afe9c376793a6ea72046d1a0602)
1998-11-17Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1-3/+3
Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
1998-11-11Fixed two debug prints.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 74530677d5301abd2da5bcdcb1fde6e6f903ad70)
1998-10-23include/smb.h: Added #defines for lots of things - makes our code a *lot* ↵Jeremy Allison1-1/+1
easier to read. lib/util.c: Fixed Luke's set_first_token() function - should return void. smbd/close.c: Move delete_on_close into file_fd_struct structure. smbd/ipc.c: Changed local_machine back to fstring. smbd/nttrans.c: Use defines for mapping share modes. smbd/open.c: Move delete_on_close into file_fd_struct structure, added code for ALLOW_SHARE_DELETE. smbd/reply.c: Use defines for mapping share modes. smbd/trans2.c: Move delete_on_close into file_fd_struct structure. Jeremy. (This used to be commit 8e1ce307bd6a9056b4a95fe6f52ff42dc6e03a08)
1998-10-22server/srv_samr.c smbd/ipc.c: Changed global_myworkgroup back to fstringJeremy Allison1-1/+1
(as it is everywhere else). smbwrapper/smbsh.c: For IRIX n32 binaries, set _RLDN32_LIST not _RLD32_LIST. Exec users preferred shell is SHELL environment variable is set. tests/fcntl_lock.c: Added sys/types.h for systems that need this. Jeremy. (This used to be commit 50413d0d819d4f13e760ca8439c5bdde0898d63e)
1998-10-22extern fstring global_myworkgroup should be a pstringLuke Leighton1-2/+2
(This used to be commit 89f6e05ce4cc21fd2e3c0e416e49383f7b56d1ea)
1998-10-21Fixed mainly signed/unsigned issues found by SGI cc in -fullwarn mode.Jeremy Allison1-1/+1
smbd/chgpasswd.c: Fixed (my) stupid bug where I was returning stack based variables. Doh ! smbd/trans2.c: Allows SETFILEINFO as well as QFILEINFO on directory handles. Jeremy. (This used to be commit 0b44d27d0b5cc3948a6c2d78370ccddf1a84cd80)