summaryrefslogtreecommitdiffstats
path: root/source/smbd/ipc.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* when multiple independent large rpc calls come in on the same pipe,Luke Leighton1999-02-091-1/+2
| | | | prev_pdu_file_offset was not being re-initialised to zero.
* Sync up with 2.0 code.Jeremy Allison1998-11-191-0/+20
| | | | | | Added HPUX autoconf changes. Added "gross hack" printer code. Jeremy.
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-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.
* Fixed two debug prints.Jeremy Allison1998-11-111-2/+2
| | | | Jeremy.
* include/smb.h: Added #defines for lots of things - makes our code a *lot* ↵Jeremy Allison1998-10-231-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.
* server/srv_samr.c smbd/ipc.c: Changed global_myworkgroup back to fstringJeremy Allison1998-10-221-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.
* extern fstring global_myworkgroup should be a pstringLuke Leighton1998-10-221-2/+2
|
* Fixed mainly signed/unsigned issues found by SGI cc in -fullwarn mode.Jeremy Allison1998-10-211-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.
* signed / unsigned issuesLuke Leighton1998-10-211-1/+1
|
* dce/rpc. bug-fix in ipc.c (introduced today :)Luke Leighton1998-10-201-1/+1
|
* some quite important bug-fixes i missed because i transferred the wrongLuke Leighton1998-10-201-19/+8
| | | | | | | | | | | | | | smb.tgz file from my portable. particularly the call to mem_data followed by a realloc of that data in cli_pipe.c's rpc_read() function. smbd responses now use p->rdata_i which is a faked-up pointer into p->rdata's response data. rdata can be very long; rdata_i is limited to point to no more than max_tsize - 0x18 in length. this will make it an almost trivial task to add the encrypted rpc headers after rdata_i, and mem_buf_copy will cope admirably with rhdr chained to rdata_i chained to auth_verifier etc etc...
* - dce/rpc codeLuke Leighton1998-10-191-22/+2
| | | | | | | | | | | | | | | | | | | - removed debug info in struni2 and unistr2 (security risk) - rpc_pipe function was getting pointer to data then calling realloc *dur* - password check function, the start of "credential checking", user, wks, domain, pass as the credentials (not just user,pass which is incorrect in a domain context) - cli_write needs to return ssize_t not size_t, because total can be -1 if the write fails. - fixed signed / unsigned warnings (how come i don't get those any more when i compile with gcc???) - nt password change added in smbd. yes, jeremy, i verified that the SMBtrans2 version still works.
* made pass_check_smb() available for dce/rpc use.Luke Leighton1998-10-161-1/+1
|
* bug-fixing against:Luke Leighton1998-10-151-1/+40
| | | | | | | | | | | | | | | | | | AS/U: it returns dce/rpc "first" and "last" bits _clear_ in a bind/ack response, when they should be set in a (small) packet. they also, in the bind/ack do not set a secondary address string at all, so we can't check against that... Win95: client-side dce/rpc code is a bit odd. it does a "WaitNamedPipeState" and has slightly different pipe-naming (\PIPE\LANMAN is joined by \PIPE\SRVSVC, \PIPE\WINREG etc whereas nt just has \PIPE\LANMAN and \PIPE\). Win95-USRMGR.EXE: added LsaOpenPolicy (renamed existing to LsaOpenPolicy2). added SamrConnect (renamed existing to SamrConnect2).
* config: Fix crypt prototype on RedHat Linux.Jeremy Allison1998-10-151-2/+12
| | | | | | | | include/includes.h: Fix crypt prototype on RedHat Linux. smbd/fileio.c: Fix mmap bug found by WinCE client. smbd/ipc.c: Fix WinCE wierdness with pipes being opened as \server\pipe\lanman smbd/password.c: Fix encrypted null passwords. Jeremy.
* - don't generate 0 params in tortureAndrew Tridgell1998-10-081-10/+16
| | | | - handle 0 params in ipc.c
* dce/rpcLuke Leighton1998-10-071-240/+11
|
* return False _and_ a break in a switch statement.Luke Leighton1998-10-071-1/+0
|
* dce/rpcLuke Leighton1998-10-071-1/+11
|
* dce/rpcLuke Leighton1998-10-061-20/+60
|
* Got very strict about the differences and uses ofJeremy Allison1998-09-291-1/+1
| | | | | | | uid_t, gid_t and vuid. Added sys_getgroups() to get around the int * return problem. Set correct datatypes for all uid, gid and vuid variables. Jeremy.