summaryrefslogtreecommitdiff
path: root/source3/libsmb
AgeCommit message (Collapse)AuthorFilesLines
2004-03-13Ensure we don't truncate strcmps to nstring anymore...Jeremy Allison1-1/+4
Jeremy. (This used to be commit b3aff7f214da97925690a5d0a887ea1b336d107a)
2004-03-13Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison3-14/+20
(MORIYAMA Masayuki). Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name when represented in dos charset (ie. cp932). So go back to using fstrings for these but translate into nstrings (ie. 16 byte length values) for transport on the wire. Jeremy. (This used to be commit 128dec9ae68fd357550de2649d54056ca4fc65cf)
2004-03-13First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) toJeremy Allison2-806/+855
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c so it's readable. Jeremy. (This used to be commit beca3829d1140bf7c2e394993a02dff1f2cf7bbd)
2004-03-11Restore the contract on all convert_stringXX() interfaces. Add a ↵Jeremy Allison1-1/+1
"allow_bad_conv" boolean parameter that allows broken iconv conversions to work. Gets rid of the nasty errno checks in mangle_hash2 and check_path_syntax and allows correct return code checking. Jeremy. (This used to be commit 3b4fca7b7f410cb0f11322e22c8f26a662eff941)
2004-03-10Apply some constVolker Lendecke1-2/+2
(This used to be commit e2696b81bb5e4d12281cf99dc50f91844ae51c2e)
2004-03-09Commit to HEAD the updates to smb signing code that I was propsing for 3.0.Andrew Bartlett3-54/+91
This code implements 'opportunistic signing' in our client (when the server supports it, we will use it), and correct downgrading on both the client and server for the 'enabled' (rather than required) signing level. This means that we can actually set 'server signing = yes' and not have the world fall apart. We had a number of bugs in that code, and it certainly looks like most of the testing was with the 'requried' setting. While the changes are reasonable, I'm putting this into HEAD rather than 3.0 for the timebeing. SMB signing, like NTLMSSP, tends to have gotchas in it :-) (I also need to give it a workout with more than smbclient before I move it across). Andrew Bartlett (This used to be commit 6bad895462cf076a7e917c909e2a461d1b360bf1)
2004-03-03Added client "hardlink" commant to test doing NT rename with hard links.Jeremy Allison1-2/+42
Added hardlink_internals() code - UNIX extensions now use this too. Jeremy. (This used to be commit 3f2b9f10dec58d3e3ae463e3804d96052fb27a4d)
2004-03-03Use a common function to parse all pathnames from the wire. This allowsJeremy Allison1-0/+38
much closer emulation of Win2k3 error return codes. Jeremy. (This used to be commit 883f89a0184e37bff4f5877a25d31b994996ab08)
2004-02-28Can't set allocation size on directories, return correct error code onJeremy Allison1-0/+1
fail if file exists and target is a directory. gentest. Jeremy. (This used to be commit 4b1262322995c8794cd73d84712f82d8c91abdc6)
2004-02-26That const was one too manyVolker Lendecke1-3/+2
(This used to be commit b9ae67a3a232875361d3056eef3b654e6b92c244)
2004-02-26Apply some constVolker Lendecke1-2/+3
Volker (This used to be commit f1b66461ebce4e89eb65620a09c079ae9697537b)
2004-02-20Make SMB_FILE_ACCESS_INFORMATION call work correctly.Jeremy Allison1-1/+1
Jeremy. (This used to be commit a6cb7af9bad1610e802fa5cddbf68fb887bc2974)
2004-02-20Make us bug-for-bug compatible with W2K3 - to get delete on close semanticsJeremy Allison1-3/+8
on an initial open the desired_access field *must* contain DELETE_ACCESS, simply having it map from a GENERIC_ALL won't do. Fixes delete on close test. Jeremy. (This used to be commit fb4249e7d12bee4589edff40f1e76f1a19a6ffaa)
2004-02-20AIX has already has a function called msleep(). Bugzilla #1098.Tim Potter2-3/+3
(This used to be commit 90ae3667448be9b3445f401bcd9d7e3eba374215)
2004-02-11More paranoia checks.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 4920f9bd660e22c8ac3ba1c389781f2efbcd1e78)
2004-02-11Paranoia fixes :-).Jeremy Allison1-0/+8
Jeremy. (This used to be commit 35bbc818ad28c3591df9d5cb0a674802f3f29e1a)
2004-02-10Fix for possible crash bug from Sebastian Krahmer (SuSE).Jeremy Allison1-2/+18
Jeremy. (This used to be commit e7a25c1e2ea2ff980f4aecf94f65563316976997)
2004-02-08(merge from 3.0)Andrew Bartlett1-36/+6
Remove more unused portions of the 'password cache'. Andrew Bartlett (This used to be commit 33cdb2bd18daca31461bbc45251679f50fd3567f)
2004-02-08(merge from 3.0)Andrew Bartlett1-45/+0
Remove more unused functions - this time parts of the 'password cache'. Andrew Bartlett (This used to be commit c29c28e4cfc0539eb5e02196dd6cdda7bd433f61)
2004-02-08(merge from 3.0)Andrew Bartlett1-13/+0
Remove unused utility function. Andrew Bartlett (This used to be commit af8248e67bb0f83124dcd250fee5d06a12fe257b)
2004-02-08(merge from 3.0)Andrew Bartlett1-23/+24
Make get_dc_list static - we only ask for a sorted list externally. Andrew Bartlett (This used to be commit 5335b9d5eb79dc431fb8e40e61a57370dd09486e)
2004-01-30Fix up name canonicalization (needed for krb5 keytab support later).Jeremy Allison1-3/+2
Remove source_env handler (no longer used in any codepath). Jeremy. (This used to be commit be60768e64ae2061f220faa3943dcb0588393dbc)
2004-01-26(merge from 3.0)Andrew Bartlett3-55/+113
This adds client-side support for the unicode/SAMR password change scheme. As well as avoiding DOS charset issues, this scheme returns useful error codes, that we can map back via the pam interface. This patch also cleans up the interfaces used for password buffers, to avoid duplication of code. Andrew Bartlett (This used to be commit 8063b8b6c2eb30cb116988e265fb289109d7c348)
2004-01-25(merge from 3.0)Andrew Bartlett1-2/+2
Fix the initialisation vectors for NTLM2, so that they at least make sense, even if they don't work yet. Andrew Bartlett (This used to be commit 40cc86d4b31efdee519cf2e2c9b62c4fdc885724)
2004-01-17Fix for a signing bug when the mid wraps.Jeremy Allison1-3/+11
Found by Fran Fabrizio <fran@cis.uab.edu>. Add to the *start* of the list not the end of the list. This ensures that the *last* send sequence with this mid is returned by preference. This can happen if the mid wraps and one of the early mid numbers didn't get a reply and is still lurking on the list. Jeremy. (This used to be commit b84d249e67315c153e0aa3c5c9adfcf6ca008f97)
2004-01-15* BUG 446Gerald Carter1-1/+1
- setup_logging() in smbclient to be interactive (remove the timestamps) - Fix bad return value in pull_ucs2( needs more testing to make sure this didn't break something else) that caused clistr_pull() to always read the same string from the buffer (pull_usc2() could return -1 if the original source length was given as -1) - increment some debugging messages to avoid printing them out so often (This used to be commit f452585073fbeeae3e3a0db644e381f94cb918f3)
2004-01-13* allow dns lookups to be disabled for DOMAIN#1c (and #1b)Gerald Carter1-7/+26
names * fix some a mispelled variable name (This used to be commit 93fed3074f4384dc658cd0ec81ba2afbe8192417)
2004-01-13sync HEAD with recent changes in 3.0Gerald Carter4-69/+104
(This used to be commit c98399e3c9d74e19b7c9d806ca8028b48866931e)
2004-01-09fix some warnings from the Sun compiler; also merge some of abartlet's error ↵Gerald Carter1-1/+1
code changes form 3.0 (This used to be commit 2279e98cb81faaf8a4e971fec339955f14c23858)
2004-01-06Merge NTLMSSP fixes from 3.0 to HEAD.Andrew Bartlett3-33/+93
Andrew Bartlett (This used to be commit f7d39c787771616ddb015bd77e3e6cd33f0c7a15)
2004-01-06(merge from 3.0)Andrew Bartlett2-17/+12
Change our Domain controller lookup routines to more carefully seperate DNS names (realms) from NetBIOS domain names. Until now, we would experience delays as we broadcast lookups for DNS names onto the local network segments. Now if DNS comes back negative, we fall straight back to looking up the short name. Andrew Bartlett (This used to be commit 4c3bd0a99e464198d243da302ff1868189b4dcff)
2004-01-05(merge from 3.0)Andrew Bartlett1-1/+1
Even if the 'device type' is always an ascii string, use push_string to get it out onto the wire. Avoids valgrind warnings because the fstrcpy() causes part of the wire buffer to be 'marked'. Andrew Bartlett (This used to be commit 326becbde23c8039e1f0f00930bcab094bf91ed2)
2004-01-05(merge from 3.0)Andrew Bartlett1-1/+1
auth/auth_util.c: - Fill in the 'backup' idea of a domain, if the DC didn't supply one. This doesn't seem to occour in reality, hence why we missed the typo. lib/charcnv.c: lib/smbldap.c: libads/ldap.c: libsmb/libsmbclient.c: printing/nt_printing.c: - all the callers to pull_utf8_allocate() pass a char ** as the first parammeter, so don't make them all cast it to a void ** nsswitch/winbind_util.c: - Allow for a more 'correct' view of when usernames should be qualified in winbindd. If we are a PDC, or have 'winbind trusted domains only', then for the authentication returns stip the domain portion. - Fix valgrind warning about use of free()ed name when looking up our local domain. lp_workgroup() is maniplated inside a procedure that uses it's former value. Instead, use the fact that our local domain is always the first in the list. -- Jerry rightly complained that we can't assume that the first domain is our primary domain - new domains are added to the front of the list. :-( Use a much more reliable 'flag test' instead. (note: changes winbind structures, make clean). -- Forgot to commit this for the 'get our primary domain' change. Andrew Bartlett (This used to be commit acacd27ba25f7ebfec40bfa66d34ece543569e23)
2004-01-05(merge from 3.0)Andrew Bartlett1-0/+377
Move our basic password checking code from inside the authentication subsystem into a seperate file - ntlm_check.c. This allows us to call these routines from ntlm_auth. The purpose of this exercise is to allow ntlm_auth (when operating as an NTLMSSP server) to avoid talking to winbind. This should allow for easier debugging. ntlm_auth itself has been reorgainised, so as to share more code between the SPNEGO-wrapped and 'raw' NTLMSSP modes. A new 'client' NTLMSSP mode has been added, for use with a Cyrus-SASL module I am writing (based on vl's work) Andrew Bartlett (This used to be commit 2f196bb31ac83cf7922583063c74a5f679ca5be7)
2004-01-05(merge from 3.0)Andrew Bartlett1-1/+0
Shutting down the connection closes outstanding sessions, so we don't need to do it twice... Amdrew Bartlett (This used to be commit 77b3515981ebe972a4c78e14b205d0c70a34b69f)
2003-12-27Preliminary fix for our signing problem with failed NTLMSSP logins. This patchVolker Lendecke2-9/+19
solves the problem for me here, I can still successfully set up signing using NTLMSSP against w2k3 and it does not show a signing error anymoe when the password was wrong. Jeremy, you might want to take a further look at it as this is not particularly elegant. Volker (This used to be commit 8a82060e3aee6d5ef38b1448035d865f9bce63a7)
2003-12-17Add in comments explaining NTLMv2 selection. Use lm session key if that'sJeremy Allison1-1/+13
all there is. Jeremy. (This used to be commit 3e6abeffe176cdba43d251f55f3b7aecd8fa55b1)
2003-12-17Tidyup debug message in ntlmssp code. Add brackets around dodgy if statement.Jeremy Allison1-5/+17
Jeremy (This used to be commit 6cd0f6e7c0a28ddccf55acb1e411e5ed5bd3cf47)
2003-12-17Make sure we correctly generate the lm session key.Gerald Carter2-2/+26
This fixes a problem joining a Samba domain from a vanilla win2k client that doesn't set the NTLMSSP_NEGOTIATE_NTLM2 flag. Reported on samba ml as "decode_pw: incorrect password length" when handling a samr_set_userinfo(23 or 24) RPC. (This used to be commit 14558c942beb05cd12c0e40c1bb30c3dcde8ce48)
2003-12-09Make intent to return only one address clear.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 08b6b1e43ce354cfb77701c8953565e1163ff76b)
2003-12-07Merge from 3.0:Andrew Bartlett1-8/+13
source/libsmb/ntlmssp.c: Picked up by the build farm - despite all my efforts, security=server was broken by my NTLM2 commit. This should correctly cause the NTLM2 case not to be negotiated when 'security=server' is in effect. testsuide/build_farm/runlist: Without 'non unix accounts' we can't test security=domain on the build farm. source/rpc_server/srv_samr_nt.c: Match Win2k and return 'invalid parameter' for creating of a new account with account flags of 0. Andrew Bartlett (This used to be commit e97f1eb62ae01b5259d7ecfab9b55b07103379c7)
2003-12-01Client connect signing error messages should be level zero elseJeremy Allison1-2/+2
they're easy to miss. Jeremy. (This used to be commit b5f32a0869017a3ce457bf45e4aa2c1b621162c6)
2003-12-01Fix spurious error msg. when seq=0.Jeremy Allison1-0/+2
Jeremy. (This used to be commit fd71acd1ffb3d3c2f2f82395c86512124769d592)
2003-12-01Ensure we use the same mid for the secondary trans requests, W2K3Jeremy Allison1-0/+6
does this. Jeremy. (This used to be commit e5bb3fdf4c8b2bb5b098bfbc0b4b80d947aeac6c)
2003-12-01Better fix for client signing bug. Ensure we don't malloc/free trans signingJeremy Allison2-36/+40
state info each packet. Jeremy. (This used to be commit c662e2dbc4d953b3718f69fef4517a3e7539151e)
2003-11-30Fix signing bug with secondary client trans requests. Turns out the lastJeremy Allison1-0/+20
packet is the one that matters for checking the signing replies. Need to check the server code does this correctly too.... Bug #832 reported by Volker. Jeremy. (This used to be commit 315f25fc1710e20051414bbf084cb5648129c3bb)
2003-11-26Merge from 3.0:Andrew Bartlett1-2/+6
- NTLM2 fixes, don't force NTLM2 - Don't use NTLM2 for RPC, it doesn't work yet - Add comments to winbindd_pam.c - Merge 64 bit fixes and better debug messages in winbindd.c Andrew Bartlett (This used to be commit ba94e4a1ab6dc3335bbb29686ca6795d0ffad5b0)
2003-11-25If signing starts successfully, don't just turn it off automatically ifJeremy Allison1-5/+5
it fails later. Only turn it off automatically if it fails at the start. Jeremy. (This used to be commit 2a00d538da61253455db1734b74ef1debaea24ea)
2003-11-25When server signing is set to "auto", if the client doesn't sign justJeremy Allison1-2/+23
ignore it. Only fail if signing is set to "required". Jeremy. (This used to be commit ab5db8873e2882900baa1c74706bb907baaff7fd)
2003-11-23Merge from 3.0:Andrew Bartlett1-0/+40
Add support for variable-length session keys in our client code. This means that we now support 'net rpc join' with KRB5 (des based) logins. Now, you need to hack 'net' to do that, but the principal is important... When we add kerberos to 'net rpc', it should be possible to still do user management and the like over RPC. - Add server-side support for variable-length session keys (as used by DES based krb5 logins). Andrew Bartlett (This used to be commit 1287cf5f921327c9ea758de46220c4e2dedc485c)