summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_processlogon.c
AgeCommit message (Collapse)AuthorFilesLines
2000-05-02Fixed wild pointer diff found by insure.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 158d9cada8c12725981d495faf8ed9f5d4306e23)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison1-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. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
2000-04-18updates from the TNG branchAndrew Tridgell1-10/+6
(This used to be commit 36fb5bc72fc6c0de719205ea34f497bfa0c4082f)
2000-04-12logic for domainsidsize is if size is zero, there's no sid, so don'tLuke Leighton1-1/+0
advance over it and 4-byte align. this _used_ to be "regardless of domainsidsize, advance by domainsidsize+3" which is wrong. (This used to be commit 5086e6425f3630d8f5ca1e25a333eb97fdf86e93)
2000-04-11include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison1-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. (This used to be commit 491eea8a20bf80d426625479326211dc975857a6)
2000-04-11add a commentAndrew Tridgell1-1/+1
(This used to be commit 0da440c8fe365fd53c313e9dc62dda7e40916d62)
2000-04-11some updates to the process logon code to reflect lukes latestAndrew Tridgell1-20/+38
research plus some cleanups (This used to be commit 1682faa1b0e95fc5acdf9b10da80a6515f8772cd)
2000-03-28damn, the test was the wrong way around for short_resuestAndrew Tridgell1-1/+1
(This used to be commit 1ac46c40118fce9443141ce19506d124a873b73d)
2000-03-27changed the definition of dos_PutUniCodeAndrew Tridgell1-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. (This used to be commit 426c90433396a95033eefcc4af97603abc934221)
2000-03-27the final part of the nmbd merge between head and tng - this gets theAndrew Tridgell1-25/+34
GETDC stuff sorted out (This used to be commit f6b56ae93e47a54317f2711533ec8208d5cbc8a9)
2000-02-23lib/system.c: Fixed gcc warnings.Jeremy Allison1-2/+2
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-22richard got the short request for GETDC right (hooray!) win9x _and_ ntLuke Leighton1-11/+24
now work. (This used to be commit 27ef1789267c7af70071ac9b1d216b4dd745578a)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-57/+34
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-11-18responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, theLuke Leighton1-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. (This used to be commit 4aea261cb0e5f34255ff83271eb5cadb0eb78bc9)
1999-11-18added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1-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. (This used to be commit 98ddeaf442cb30972cb281bf0489a6e5f7eb2883)
1999-11-15- added DCE/RPC "fault" PDU support.Luke Leighton1-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. (This used to be commit 25c70e3c984c4fed19763ed405741e83fe14f87e)
1999-08-08Fix for Win95 not being able to find PDC (for User/Server Manager, andMatthew Chapman1-11/+14
password change requests), from Michael Stockman <pgmtekn@algonet.se>. GETDC on \MAILSLOT\NET\NETLOGON necessarily returns less information than the NTLOGON version. (This used to be commit 8a603a8793cb067cd06edc3d73d0b35c427ed5ed)
1999-03-17SAMLOGON query - alignment issue is beginning to get to me.Luke Leighton1-0/+2
(This used to be commit baf55934dc5118f8c423fe05c0e4b8d7c018fa14)
1999-03-17alignment issue for UDP SAMLOGON response.Luke Leighton1-2/+2
(This used to be commit 9d01e9d86a8d22a283a8377a12bb175398547d78)
1999-03-09alignment issue in UDP SAMLOGON response.Luke Leighton1-3/+6
(This used to be commit de290627f06915d420d37d2a3ac2f736c4cf8d74)
1999-03-09oh dear, it's this one again. removed check for MAILSLOT\NTLOGON becauseLuke Leighton1-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. (This used to be commit 74c7d626cd85189c902489d220c3eca30a4b1bb1)
1999-02-15Always null-terminate strings.Matthew Chapman1-7/+7
Also some string length and sizeof(pointer) corrections. (This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
1999-02-12UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1-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). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)
1998-12-09removed the SID stuff from the head branch as well.Andrew Tridgell1-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 :) (This used to be commit be697c9ef00f1b6366228dcdd3983d68158dd94f)
1998-10-31took out Lukes change as it breaks domain logons for Win95 clientsAndrew Tridgell1-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. (This used to be commit a2bacc08955ba61aac4b45b63a54b279e5776261)
1998-10-21fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).Luke Leighton1-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. (This used to be commit c101113ec20ed0ba633e78e4ee45596cdccaf1b5)
1998-09-29Missed one removed multi-statement line. Grrr.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 7958787d9beffcd0f025c7a85469844d2e520ce5)
1998-09-29Fixed bug introduced by me in dead code elimination.Jeremy Allison1-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. (This used to be commit ea3ab46f12565ac6ccbb8c69825acedd3640ec12)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1-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. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-08-30added a dest_port parameter to send_mailslot() so we send replies toAndrew Tridgell1-3/+3
the correct port in environments like ip masq. (This used to be commit 7d455ee637b6ff70c95845f89d71573ca07b83f3)
1998-05-18chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1-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 used to be commit 7d332b2493d2089d09521250fc9b72d8953307c0)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-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. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-05-07created "passdb.c" which is an interface point to (at present) eitherLuke Leighton1-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 used to be commit 57b01ad4ffb14ebd600d4e66602b54ed987f6106)
1998-04-25This looks like a big change but really isn't.Jeremy Allison1-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. (This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)
1998-04-14Modified interfaces to getting smb password entries fromJeremy Allison1-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. (This used to be commit 1161cfb7f2b0d5a6d3e2b524a14a6f325ce70efb)
1998-03-11"For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1-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 used to be commit 118ba4d77a33248e762a2cf843fb7cbc906ee6e7)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-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. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-12-16Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.Jeremy Allison1-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 used to be commit 3605da055737e2cc0fbfffe7772721943a5be8bd)
1997-12-13This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1-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. (This used to be commit d80b0cb645f81d16734929a0b27a91c6650499bb)