summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_processlogon.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-28Make this an fstrcat(), as this seems to fix some weird issue with the serverAndrew Bartlett1-2/+2
name being truncated... (either way, it's the correct thing to do). Andrew Bartlett (This used to be commit a058960c15944ac5a415307f0b016553ef42e101)
2003-01-02BIG patch...Andrew Bartlett1-2/+2
This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2002-12-03Stop using hacks for dns host/domain names.Jim McDonough1-3/+5
(This used to be commit 1d0086aadb4fa57b127e80e455835dd6eb387f71)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-13/+9
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
2002-08-22fix for difference in strsep and strtok semanticsHerb Lewis1-0/+1
(This used to be commit 51e0a4adc7c6cc09e53003726b31201a091e9f35)
2002-08-20fix irix compile errors - cannot initialize array in declaration statementHerb Lewis1-1/+1
with non-const values - strsep not defined (This used to be commit a5c59b2cd10016ecbd931531602ad1cb3660bbf9)
2002-08-15The unused variable was actually needed. The correct fix is to moveTim Potter1-1/+1
it inside an #ifdef HAVE_ADS to avoid the warning and breaking the build. (-: (This used to be commit a8c4febdb760beb669048c2bf2bb0a0b1c5ed472)
2002-08-15Removed unused variable.Tim Potter1-1/+0
(This used to be commit 23f1b839e6287089511cd51ceed298d6a6d65a89)
2002-08-06Add AD version of samlogon replies for getdc. ATM it will only functionJim McDonough1-11/+103
if you have an ADS DC. (This used to be commit 059a352ebb7c7286d205bc86a92f5fd26ab1ff8e)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-12-21Add an output parameter to message_send_all that says how manyMartin Pool1-1/+1
messages were sent, so you know how many replies to expect. Const and doc religion. (This used to be commit 22e510ea0d69356be4fd2fa5ad9e9f4e84f62337)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-27How often did I read the CVS commit messageVolker Lendecke1-1/+1
"Always compile before commit" :-(( Volker (This used to be commit 69a3277fc5be35536168ba195968b8b76f0b5954)
2001-09-26From 2.2.Volker Lendecke1-0/+6
Volker (This used to be commit 50ea73426f58070859bbbe769c8353a11ff33dc9)
2001-09-17move to SAFE_FREE()Simo Sorce1-1/+1
(This used to be commit 1446a1562b1c618c023b056f476e26da7ee3d532)
2001-09-06got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell1-1/+1
(This used to be commit c26e0d3f27a05ecc8bd2390f9aab7f9451524e47)
2001-08-28Send a MSG_SMB_SAM_REPL when a UAS/SAM change netlogon message isTim Potter1-8/+34
received. (This used to be commit b7cf14bf84a19da8a5b8fe9895ce78f138b5379c)
2001-08-24Process the SAM/UAS change notification message.Tim Potter1-0/+73
(This used to be commit efcbcfaa48d36063c974c20692ee2c38d09d2216)
2001-07-04The big character set handling changeover!Andrew Tridgell1-4/+4
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. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-03-15AS/U on a sparc now joins and authenticates against a Samba PDC !Jeremy Allison1-1/+1
Jeremy. (This used to be commit 28a0bc5f5710aa732db662caa38f9da2138b5db2)
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)