summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_processlogon.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed wild pointer diff found by insure.Jeremy Allison2000-05-021-1/+1
| | | | Jeremy.
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new open mechanism Andrew & I discussed. config.sub: configure: Included the QNX patch. include/vfs.h: smbd/vfs-wrap.c: smbd/vfs.c: Added ftruncate vfs call (needed). Note that we will also need locking calls in the vfs (to be added). lib/util_unistr.c: nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump. Also fix for sidsize DOS bug. locking/locking.c: Check value of ret before using it for memdup. printing/printing.c: Convert print_fsp_open to return an allocated fsp. rpc_server/srv_lsa.c: Fix for NT domain logons. I have removed all use of lp_share_modes() from the code (although I left the parameter in the table for backwards compatibility). It no longer makes sense for this to exist. smbd/close.c: Removed lp_share_modes(). smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code. smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail. smbd/nttrans.c: smbd/reply.c: smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. smbd/open.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. In addition I have fixed a long standing race condition in the deny mode processing w.r.t. two smbd's creating a file. Andrew, please note that your original idea of using open with O_EXCL in this case would not work (I went over the races very carefully) and so we must re-check deny modes *after* the open() call returns. This is because there is a race between the open with O_EXCL and the lock of the share mode entry. Imagine the case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL, but is pre-empted before it locks the share modes and creates the deny mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY and a deny mode of DENY_NONE and the two opens would be allowed. The *only* way to fix this race is to lock the share modes after the open and then do the deny mode checks *after* this lock in the case where the file did not originally exist. This code will need extensive testing but seems to initially work. Jeremy.
* updates from the TNG branchAndrew Tridgell2000-04-181-10/+6
|
* logic for domainsidsize is if size is zero, there's no sid, so don'tLuke Leighton2000-04-121-1/+0
| | | | | | | advance over it and 4-byte align. this _used_ to be "regardless of domainsidsize, advance by domainsidsize+3" which is wrong.
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-111-3/+3
| | | | | | | | | | | | include/includes.h: Added SMB_BIG_UINT_BITS. lib/util.c: Removed align2/align4 - use macros. libsmb/namequery.c: Use ALIGN2. locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Needed to move to hiding POSIX locks at a lower layer. nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros. smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Jeremy.
* add a commentAndrew Tridgell2000-04-111-1/+1
|
* some updates to the process logon code to reflect lukes latestAndrew Tridgell2000-04-111-20/+38
| | | | research plus some cleanups
* damn, the test was the wrong way around for short_resuestAndrew Tridgell2000-03-281-1/+1
|
* changed the definition of dos_PutUniCodeAndrew Tridgell2000-03-271-9/+4
| | | | | | | | | the previous definition could result is us overflowing a buffer. The null termination was always added yet the size returned did not include the null termination. the new function takes a BOOL null_terminate, and always returns the total number of bytes consumed by the string.
* the final part of the nmbd merge between head and tng - this gets theAndrew Tridgell2000-03-271-25/+34
| | | | GETDC stuff sorted out
* lib/system.c: Fixed gcc warnings.Jeremy Allison2000-02-231-2/+2
| | | | | | nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0. Others - preparing for multiple pdu write code. Jeremy.
* richard got the short request for GETDC right (hooray!) win9x _and_ ntLuke Leighton2000-02-221-11/+24
| | | | now work.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-57/+34
|
* responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, theLuke Leighton1999-11-181-8/+8
| | | | | | | request name. modified createuser rpcclient command to examine name being added. if it ends in a $, assume that a workstation trust account is being added.
* added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1999-11-181-0/+2
| | | | | | | | reg_io_r_info() working properly. previously they weren't well understood (well, they were the first of the registry functions i did, back in december 97, ok??? :-) set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
* - added DCE/RPC "fault" PDU support.Luke Leighton1999-11-151-5/+21
| | | | | | | | | - 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.
* Fix for Win95 not being able to find PDC (for User/Server Manager, andMatthew Chapman1999-08-081-11/+14
| | | | | | password change requests), from Michael Stockman <pgmtekn@algonet.se>. GETDC on \MAILSLOT\NET\NETLOGON necessarily returns less information than the NTLOGON version.
* SAMLOGON query - alignment issue is beginning to get to me.Luke Leighton1999-03-171-0/+2
|
* alignment issue for UDP SAMLOGON response.Luke Leighton1999-03-171-2/+2
|
* alignment issue in UDP SAMLOGON response.Luke Leighton1999-03-091-3/+6
|
* oh dear, it's this one again. removed check for MAILSLOT\NTLOGON becauseLuke Leighton1999-03-091-14/+12
| | | | | | it's wrong. i've seen a packet from nt client on MAILSLOT\NETLOGON with appended undocumented unicode tacked on the end and the response contained undocumented unicode tacked on the end.
* Always null-terminate strings.Matthew Chapman1999-02-151-7/+7
| | | | Also some string length and sizeof(pointer) corrections.
* UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1999-02-121-20/+21
| | | | | | No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size).
* removed the SID stuff from the head branch as well.Andrew Tridgell1998-12-091-23/+5
| | | | | | | This allows the removal of PASSDB_OBJ, RPC_CLIENT_OBJ and RPC_PARSE_OBJ from nmbd in the head branch. so nmbd just went on a diet :)
* took out Lukes change as it breaks domain logons for Win95 clientsAndrew Tridgell1998-10-311-4/+0
| | | | | | | | | | | | | | | | | | (ie. it breaks Sues machine). Luke, your comment was: put unicode strings after SAMLOGON query regardless of whether it's an NT mailslot or a non-NT mailslot, after having observed this behaviour out of NT machines. perhaps you could post the relevant tcpdump or netmon capture so we can see what is going on? I suspect that what you saw isn't exactly what the win95 boxes are generating. Maybe you saw a GETDCxxx instead of a GETDC000 ? Maybe we need a switch based on the GETDC request type? We won't know unless we see sniffs.
* fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).Luke Leighton1998-10-211-0/+6
| | | | | | put unicode strings after SAMLOGON query regardless of whether it's an NT mailslot or a non-NT mailslot, after having observed this behaviour out of NT machines.
* Missed one removed multi-statement line. Grrr.Jeremy Allison1998-09-291-0/+1
| | | | Jeremy.
* Fixed bug introduced by me in dead code elimination.Jeremy Allison1998-09-291-22/+44
| | | | | | | Bug was caused by multiple C statements on a line. IMHO this is a *BUG* and will be treated as such.... Fixed all such multiple statements in this file. Jeremy.
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-14/+1
| | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy.
* added a dest_port parameter to send_mailslot() so we send replies toAndrew Tridgell1998-08-301-3/+3
| | | | the correct port in environments like ip masq.
* chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1998-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | ldap.c: Stoped dummy_function being prototyped. loadparm.c: Fixed slprintf sizes. nisppass.c: Fixed safe_strcpy sizes. nmbd_processlogon.c: Changed back to getsmb... from getsam... nttrans.c: Just a dump of new code. passdb.c: Moved stuff around a lot - stopped any lookups by rid. This needs to be indirected through a function table (soon). password.c: Changed back to getsmb... from getsam... reply.c: Changed back to getsmb... from getsam... slprintf.c: Fixed prototype problems. smb.h: Fixed prototype problems. smbpass.c: Changed to getsmbfile.... smbpasswd.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup. lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam... Jeremy.
* This is a security audit change of the main source.Jeremy Allison1998-05-121-9/+9
| | | | | | | | | | | | | | | | | | It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy.
* created "passdb.c" which is an interface point to (at present) eitherLuke Leighton1998-05-071-1/+1
| | | | | | | | | smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP). _none_ of the functions in ldap.c or smbpass.c should be called directly: only those in passdb.c should be used. -DUSE_LDAP is unlikely to compile at the moment.
* This looks like a big change but really isn't.Jeremy Allison1998-04-251-5/+5
| | | | | | | | | | | It is changing the global variables "myname" and "myworkgroup" to "global_myname" and "global_myworkgroup" respectively. This is to make it very explicit when we are messing with a global (don't ask - it makes the domain client code much clearer :-). Jeremy.
* Modified interfaces to getting smb password entries fromJeremy Allison1998-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | get_smbpwd_entry (now an internal function to smbpass.c) to a more UNIX-like : getsmbpwnam() - get entry by name. getsmbpwuid() - get entry by uid. Changed the type returned by the smbpasswd enumeration functions to be a void * so that people don't come to depend on it being a FILE *. These abstractions should make it much easier to replace the smbpasswd file with a better backend in future. Other files changed are to match the above changes. Jeremy.
* "For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1998-03-111-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | all I saw" - the book of Jeremy, chapter 1 :-). So here is the mega-merge of the NTDOM branch server code. It doesn't include the new client side pieces, we'll look at that later. This should give the same functionality, server wise, as the NTDOM branch does, only merged into the main branch. Any fixes to domain controler functionality should be added to the main branch, not the NTDOM branch. This code compiles without warnings on gcc2.8, but will need further testing before we are sure all the working functionality of the NTDOM server branch has been correctly carried over. I hereby declare the server side of the NTDOM branch dead (and all who sail in her :-). Jeremy.
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-3/+3
| | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy.
* Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.Jeremy Allison1997-12-161-1/+1
| | | | | | Also added code to stop old Samba servers that announce the workgroup name as master browser name when they are a local master browser. Jeremy.
* This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1997-12-131-0/+250
back into the main tree. For the cvs logs of all the files starting nmbd_*.c, look in the JRA_NMBD_REWRITE branch. That branch has now been discontinued. Jeremy.