summaryrefslogtreecommitdiffstats
path: root/source/smbd/ipc.c
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace syncup.Tim Potter2003-04-141-3/+3
|
* Merge signed/unsigned fix from HEAD.Andrew Bartlett2003-03-181-1/+1
|
* We use unsigned now, so use %u.Jeremy Allison2003-03-111-1/+1
| | | | Jeremy.
* Use ERROR_NT, not ERROR_DOS as Andrew Bartlett pointed out.Jeremy Allison2003-03-071-1/+1
| | | | Jeremy.
* Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.Jeremy Allison2003-03-071-0/+3
| | | | Jeremy.
* Found at Connectathon, .NET RC1 arranges trans/trans2/nttrans parametersJeremy Allison2003-03-071-27/+74
| | | | | differently to W2K, cope with this. Jeremy.
* Stop using hardcoded smbtrans subcommandsJim McDonough2002-11-071-3/+3
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-1/+1
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* This is the current patch from Luke Leighton <lckl@samba-tng.org> to add aAndrew Bartlett2002-01-201-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
* Don't put a \n on the end of the arg to exit_server()Tim Potter2001-11-051-5/+5
|
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-1/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-14/+8
|
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-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
* The big character set handling changeover!Andrew Tridgell2001-07-041-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.
* Win9x weirdness. When setting the named pipe handle state on a UnicodeTim Potter2001-06-291-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.
* *Wonderful* patch from Andrew Bartlett that will help ensure tdb's areJeremy Allison2001-06-091-3/+6
| | | | | cleaned on clients abending connections. Thanks Andrew ! Jeremy.
* Fix from Jim McDonough of IBM for using Win9x user manager.Jeremy Allison2001-03-131-2/+9
| | | | Jeremy.
* this patch does a number of things:Andrew Tridgell2001-03-131-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.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-2/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* changes to sync with 2.2. treeHerb Lewis2000-10-111-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
* fixed error code for buffer_too_large in trans replyAndrew Tridgell2000-05-121-1/+1
|
* more merging voodooAndrew Tridgell2000-05-101-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
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-251-1/+0
|
* patch from luke to split out lanman code from ipc.c into lanman.cAndrew Tridgell2000-04-191-3147/+1
|
* - got rid of the "passive" optionAndrew Tridgell2000-04-191-7/+7
| | | | - cleaned up the standard_sub_*() calls a lot
* converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-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
* removed old commentsAndrew Tridgell2000-04-161-2/+0
|
* use some symbolic names for print queue statusAndrew Tridgell2000-04-161-11/+17
|
* added helper fns to change from internal status codes to nt spoolss codesAndrew Tridgell2000-04-161-5/+41
|
* the changes to the main smb codeAndrew Tridgell2000-04-161-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.
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-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.
* Fixed bug found by JF where if the amount of data to return in the prs_structJeremy Allison2000-03-291-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.
* getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau2000-03-101-1/+0
| | | | | | | | | undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F.
* Big update moving the multi-pdu support from 2.0.x into HEAD for JFJeremy Allison2000-03-091-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.
* lib/system.c: Fixed gcc warnings.Jeremy Allison2000-02-231-1/+1
| | | | | | nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0. Others - preparing for multiple pdu write code. Jeremy.
* Put back lots of missing calls to dos_to_unix(). Thanks toTim Potter2000-02-031-10/+17
| | | | aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO)
* Mega-VFS merge. Yeah baby!Tim Potter2000-02-031-1/+1
| | | | | Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct.
* Moved check_plaintext_password() into smbd/chgpasswd.c from smbd/ipc.c.Jeremy Allison2000-01-051-43/+0
| | | | | | configure configure.in include/config.h.in: Added <sys/un.h> autoconf code for Luke's UNIX domain sockets code. Jeremy.
* client/client.c: I18N fixes.Jeremy Allison2000-01-051-9/+92
| | | | | | smbd/dir.c: Reformatting comments. smbd/ipc.c: New password change code for Win98. Jeremy.
* simple mods to add msrpc pipe redirection. default behaviour: fall backLuke Leighton2000-01-031-5/+26
| | | | to using internal msrpc code in smbd.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-231/+262
|
* delineation between smb and msrpc more marked. smbd now constructsLuke Leighton1999-12-121-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()...)
* - added DCE/RPC "fault" PDU support.Luke Leighton1999-11-151-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.
* don't leak printer handles,Jean-François Micouleau1999-09-271-2/+5
| | | | | | | don't coredump when adding forms, and a small non obvious memory leak in the rpc buffers J.F.
* pnum should be a uint16.Luke Leighton1999-08-131-2/+2
|
* Use VFS operations for file I/O.Tim Potter1999-04-041-1/+1
|
* SAM database "set user info".Luke Leighton1999-03-251-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.
* Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending onMatthew Chapman1999-02-241-7/+10
| | | | whether the client supports 32-bit error codes.
* Win9x user level security.Matthew Chapman1999-02-241-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.