summaryrefslogtreecommitdiffstats
path: root/source/smbd/ipc.c
Commit message (Collapse)AuthorAgeFilesLines
* smbd/ipc.c: Fixed potential return without calling va_end().Jeremy Allison1999-01-201-1/+4
| | | | | smbd/password.c: Fixed ACB_DISABLED flag when doing 'update encrypted'. Jeremy.
* don't panic on a null params in api_reply(). instead just return anAndrew Tridgell1999-01-101-1/+4
| | | | error (smbtorture sends null params)
* HPUX fix. This looks like a big change but isn't actually, most of theJeremy Allison1998-12-101-22/+22
| | | | | | | | | | | | | | | | changes are bzero -> memset as the compiler on HPUX is very picky about bzero (probably a strange define). The significant changes are in configure.in, to fix the HPUX shadow.h problem and also move the large file support to the correct place. passdb/pass_check.c: Added includes for KRB5, DCE and AFS if requested in autoconf. tests/trapdoor.c: Fix to use setresuid and setresgid if defined. The rest of the changes are bzero -> memset. Jeremy.
* client/clientutil.c: Changed workgroup to "" for smbmount (only codeJeremy Allison1998-12-031-3/+29
| | | | | | | | | that still uses clientutil.c). passdb/passdb.c: Changed dos_mkdir to mkdir. Changed fchmod to chmod for some UNIX's that don't have fchmod. passdb/smbpass.c: Added test for uid with leading '-'. smbd/ipc.c: Added fix for invalid info level from Scott Moomaw <scott@bridgewater.edu>. Jeremy.
* configure.in: Removed net/route.h from include checks.Jeremy Allison1998-12-011-1/+0
| | | | | | include/includes.h: Removed net/route.h as it breaks SCO. smbd/ipc.c: Memory leak fix from <jasper@Cal005208.student.utwente.nl> Jeremy.
* smbd/nttrans.c: Added 'only print once' semantics for unimplemented NT SMB ↵Jeremy Allison1998-11-191-0/+20
| | | | | | | | | | calls. smbd/ipc.c: *Gross* and *disgusting* hack to try and make NT use old Lanman printer semantics. Remove as *SOON* as we get the correct SPOOLSS pipe code....... Jeremy.
* Changed (most) open()/fopen()/creat()/mmap() calls to use sys_XXX() instead.Jeremy Allison1998-11-171-3/+3
| | | | | | Needed as in the 64 bit file spec new open types are needed on many OS's to be able to seek past 32bits. 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.
* Fixed problems found in lint pass over the old code by <cpeterso@microsoft.com>.Jeremy Allison1998-09-281-10/+44
| | | | | These were the problems that still existed in the 2.0 branch. Jeremy.
* First cut at kernel oplocks. This should have no effect unless runninJeremy Allison1998-09-231-2/+1
| | | | | | | | | on a machine that supports them in autoconf. Move various functions out of lib/util.c into smbd/process.c and smbd/oplock.c where they belong. Jeremy.
* configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison1998-09-171-16/+8
| | | | | | | | | | | | | | | | | | | | | | | config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy.
* added 0x10 to the frag length in the "bind ack".Luke Leighton1998-09-071-1/+1
|
* tridge the destroyer returns!Andrew Tridgell1998-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static?
* changed the SMBtrans reply code to align at the same alignment asAndrew Tridgell1998-09-031-13/+8
| | | | | | | | | observed from NT. We were aligning the data before but not the parameters. This aligns both. This change may break some other parts of ipc.c if we have relied on the alignment somewhere, so if you think this broke something then let me know.
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy.
* bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1998-08-311-13/+13
|
* Changed ASSERT macros to SMB_ASSERT macros as some systems alreadyJeremy Allison1998-08-241-1/+1
| | | | | have an ASSERT macro defined. Jeremy.
* added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberallyAndrew Tridgell1998-08-221-7/+1
| | | | in the rpc code.
* added new smb.conf option "panic action". see my samba-technicalAndrew Tridgell1998-08-211-3/+1
| | | | explanation.
* some cleanups from the conversion of Pipes[] to a linked list. I alsoAndrew Tridgell1998-08-171-1/+1
| | | | | | | | removed most cases where a pnum is used and substituted a pipes_struct*. in files.c I added a offset of 0x1000 to all file handles on the wire. This makes it much less likely that bad parsing will give us the wrong field.
* - some tidying up in files.cAndrew Tridgell1998-08-161-7/+6
| | | | | | | | - handle null fsp in DEBUG() at end of reply_ntcreate_and_X(). Jeremy, can you fix this properly? - get snum right in print queue code in ipc.c (it was broken by my connections_struct changes).
* this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1998-08-151-89/+85
| | | | | | | in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands.
* configure: Changes for extra headers.Jeremy Allison1998-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy.
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-234/+226
| | | | | | | | Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep.
* this gets smbd compiling and linking correctly with the new layout.Andrew Tridgell1998-08-091-12/+12
|
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-291-2/+2
|
* Fixed bug found by Richard Sharpe. After increasing files_struct size byJeremy Allison1998-07-221-1/+1
| | | | | | | | | MAX_OPEN_DIRECTORIES for nttrans I forgot to update the code that enumerates the array. Created new MAX_FNUMS in local.h, changed all code that iterates through the files_struct array to use this. (sorry Richard). Jeremy.
* Makefile: Added CC=gcc to DGUX on Intel. Comment from ross@filmworks.com.Jeremy Allison1998-07-161-9/+26
| | | | | | | | | | | | ipc.c: loadparm.c: printing.c: Added code from <Dirk.DeWachter@rug.ac.be> to implement print queue pausing. New parameters are "queuepause command" and "queueresume command". util.c: Added fix for mount options in autmount map. lib/rpc/include/rpc_misc.h: Removed duplicate pipe names for Jean-Francois. Jeremy.
* ipc.c: map_username is now a BOOL function.Jeremy Allison1998-06-121-2/+2
| | | | | | | | | | | reply.c: map_username is now a BOOL function. server.c: Added capability to do map_username on service names when looking for a home directory. That's what the original code would do. lib/rpc/server/srv_util.c: Changed domain_ to builtin_ for BUILTIN aliases. username.c: Work in progress on groupname map parameter. Jeremy
* De-coupled the mapping of a Windows to UNIX username from the Get_PwnamJeremy Allison1998-06-101-0/+26
| | | | | | | | | | | | username case conversion wrapper. It is now (very) explicit where we are mapping between an incoming Windows username, and when we are doing a UNIX password entry lookup, which may change the case of the given username. This makes things *much* clearer (IMHO:-) and will ease the adding of the 'groupname map' parameter, and the addition of the special 'jeremy' mode for Samba where unix users will not be needed. (We must think of a better name for it :-). Jeremy.
* client.c: Allowed client to proceed even if it gets error 234 (more dataJeremy Allison1998-06-041-6/+5
| | | | | | | available) when scanning server/workgroup/share lists. ipc.c: Removed redundent definition of ERROR_MORE_DATA (234) we already have ERRmoredata in smb.h Jeremy.
* ipc.c: Fix bug where we don't return the correct error code when clientJeremy Allison1998-06-031-9/+12
| | | | | | | | | | gives a too-small buffer for share info. Fix from Gil Kloepfer <gil@arlut.utexas.edu> smb.h: server.c: Fix for a nastly little security problem with multi-user Windows NT servers and Samba where the contents of the open-file cache can end up being served out to users who shouldn't have access. This is some *seriously* ugly code. Jeremy.
* chgpasswd.c: Added comments to #ifdefsJeremy Allison1998-05-141-2/+3
| | | | | | | | | | | | | | | | | | | | | ipc.c: Caused samba password changing not to be done if UNIX password changing requested and not successful. util.c: Added string_to_sid() and sid_to_string() functions. lib/rpc/client/cli_samr.c: lib/rpc/include/rpc_misc.h: lib/rpc/parse/parse_lsa.c: lib/rpc/parse/parse_misc.c: lib/rpc/parse/parse_net.c: lib/rpc/parse/parse_samr.c: lib/rpc/server/srv_lsa.c: lib/rpc/server/srv_lsa_hnd.c: lib/rpc/server/srv_netlog.c: lib/rpc/server/srv_samr.c: lib/rpc/server/srv_util.c: Changes so that instead of passing SIDs around as char *, they are converted to DOM_SID at the earliest opportunity, and passed around as that. Also added dynamic memory allocation of group sids. Preparing to auto-generate machine sid. Jeremy.