1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

1639 Commits

Author SHA1 Message Date
Gerald Carter
01b87c63c9 r5518: Add initial msdfs support to smbclient. Currently I can only
cd up and down the tree and get directory listings.

Still have to figure out how to get a directory listing on a
2k dfs root.  Also have to work out some issues with relative paths
that cross dfs mount points.

We're protected from the new code paths when connecting to
a non-dfs root share ( the flag from the tcon&X is stored
in the struct cli_state* )
(This used to be commit e57fd2c5f0)
2007-10-10 10:55:44 -05:00
Gerald Carter
37ea9da1fd r5495: * add in some code from Mike Nix <mnix@wanm.com.au> for the SMBsplopen
and SMBsplclose commands (BUG 2010)
* clarify some debug messages in smbspool (also from Mike)

my changes:

* start adding msdfs client routines
* enable smbclient to maintain multiple connections
* set the CAP_DFS flag for our internal clienht routines.

I actualy have a dfs referral working in do_cd() but that code
is too ugly to live so I'm not checking it in just yet.
Further work is to merge with vl's changes in trunk to support multiple
TIDs per cli_state *.
(This used to be commit 0449756309)
2007-10-10 10:55:43 -05:00
Andrew Bartlett
acdf1aa308 r5455: Remove bogus DEBUG messages (dump for a failure to parse NTLMSSP,
before trying the alternate format).

This only caused confusion and bug reports...

Andrew Bartlett
(This used to be commit 5cb02b569b)
2007-10-10 10:55:40 -05:00
Gerald Carter
4e8c17d985 r5432: compile fixes from Jason Mader <jason@ncac.gwu.edu> -- BUGS 2340
(This used to be commit 3fd86a1f9d)
2007-10-10 10:55:40 -05:00
Gerald Carter
26dd1bab96 r5272: BUG 2132, 2134: patch from Jason Mader <jason@ncac.gwu.edu> to remove unused variables
(This used to be commit 82c4e2f37f)
2007-10-10 10:55:36 -05:00
Jeremy Allison
c24c328a9e r4970: Fix for bug 2092, allowing fallback after kerberos and allow
gnome vfs to prevent auto-anonymous logon.
Jeremy.
(This used to be commit 843e85bcd9)
2007-10-10 10:55:10 -05:00
Jeremy Allison
6f56a5be2e r4917: Merge some of Derrell.Lipman@UnwiredUniverse.com obvious fixes.
Added text explaining units in pdbedit time fields.
Jeremy.
(This used to be commit 3d09c15d8f)
2007-10-10 10:55:07 -05:00
Volker Lendecke
c85d9e735c r4570: Replace cli->nt_pipe_fnum with an array of NT file numbers, one for each
supported pipe. Netlogon is still special, as we open that twice, one to do
the auth2, the other one with schannel.

The client interface is completely unchanged for those who only use a single
pie. cli->pipe_idx is used as the index for everything except the "real"
client rpc calls, which have been explicitly converted in my last commit. Next
step is to get winbind to just use a single smb connection for multiple pipes.

Volker
(This used to be commit dc294c52e0)
2007-10-10 10:53:47 -05:00
Jeremy Allison
b46913fb95 r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
(This used to be commit efc1b688cf)
2007-10-10 10:53:42 -05:00
Jeremy Allison
9e3453459c r4212: Ensure we only look at the bottom bit of large_readx.
Set the 14 word version of write if size > 0xffff as
well as 64-bit offset.
Jeremy.
(This used to be commit 94779ccb39)
2007-10-10 10:53:37 -05:00
Jeremy Allison
4730a56263 r4188: Ensure we add in the upper length in the right place !
Jeremy.
(This used to be commit 9d4e57f06c)
2007-10-10 10:53:36 -05:00
Jeremy Allison
5b713a206b r4186: Fix client & server to allow 127k READX calls.
Jeremy.
(This used to be commit 831cb21a87)
2007-10-10 10:53:36 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
e7a0aabc2e r4020: Fix for crash reported by Bård Kalbakk <baard@inett.biz>.
Don't go fishing for the authorisation data unless we
know it's there.
Jeremy.
(This used to be commit 6f6b4c61e0)
2007-10-10 10:53:28 -05:00
Jeremy Allison
b9fcb5b961 r4005: Fix for bug #2071 reported by Jason Mader <jason@ncac.gwu.edu>.
Use correct enum type for comparisons.
Jeremy.
(This used to be commit b926480d05)
2007-10-10 10:53:27 -05:00
Jeremy Allison
90a18110e9 r3931: Fix all "may be used uninitialized" and "shadow" warnings.
Jeremy.
(This used to be commit 8e979772a6)
2007-10-10 10:53:25 -05:00
Jeremy Allison
9604545ed8 r3892: Fix "might be used uninitialized" error.
Jeremy.
(This used to be commit eead77919b)
2007-10-10 10:53:24 -05:00
Volker Lendecke
24d3605d99 r3843: If a connection to a DC is requested, open connections simultaeneously to all
DCs found. The first one to reply wins.

Volker
(This used to be commit 84ac54aef2)
2007-10-10 10:53:20 -05:00
Jeremy Allison
1b31f46f22 r3714: Getfacl now seems to work on files and directories. Next do setfacl
and port to Samba4.
Jeremy.
(This used to be commit 4d52bf7c8b)
2007-10-10 10:53:16 -05:00
Jeremy Allison
f995b164b9 r3713: Implementation of get posix acls in UNIX extensions. Passes valgrind.
Need to add printout functions in client and set posix acl in server.
SteveF - take a look at this for the cifsfs client !
Once this is working and tested the next step is to write this up for
the UNIX extensions spec. documents.
Jeremy.
(This used to be commit 1bd3f13344)
2007-10-10 10:53:16 -05:00
Jeremy Allison
8ea9237d82 r3538: Fix the build with the latest Heimdal code.
Jeremy.
(This used to be commit 34275bae78)
2007-10-10 10:53:09 -05:00
Jeremy Allison
e73d23d1ba r3535: Tidy up error reporting. Memory leak with MIT krb5 1.3.5 turns
out to be in the kerberos libraries, not in Samba. Now to test
with Heimdal.
Jeremy
(This used to be commit b08e3bf6fb)
2007-10-10 10:53:08 -05:00
Volker Lendecke
5ec9dfbf94 r3525: Fix a memleak
Volker
(This used to be commit 4c4da26aa1)
2007-10-10 10:53:08 -05:00
Günther Deschner
3688bb079e r3439: Finally fix build for platforms without kerberos.
Guenther
(This used to be commit 05619cfdbf)
2007-10-10 10:53:07 -05:00
Volker Lendecke
c64df4d746 r3407: Fix the build
(This used to be commit b144ce557f)
2007-10-10 10:53:06 -05:00
Jeremy Allison
cf47845b1c r3379: More merging of kerberos keytab and salting fixes from Nalin Dahyabhai <nalin@redhat.com>
(bugid #1717).
Jeremy.
(This used to be commit 30b8807cf6)
2007-10-10 10:53:05 -05:00
Jeremy Allison
0772ddbae1 r3377: Merge in first part of modified patch from Nalin Dahyabhai <nalin@redhat.com>
for bug #1717.The rest of the code needed to call this patch has not yet been
checked in (that's my next task). This has not yet been tested - I'll do this
once the rest of the patch is integrated.
Jeremy.
(This used to be commit 7565019286)
2007-10-10 10:53:05 -05:00
Jeremy Allison
b57feea6d3 r3345: More MIT/Heimdal tests for comparing enctypes now.
Jeremy.
(This used to be commit eefb911d0c)
2007-10-10 10:53:05 -05:00
Jeremy Allison
13542c7b50 r3342: More MIT/Heimdal fixes to allow an enctype to be explicitly set in a krb5_creds
struct.
Jeremy.
(This used to be commit c9b8049012)
2007-10-10 10:53:05 -05:00
Jeremy Allison
e798a6b9fe r3294: Fix for SMB signing with 56-bit DES session keys. From Nalin Dahyabhai <nalin@redhat.com>.
Jeremy.
(This used to be commit 55d23cb253)
2007-10-10 10:53:04 -05:00
Gerald Carter
0e1de2d773 r3264: fix lmhosts lookup so that we don't say we found something when we really didn't
(This used to be commit c7036f8246)
2007-10-10 10:53:03 -05:00
Volker Lendecke
98ed2ecc1c r3143: Allow for multiple DC's to be named as #1c names in lmhosts.
Volker
(This used to be commit 2af98ec054)
2007-10-10 10:53:02 -05:00
Jeremy Allison
2d7cd5375e r3138: Fix from Sorin Manolache <sorinm@gmail.com> for memory leak.
Jeremy.
(This used to be commit b35f48ad8e)
2007-10-10 10:53:01 -05:00
Richard Sharpe
26c106e083 r2959: If we want to support writes >= 65536 with cli_write, then it had better
return a size_t, not an ssize_t, and we had better left shift the upper
part of the write count, not right shift it.
(This used to be commit 3eb33fbc64)
2007-10-10 10:52:57 -05:00
Günther Deschner
3eff1f48d5 r2942: Add client-side support of triggering ads printer publishing over msrpc
setprinter calls inside the net-tool.

This is usefull to mimic the same queries a windows-client does. At
least win2k returns WERR_IO_PENDING when printer is published via
setprinter, samba returns WERR_OK but this does not hurt.

Guenther
(This used to be commit 69b745fb98)
2007-10-10 10:52:57 -05:00
Tim Potter
8f49721fef r2899: Change some #if DEBUG_PASSWORD's to #ifdef DEBUG_PASSWORD.
Bugzilla #1903.
(This used to be commit 1327d83d90)
2007-10-10 10:52:56 -05:00
Tim Potter
b4cf9e9505 r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
(This used to be commit 7f161702fa)
2007-10-10 10:52:55 -05:00
Tim Potter
66e689478a r2834: Netapps can return NT_STATUS_ACCESS_DENIED when trying to return the
security descriptor for a file.  Return an error in this case instead
of panicing trying to unpack a zero length buffer.  Found by Brett
Funderburg.
(This used to be commit 588de0d4a8)
2007-10-10 10:52:54 -05:00
Gerald Carter
13720fbb3e r2770: oops; internal_resolve_name() should stay static in 3.0
(This used to be commit 316302ca4a)
2007-10-10 10:52:52 -05:00
Gerald Carter
31441aaa13 r2768: BUG 1519: save the hostname used in the open_printer_ex() for later reuse when filling in the spolss replies (also gets rid of get_called_name()
(This used to be commit 57db8ca91f)
2007-10-10 10:52:52 -05:00
Jeremy Allison
f128aa2a55 r2665: Ensure the UNIX info level returned enough data.
Jeremy.
(This used to be commit 8a7741dddf)
2007-10-10 10:52:49 -05:00
Jeremy Allison
eb9a09954b r2651: Added 'stat' command to smbclient to exercise the UNIX_FILE_BASIC
info level. Outputs data on the file in the same format the the
stat command in Linux. Should be useful to people wanting to learn
how to parse the UNIX extension output.
Yes I will add the docs later :-).
Jeremy.
(This used to be commit b25cc59641)
2007-10-10 10:52:48 -05:00
Jeremy Allison
8875124a61 r2575: Return correct error codes on old SEARCH call (from Samba4 torture tester).
Jeremy.
(This used to be commit fc51c97ea8)
2007-10-10 10:52:47 -05:00
Günther Deschner
a71c7b4e17 r2474: (re-)fix memleak (initially found by jra).
heimdal 0.6.1rc3 had a bug causing winbindd to die, heimdal version
0.6.1 and higher have that fixed (thanks to Love from Heimdal).

SuSE has been informed about this possible pitfall, any other vendors
that ship with heimdal-0.6.1rc3 to be notified ?

Guenther
(This used to be commit 6239a5bec9)
2007-10-10 10:52:44 -05:00
Günther Deschner
83d5892eab r2472: Fixed krb5_krbhost_get_addrinfo()-parameters and make failure
of this call non-critical.

Thanks to Love for the patch and explaining the inner workings of
heimdal.

Guenther
(This used to be commit 4bd9d8240b)
2007-10-10 10:52:44 -05:00
Volker Lendecke
0b9e4a98c8 r2466: Fix memleak found by sean.chandler@verizon.net.
Thanks!

Volker
(This used to be commit 587d863ae8)
2007-10-10 10:52:44 -05:00
Stefan Metzmacher
10e4a96b53 r2388: fix client quota support
for the client we need the windows path and for server we need unix path

metze
(This used to be commit 54fd28f5e7)
2007-10-10 10:52:42 -05:00
Jeremy Allison
40a89ce884 r2373: Fix typo.
Jeremy.
(This used to be commit b1033fc77c)
2007-10-10 10:52:41 -05:00
Jeremy Allison
41b3720713 r2371: Fix for talking to OS/2 clients (max_mux ignored) by Guenter Kukkukk <guenter.kukkukk@kukkukk.com>.
Bugid #1590.
Jeremy.
(This used to be commit 330025d1a6)
2007-10-10 10:52:41 -05:00
Jeremy Allison
20e9f051e2 r2355: Now we've shipped 3.0.7, add in the DOS fix.
Jeremy.
(This used to be commit d6b26f9db7)
2007-10-10 10:52:40 -05:00
Jeremy Allison
571cc4811b r2224: Make nmbd more robust against bad netbios packets.
Jeremy.
(This used to be commit dd9b17abd6)
2007-10-10 10:52:36 -05:00
Gerald Carter
ed5fd7117e r2086: fix bug with winbindd_getpwnam() caused by Microsoft DC's not filling in the username in the user_info3
(This used to be commit 4703a71fa8)
2007-10-10 10:52:31 -05:00
Günther Deschner
77cc4121cf r2057: Although rarely used, prevent "net lookup kdc" from segfaulting when
using our own implementation of krb5_lookup_kdc with heimdal. Also,
heimdals krb5_krbhst_next() obviously does not retrieve the struct
addrinfo in the krb5_krbhst_info-struct, using
krb5_krbhst_get_addrinfo() instead.

Guenther
(This used to be commit cca660e109)
2007-10-10 10:52:29 -05:00
Günther Deschner
3eb42d3b6e r1965: add cli_setattrE (inspired by samba4-code). needed for further
migration-work. could someone possibly double-check the byte-count?

Guenther
(This used to be commit 27302905e8)
2007-10-10 10:52:25 -05:00
Jeremy Allison
2723be1239 r1661: Changed the password history format so that each history entry
consists of a 16 byte salt, followed by the 16 byte MD5 hash of
the concatination of the salt plus the NThash of the historical
password. Allows these to be exposed in LDAP without security issues.
Jeremy.
(This used to be commit 82e4036aaa)
2007-10-10 10:52:17 -05:00
Andrew Bartlett
748e7e4a92 r1612: Fix bug #1571 found by Guenter Kukkukk <guenter.kukkukk@kukkukk.com>
(Botched LANMAN2 session setup code)

Andrew Bartlett
(This used to be commit 3baa4ef6c5)
2007-10-10 10:52:16 -05:00
Andrew Bartlett
2a6ab27955 r1581: 'NULL' NTLMSSP is both a pain to get right, and compleatly and utterly
pointless.  With a well-known session key, we may as well put the
password change directly on the wire, with it's own 'crypted with old
password' as the protection.

This should fix some 'long password change' issues, against Samba in
particular.

Andrew Bartlett
(This used to be commit 554a913287)
2007-10-10 10:52:15 -05:00
Volker Lendecke
5cc398d23d r1560: Not that anybody uses this stuff (yet...), but at least get it correct :-)
When sending a mailslot datagram, get the packet length correction correct.

Volker
(This used to be commit 530e7f09ae)
2007-10-10 10:52:14 -05:00
Andrew Bartlett
9d0783bf21 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
(This used to be commit 36741d3cf5)
2007-10-10 10:52:13 -05:00
Andrew Bartlett
8f93b50032 r1487: Remove unused parameter for the client-side signing functions.
Andrew Bartlett
(This used to be commit 6d594d5bb1)
2007-10-10 10:52:12 -05:00
Andrew Bartlett
608172ebe3 r1428: Remove *completly bogus* memset. (No doubt my bug, too...).
This memset could well have clobbered bits of the stack, because
session_key changed from

char session_key[16];

to

DATA_BLOB session_key

Andrew Bartlett
(This used to be commit 54248a405c)
2007-10-10 10:52:11 -05:00
Gerald Carter
0122d4ef5e r1407: revert change that broke the build on systems w/o krb5 files
(This used to be commit 89a11b5d7c)
2007-10-10 10:52:10 -05:00
Gerald Carter
824bc32be7 r1399: applying heimdal krb5 fixes from Guenther and fixing compile warnings in libadskerberos_keyatb.c
(This used to be commit 837f56ec8b)
2007-10-10 10:52:10 -05:00
Jeremy Allison
f5b4721d6d r1326: Modification to get_dc_list to check negative cache. From "Joe Meadows" <jameadows@webopolis.com>.
Jeremy.
(This used to be commit 4cc38b8aea)
2007-10-10 10:52:06 -05:00
Volker Lendecke
d095357d08 r1287: Attempt to fix the build for systems without kerberos headers.
Volker
(This used to be commit 43020cf459)
2007-10-10 10:52:04 -05:00
Jeremy Allison
792776782e r1240: Ensure we don't shadow Heimdal globals.
Jeremy.
(This used to be commit 464d2e9048)
2007-10-10 10:52:02 -05:00
Jeremy Allison
2b76b28932 r1236: Heimdal fixes from Guenther Deschner <gd@sernet.de>, more to come before
it compiles with Heimdal.
Jeremy.
(This used to be commit dd07278b89)
2007-10-10 10:52:01 -05:00
Jeremy Allison
7825677b86 r1222: Valgrind memory leak fixes. Still tracking down a strange one...
Can't fix the krb5 memory leaks inside that library :-(.
Jeremy.
(This used to be commit ad440213aa)
2007-10-10 10:52:00 -05:00
Jeremy Allison
59d1794527 r1194: Definition of krb5_free_unparsed_name() if we do't have it.
Jeremy.
(This used to be commit 82c219ea02)
2007-10-10 10:51:59 -05:00
Jeremy Allison
2acd084866 r1154: Change default setting for case sensitivity to "auto". If set to auto
then is the client supports it (current clients supported are Samba and
CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare
"NT LM 0.12" string) then the setting of the per packet flag smb_flag
FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows
the linux CIFS client to use Samba in a case sensitive manner.
Additional command in smbclient "case_sensitive", toggles the
flag in subsequent packets.
Docs to follow.
Jeremy.
(This used to be commit cf84c0fe1a)
2007-10-10 10:51:57 -05:00
Andrew Bartlett
e27895d54f r1121: Fix memory leak in the trans2 signing code.
We would start the trans2 state, which is fine, but never pull the
expected reply off the packet queue.

I'm not sure if this is still a major problem after jra's recent 'no
duplicate mids on the list' change, but I think this is correct
anyway.
(This used to be commit ee23a4237d)
2007-10-10 10:51:56 -05:00
Jeremy Allison
58686e844f r1117: Doh ! Remember to turn off signing when sending a "break to level II" oplock
message, or we mess up the signing sequence number.... Also improve sign error
reporting. Also when deferring an open that had been deferred due to an oplock
break, don't re-add the mid to the pending sign queue or we increment the sequence
number twice and mess up signing again...
I can now bounce between 2 WinXP/Win2003 boxes opening Excel spreadsheets with
signing turned on and get correct "file in use" messages.
Jeremy.
(This used to be commit 1745ce4e2c)
2007-10-10 10:51:56 -05:00
Jeremy Allison
fddef6fc20 r1115: Fix for #1427. Catch bad path errors at the right point. Ensure all
our pathname parsing is consistent.
Jeremy.
(This used to be commit 5e8237e306)
2007-10-10 10:51:56 -05:00
Jeremy Allison
8c0db1bbc4 r786: Memory leak fixes in (mostly) error code paths from
kawasa_r@itg.hitachi.co.jp. A couple of mem leak fixes in
mainline code paths though :-).
Jeremy.
(This used to be commit 4695cc95fe)
2007-10-10 10:51:38 -05:00
Herb Lewis
84cea46162 r776: I should have just cut and pasted from my build area and I would
have gotten this right :-)
(This used to be commit 548070274e)
2007-10-10 10:51:37 -05:00
Herb Lewis
bb8a4a7991 r775: merge trunk 774 to samba 3_0 - fix bad compare in for loop
(This used to be commit 3cb8f1d535)
2007-10-10 10:51:37 -05:00
Richard Sharpe
4b72f4841a r618: Bug #1333. Fix a problem pointed out by coolo where I was trying to ensure
that the errno is not trashed by a DEBUG statement, but screwed up.
(This used to be commit e642f3e7b7)
2007-10-10 10:51:31 -05:00
Richard Sharpe
80728c7045 r616: Bug #1333.
Make sure we return an error code when things go wrong.
(This used to be commit 21cdb45b54)
2007-10-10 10:51:31 -05:00
Richard Sharpe
6a110a5d2b r588: Some fixes from coolo ...
I think that the ECONNREFUSED should probably be ENOENT.
(This used to be commit faa8cc18df)
2007-10-10 10:51:30 -05:00
Richard Sharpe
a6e6cd5691 r559: Some fixes from coolo ...
(This used to be commit d80e90d7c1)
2007-10-10 10:51:29 -05:00
Gerald Carter
3bbf2f1e0a r557: another patch from Stephan Kulow <coolo@suse.de> -- check cli * before dereferencing it
(This used to be commit c385fb467f)
2007-10-10 10:51:29 -05:00
Jelmer Vernooij
22cf8924a9 r547: Add entry for NT_STATUS_DUPLICATE_NAME in the ntstatus to unix error mapping
table
(This used to be commit 31c21d520d)
2007-10-10 10:51:28 -05:00
Gerald Carter
63378d6f0e r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal; also initialize some pointers
(This used to be commit be74e88d9a)
2007-10-10 10:51:28 -05:00
Jeremy Allison
675ecdd5ba r539: Mem leak fixes from kawasa_r@itg.hitachi.co.jp
Jeremy.
(This used to be commit 8fe47b0bf2)
2007-10-10 10:51:28 -05:00
Jeremy Allison
33ebb4bee5 r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.
Jeremy.
(This used to be commit b2ba4d5c1b)
2007-10-10 10:51:27 -05:00
Jeremy Allison
309bbba38b r525: More memory leak fixes from kawasa_r@itg.hitachi.co.jp in error code
paths.
Jeremy.
(This used to be commit 88a97beac4)
2007-10-10 10:51:27 -05:00
Jeremy Allison
ff343c516c r523: Fix from kawasa_r@itg.hitachi.co.jp to initialise blob structs.
Jeremy.
(This used to be commit 6d0bdccaa6)
2007-10-10 10:51:27 -05:00
Gerald Carter
04e8a07bb5 r494: patch from Stephan Kulow <coolo@kde.org> to fix a cut-n-paste error in strlen which caused Konqueror to crash
(This used to be commit 5150b62420)
2007-10-10 10:51:26 -05:00
Volker Lendecke
5c2cd8aa38 r446: Close the open NT pipes before the tdis.
Volker
(This used to be commit ef80490baf)
2007-10-10 10:51:23 -05:00
Richard Sharpe
0922c254c6 r415: Return NT_STATUS_ACCESS_DENIED not some LOCK message ...
(This used to be commit 164ff9a192)
2007-10-10 10:51:22 -05:00
Gerald Carter
042209871c r296: patch from j.lu -- don't force an upper case domain name in the ntlmssp code
(This used to be commit a2e93dda24)
2007-10-10 10:51:17 -05:00
Richard Sharpe
0374be5d93 r248: Add support for printing out the MAC address on nmblookup.
(This used to be commit bf9f02be5f)
2007-10-10 10:51:16 -05:00
Jim McDonough
3c62df4780 r221: Remainder of bug 1208. We do not remove creds from _any_ FILE ccache,
because not only does it not work on Heimdal, but also since ccaches
created within samba are memory-based, so we shouldn't touch a
FILE-based one (it was probably created via kinit or similar).
(This used to be commit 5971b0980c)
2007-10-10 10:51:14 -05:00
Jim McDonough
0859a89166 r219: Obtain new tickets if current ones are expired. Next part of fix for
bug 1208. Based on a fix from Guether Deschener.

Outstanding pieces:
- Heimdal FILE-based ccaches don't actually remove creds properly, so we
  need to code a check for this
- what if ticket expires between our check and when we use it?

Guenther has coded up fixes for these parts, but I still need
to review them, as I'm not totally comfortable with the solutions.
(This used to be commit ef008b9710)
2007-10-10 10:51:14 -05:00
Andrew Bartlett
85a307bb3e r176: Improve our fallback code for password changes - this would be better
with more correct NTLMSSP support in client and server, but it will do
for now.

Also implement LANMAN password only in the classical session setup code, but
#ifdef'ed out.  In Samba4, I'll make this run-time so we can torture it.

Lanman passwords over 14 dos characters long could be considered
'invalid' (they are truncated) - so SMBencrypt now returns 'False' if
it generates such a password.

Andrew Bartlett
(This used to be commit 565305f7bb)
2007-10-10 10:51:12 -05:00
Andrew Bartlett
b81b4711f7 r148: Ensure we do not dereference a null pointer when we return the user
session key.
(This used to be commit b09d333aed)
2007-10-10 10:51:11 -05:00
Gerald Carter
7af3777ab3 r116: volker's patch for local group and group nesting
(This used to be commit b393469d95)
2007-10-10 10:51:10 -05:00
Jeremy Allison
1db9257c95 r96: Stupid f&%'n UNIX extensions.... SETPATHINFO
normally takes as it's param entry the filename to
be acted upon.... Unless it's UNIX extensions create
hardlink, or UNIX extensions create symlink. Then it's
param -> newfile name
data -> oldfile name.
This caused me to stuff them up in 3.0.2 (and the
client commands link and symlink). Fixed them, everything
is now called oldname and newname - thus specifying which
name should already exist (hint - the old one...) and which
will be created (newname).
Jeremy.
(This used to be commit 21cc6ab7e8)
2007-10-10 10:51:08 -05:00
Andrew Bartlett
869348dfcb r84: Implement --required-membership-of=, an ntlm_auth option that restricts
all authentication to members of this particular group.

Also implement an option to allow ntlm_auth to get 'squashed' error codes,
which are safer to communicate to remote network clients.

Andrew Bartlett
(This used to be commit eb1c1b5eb0)
2007-10-10 10:51:07 -05:00
Alexander Bokovoy
c4255df992 r76: Fix smbfs problem with Tree Disconnect issued before smbfs starts its work.
We use cli_state.smb_rw_error to pass this specific case into cli_close_connection()
from smbmount as smb_rw_error can have only selected number of states and
it is ignored in cli_close_connection().

Compiled and tested by Lars Mueller from SuSE on x86, x86_64, ppc, ppc64, s390 and
s390x.
(This used to be commit 738666ce0a)
2007-10-10 10:51:07 -05:00
Andrew Bartlett
d17425ed52 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
(This used to be commit 724e8d3f33)
2007-10-10 10:51:06 -05:00
Gerald Carter
931df5850e r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
(This used to be commit a7e2730ec4)
2007-10-10 10:51:05 -05:00
Andrew Bartlett
c2ff214772 Fix most of bug #169.
For a (very) long time, we have had a bug in Samba were an NTLMv2-only
PDC would fail, because it converted the password into NTLM format for
checking.

This patch performs the direct comparison required for interactive
logons to function in this situation.  It also removes the 'auth flags', which
simply where not ever used.

Natrually, this plays with the size of structures, so rebuild, rebuild
rebuild...

Andrew Bartlett
(This used to be commit 9598593bcf)
2004-04-03 15:41:32 +00:00
Herb Lewis
70227784ba fix typo
(This used to be commit 4b737b51a5)
2004-03-31 20:24:10 +00:00
Jeremy Allison
a1994d1c96 Ensure we cope correctly with ea length of zero. Detect torture fail correctly.
Jeremy.
(This used to be commit 43db249fb8)
2004-03-30 18:38:21 +00:00
Volker Lendecke
97b200d422 Apply some const
(This used to be commit 8037750df5)
2004-03-30 08:03:32 +00:00
Jeremy Allison
099974aa15 Fix get/set of EA's in client library. Added torture test for it.
Jeremy.
(This used to be commit 0d239a9c07)
2004-03-29 22:21:47 +00:00
Andrew Bartlett
7c2b0d536b Let the comment match the function...
Andrew Bartlett
(This used to be commit 43c71b3202)
2004-03-27 10:32:59 +00:00
Andrew Bartlett
b65d7d59c2 Revert bogus part of smb signing commit - when Win2k supports singing/SPNEGO,
it does sign the first packet.

Andrew Bartlett
(This used to be commit 4b9c50db85)
2004-03-27 08:51:04 +00:00
Andrew Bartlett
63f5167a28 Add a few comments explaining KEY_EXCH
Andrew Bartlett
(This used to be commit e5422d7413)
2004-03-27 08:43:09 +00:00
Andrew Bartlett
873db3f5fd Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yet
another NTLMv2 combination.

We should allow the NTLMv2 response to be calculated with either the domain
as supplied, or the domain in UPPER case (as we always did in the past).

As a client, we always UPPER case it (as per the spec), but we also
make sure to UPPER case the domain, when we send it.  This should give
us maximum compatability.

Andrew Bartlett
(This used to be commit 1e91cd0cf8)
2004-03-27 07:53:47 +00:00
Andrew Bartlett
6dbd02d056 Make it clearer that this error refers to the peer, as this code is in both
the client and server.

Andrew Bartlett
(This used to be commit 414d3fdc75)
2004-03-27 07:51:31 +00:00
Andrew Bartlett
e9a7e67e01 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
(This used to be commit e27b5cbe75)
2004-03-27 07:33:59 +00:00
Jeremy Allison
651d5b4683 Working (tested) client code for setting EA's by filename and fnum.
Now for parsing out the retrieved EA's.
Jeremy.
(This used to be commit 5eeeee302c)
2004-03-27 02:13:58 +00:00
Jim McDonough
9a8e30d04b Fix bugzilla # 1208
Winbind tickets expired.  We now check the expiration time, and acquire
new tickets.  We couln't rely on renewing them, because if we didn't get
a request before they expired, we wouldn't have renewed them.  Also, there
is a one-week limit in MS on renewal life, so new tickets would have been
needed after a week anyway.   Default is 10 hours, so we should only be
acquiring them that often, unless the configuration on the DC is changed (and
the minimum is 1 hour).
(This used to be commit c2436c433a)
2004-03-24 17:32:55 +00:00
Jeremy Allison
90f64838f4 Added cli_set_ea(), cli_get_ea next...
Jeremy.
(This used to be commit b0c109c403)
2004-03-24 03:48:08 +00:00
Gerald Carter
56ce613679 updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD
(This used to be commit 5fbfaa687a)
2004-03-19 16:22:47 +00:00
Jeremy Allison
a0034d3586 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
(This used to be commit d7cf64b1e4)
2004-03-13 02:47:21 +00:00
Jeremy Allison
6b9dbbcd24 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (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 b4ea493599)
2004-03-13 02:16:21 +00:00
Jeremy Allison
fd2d4f87d4 First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
(This used to be commit 966e49a48c)
2004-03-13 00:28:53 +00:00
Herb Lewis
220d663b74 if we are truncating to the . we need to start at the beginning in case
there are multiple "."'s in the name.

This code is protected with an #ifdef TRUNCATE_NETBIOS_NAME and this
is #define'd to 1 directly above. Should we also get rid of the #ifdef?
(This used to be commit 0375dace24)
2004-03-12 21:35:15 +00:00
Jeremy Allison
e3f5b54270 Restore the contract on all convert_stringXX() interfaces. Add a "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 7b96765c23)
2004-03-11 22:48:24 +00:00
Jeremy Allison
f0039da196 Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
(This used to be commit aad6eb2240)
2004-03-03 23:14:23 +00:00
Jeremy Allison
fba5a72249 Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit c9f31fafed)
2004-03-03 20:55:59 +00:00
Jeremy Allison
3fb52e5cc0 Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
(This used to be commit f4a7ea6dc2)
2004-02-28 01:53:30 +00:00
Volker Lendecke
e1190848a1 That const was one too many
(This used to be commit 005d92d57e)
2004-02-26 14:34:44 +00:00
Volker Lendecke
0689a2630d Apply some const
Volker
(This used to be commit 0b29d83d33)
2004-02-26 10:55:43 +00:00
Jim McDonough
24df38dbc6 Janitor for tpot...bugzilla #1098, msleep already exists on aix
(This used to be commit 4319df7fdc)
2004-02-23 02:54:03 +00:00
Jeremy Allison
ef8f827449 Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
(This used to be commit 0ea0ada6c6)
2004-02-20 23:19:39 +00:00
Jeremy Allison
7d7849b18a Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
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 5c6f8b1053)
2004-02-20 22:45:53 +00:00
Jeremy Allison
9860bfe384 More paranoia checks.
Jeremy.
(This used to be commit adf8ee3df7)
2004-02-11 23:25:51 +00:00
Jeremy Allison
9870830104 Paranoia fixes :-).
Jeremy.
(This used to be commit 86b030197d)
2004-02-11 19:59:17 +00:00
Jeremy Allison
57dacbe948 Fix for possible crash bug from Sebastian Krahmer (SuSE).
Jeremy.
(This used to be commit e275835b51)
2004-02-10 02:21:38 +00:00
Andrew Bartlett
a69cb9c963 Remove more unused portions of the 'password cache'.
Andrew Bartlett
(This used to be commit 318e11748a)
2004-02-08 05:31:01 +00:00
Andrew Bartlett
fac5f989d3 Remove more unused functions - this time parts of the 'password cache'.
Andrew Bartlett
(This used to be commit 66569546e8)
2004-02-08 02:49:30 +00:00
Andrew Bartlett
7540296fd4 Remove unused utility function.
Andrew Bartlett
(This used to be commit 4c4aa80177)
2004-02-08 00:58:56 +00:00
Andrew Bartlett
e45c217a14 Make get_dc_list static - we only ask for a sorted list externally.
Andrew Bartlett
(This used to be commit e10e176c83)
2004-02-08 00:54:32 +00:00
Jeremy Allison
2f2e5b0191 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
(This used to be commit 3a3e336030)
2004-01-30 18:38:48 +00:00
Andrew Bartlett
784b05c489 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 2a2b1f0c87)
2004-01-26 08:45:02 +00:00
Andrew Bartlett
b31ec210fc 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 636b98dab9)
2004-01-25 01:11:10 +00:00
Jeremy Allison
bb1119acca Fix for a signing bug when the mid wraps.
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 25d739978f)
2004-01-17 00:30:35 +00:00
Gerald Carter
b20f1a95a9 * BUG 446
- 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 79fe75dcdf)
2004-01-15 19:03:18 +00:00
Gerald Carter
b085f0f08e * allow dns lookups to be disabled for DOMAIN#1c (and #1b)
names
* fix some a mispelled variable name
(This used to be commit bca702c976)
2004-01-13 19:42:53 +00:00
Gerald Carter
500c28974d fix some warnings from the Sun compiler
(This used to be commit ebabf72a78)
2004-01-09 14:54:33 +00:00
Andrew Bartlett
f1f24c7c6f Romve debugging assertions (oops...)
Andrew Bartlett
(This used to be commit 7e75a6d681)
2004-01-09 02:47:35 +00:00
Andrew Bartlett
9e1c7dd516 Add a new type of name lookup 'ads'. This seperates this from normal
hostname lookups, and ensures that we don't lookup 'short' (ie NetBIOS)
domain names in DNS.

Andrew Bartlett
(This used to be commit 35f6347a73)
2004-01-09 02:38:58 +00:00
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +00:00
Andrew Bartlett
e0ec9d2d56 Make it clearer that the domain here is the domain of the user for
authentication.

Andrew Bartlett
(This used to be commit 7e6cc8f003)
2004-01-08 02:57:42 +00:00
Andrew Bartlett
cfa4469c1e Fix more cases to ensure that as a server, we don't complain to the client
about our server-side lack of session key.

Andrew Bartlett
(This used to be commit ba33f1e0d5)
2004-01-05 21:24:27 +00:00
Jeremy Allison
2ed5a1a340 Ensure we set "always sign" flag if set. We don't currently do anything with
this but we should log the fact it was negotiated.
Jeremy.
(This used to be commit 84d34e32be)
2004-01-05 19:21:06 +00:00
Andrew Bartlett
ed55d03c8a Don't free the encrypted_session_key early - that causes the subsequent
test for a valid length to fail...

This should fix 'security=server' and hosts-equiv failures picked up by
the build farm.

Andrew Bartlett
(This used to be commit 39311495de)
2004-01-05 12:36:21 +00:00
Andrew Bartlett
425699fce7 Correctly handle per-pipe NTLMSSP inside a NULL session. Previously we
would attempt to supply a password to the 'inside' NTLMSSP, which the
remote side naturally rejected.

Andrew Bartlett
(This used to be commit da408e0d5a)
2004-01-05 04:12:40 +00:00
Andrew Bartlett
a7f8c26d24 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 32397c8b01)
2004-01-05 04:10:28 +00:00
Andrew Bartlett
d4954eff57 Make it clear that we cannot sign if we don't have a session key.
(This used to be commit a2f6dec05b)
2004-01-05 00:11:35 +00:00
Andrew Bartlett
e8984d6b9a Automaticly initialise the signing engine, if we have a session key.
(This used to be commit cb063c1b69)
2004-01-05 00:11:02 +00:00
Andrew Bartlett
cc02d8690c 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 53d802c72a)
2004-01-04 11:05:30 +00:00
Andrew Bartlett
4cc701196e There is not a particularly good excuse for complaining to the *client* that
it sent 'INVALID_PARAMETER', when it was us as the server that could not
come up with a session key.  Instead, allow normal authentication to take
place, but do not setup a session key.

Andrew Bartlett
(This used to be commit e5abd93d79)
2004-01-03 01:12:56 +00:00
Andrew Bartlett
5eee23cc64 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.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Andrew Bartlett
adc07646a3 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 48315e8fd2)
2003-12-30 07:33:58 +00:00
Andrew Bartlett
5dff713735 Shutting down the connection closes outstanding sessions, so we don't need
to do it twice...

Amdrew Bartlett
(This used to be commit 8f9a069c59)
2003-12-28 09:57:29 +00:00
Andrew Bartlett
f73492a58a This patch corrects some errors in the NTLMSSP implementation, that
would incorrectly return INVALID_PARAMETER, instead of allowing a
login.

Andrew Bartlett
(This used to be commit 76c59469a3)
2003-12-27 11:33:24 +00:00
Volker Lendecke
82027c1ea2 Preliminary fix for our signing problem with failed NTLMSSP logins. This patch
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 f5afaafd61)
2003-12-27 10:11:26 +00:00
Jeremy Allison
68e692738b Add in comments explaining NTLMv2 selection. Use lm session key if that's
all there is.
Jeremy.
(This used to be commit b611f8d170)
2003-12-17 21:57:26 +00:00
Jeremy Allison
93a983b7cb Tidyup debug message in ntlmssp code. Add brackets around dodgy if statement.
Jeremy
(This used to be commit 5aab4b976c)
2003-12-17 20:11:39 +00:00
Gerald Carter
54cff4535e Make sure we correctly generate the lm session key.
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 ef4ab8d7c4)
2003-12-17 06:18:13 +00:00
Jeremy Allison
ee17580c85 Make intent to return only one address clear.
Jeremy.
(This used to be commit d3d0353bae)
2003-12-09 02:29:27 +00:00
Steve French
1f761ad395 Fix incorrect smb flags2 for connections to pre-NT servers (causes smbclient to
fail to OS2 for example)
(This used to be commit 54e2fcb8f4)
2003-12-04 21:26:14 +00:00
Andrew Bartlett
88dad93acb 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.

Andrew Bartlett
(This used to be commit 19bb4b582f)
2003-12-04 04:16:16 +00:00
Jeremy Allison
026e476258 Client connect signing error messages should be level zero else
they're easy to miss.
Jeremy.
(This used to be commit 7fa89b0937)
2003-12-01 22:55:43 +00:00
Jeremy Allison
f7dfa789c1 Fix spurious error msg. when seq=0.
Jeremy
(This used to be commit 4912ad8f18)
2003-12-01 06:59:54 +00:00
Jeremy Allison
b4fa65d0ad Ensure we use the same mid for the secondary trans requests, W2K3
does this.
Jeremy.
(This used to be commit 8adf0cd27a)
2003-12-01 03:24:50 +00:00
Jeremy Allison
12d3246a6c Better fix for client signing bug. Ensure we don't malloc/free trans signing
state info each packet.
Jeremy.
(This used to be commit 818cf32d63)
2003-12-01 01:04:04 +00:00
Jeremy Allison
2ad1159990 Fix signing bug with secondary client trans requests. Turns out the last
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 6750dc33b4)
2003-11-30 19:40:57 +00:00
Jeremy Allison
6ce882ef29 If signing starts successfully, don't just turn it off automatically if
it fails later. Only turn it off automatically if it fails at the start.
Jeremy.
(This used to be commit 4a145531c2)
2003-11-25 18:15:52 +00:00
Andrew Bartlett
1b6e6c98ba Do not add NTLM2 to the NTLMSSP flags unconditionally - allow the
defaults specified by the caller to prevail.

Don't use NTLM2 for RPC pipes, until we know how it works in signing or sealing.

Call ntlmssp_sign_init() unconditionally in the client - we setup the
session key, why not setup the rest of the data.

Andrew Bartlett
(This used to be commit 48123f7e42)
2003-11-25 11:25:38 +00:00
Jeremy Allison
efdd1ea572 When server signing is set to "auto", if the client doesn't sign just
ignore it. Only fail if signing is set to "required".
Jeremy.
(This used to be commit 8916ddfc39)
2003-11-25 00:32:51 +00:00
Andrew Bartlett
78404434d0 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.

(server-side support to follow shortly)

Andrew Bartlett
(This used to be commit 9ecf9408d9)
2003-11-22 23:38:41 +00:00
Andrew Bartlett
fcbfc7ad06 Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
(This used to be commit f3bbc87b0d)
2003-11-22 13:19:38 +00:00
Gerald Carter
4f65a3bd03 adding a useful debug
(This used to be commit e374ce779e)
2003-11-22 06:15:28 +00:00
Jeremy Allison
f581234a7a Fix coredump in cli_get_backup_list.
Jeremy.
(This used to be commit 29413db303)
2003-11-05 00:17:14 +00:00
Tim Potter
fbb8f131c2 Fix more 64-bit printf warnings.
(This used to be commit 23443e3aa0)
2003-11-03 14:34:25 +00:00
Jeremy Allison
231124ced9 Fixes to check for wraps which could cause coredumps.
Jeremy.
(This used to be commit ad06edd1bb)
2003-10-29 21:28:00 +00:00
Richard Sharpe
55f8ca432b Remove some unused variables uncovered by the build farm.
(This used to be commit 084e4678c0)
2003-10-27 06:51:39 +00:00
Richard Sharpe
15b14fc857 Put in a work-around for ENOTSUP not being defined on OpenBSD.
(This used to be commit ca3d98d08b)
2003-10-25 04:13:32 +00:00
Richard Sharpe
b0ead3a03d Apply latest of Derrell Lippman's changes to libsmbclient.
(This used to be commit 84e620e5ba)
2003-10-24 18:58:41 +00:00
Richard Sharpe
2f84a990bc Commit Derrell's changes to libsmbclient plus a small change to configure.in
to see if SGI and other platforms will build.
(This used to be commit cf9311044c)
2003-10-24 17:01:19 +00:00
Volker Lendecke
e78cf62248 According to Ethereal we have a 32-Bit quantity here. And with SSVAL valgrind
reports an unitialized read which is obviously correct. And I hate valgrind
errors ;-)

Volker
(This used to be commit e5dbf2441c)
2003-10-23 13:45:48 +00:00
Jeremy Allison
bb0598faf5 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
(This used to be commit d7e35dfb92)
2003-10-22 23:38:20 +00:00
Jeremy Allison
5114dee271 Fix for bug #64, Win9x Nexus tools not working against Samba3.0. Missing
map in errormap for ERROR_MORE_DATA -> ERRDOS, ERRmoredata.
Jeremy.
(This used to be commit 7eaae388b3)
2003-10-21 23:14:41 +00:00
Jeremy Allison
f589164ed9 Patch from Stefan Metzmacher <metze@metzemix.de> to fix signing problems
when reverse connecting back to a client for printer notify.
Jeremy.
(This used to be commit 06aa434c3f)
2003-10-21 21:19:00 +00:00
Jeremy Allison
3fe18a46a3 Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>
Jeremy.
(This used to be commit 63f3315643)
2003-10-21 17:40:58 +00:00
Volker Lendecke
df81637076 We are doing NT error codes now.... If we have an NT error, report that
back the same way we handle the DOS error. Although I don't see why
BUFFER_TOO_SMALL should not be handled as an error, simply copy the logic.

This is only called from smbcacls and smbcquotas.

Volker
(This used to be commit 169f4dfee0)
2003-10-20 08:41:32 +00:00
Jeremy Allison
1269d23113 Enable us to see what sequence number we were expecting when we fail a sign
(should help track down out of sequence bugs).
Jeremy.
(This used to be commit 6e21261fe4)
2003-10-14 17:01:03 +00:00
Tim Potter
ec890d5c0f Enclose usage of st_blksize and st_blocks struct stat members in
#ifdef HAVE_STAT_ST_BLKSIZE and #ifdef HAVE_STAT_ST_BLOCKS,
respectively.

Fixes bug 550 reported by Joachim Schmitz <schmitz@hp.com>.
(This used to be commit 18adfdbe0c)
2003-10-14 03:56:42 +00:00
Jeremy Allison
52f63783bc Fixup error code returns from Samba4 tester. Ensure invalid paths are
validated the same way.
Jeremy.
(This used to be commit 6ad2f0ba27)
2003-10-08 23:21:36 +00:00
Tim Potter
eb268003f4 Applied Steve Langasek's patch for bug #450.
(This used to be commit e3cb0cd0d6)
2003-09-16 03:54:42 +00:00
Jeremy Allison
1555cacd7c Fix #442 which Alexander considered a showstopper. Allow us to join mixed
mode domains.
Jeremy.
(This used to be commit c816aacefb)
2003-09-16 01:27:46 +00:00
Gerald Carter
c913fc0581 address bug #359. Andrew B's patch for implementing client
portion of NTLMv2 key exchange.  Also revert the default for
'client ntlmv2 auth' to no.  This caused no ends of grief in
different cases.

And based on abartlet's mail....

> All I care about at this point is that we use NTLMv2
> in our client code when connecting to a server that
> supports it.

There is *no* way to tell this.  The server can't tell us, because it
doesn't know what it's DC supports.  The DC can't tell us, because it
doesn't know what the trusted DC supports.  One DC might be Win2k, and
the PDC could be an older NT4.
(This used to be commit fe585d49cc)
2003-09-06 19:23:24 +00:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Jeremy Allison
245fbf7efb Used cachegrind to track down some bottlenecks.
Removed calls to clobber_region when not compiling with developer as
they were hiding speed problems.
Added fast path to convert_string() when dealing with ascii -> ascii,
ucs2-le to ascii and ascii to ucs2-le with values <= 0x7F. This
gives a speedup of 22% on my nbench tests.
Next I will do this on convert_string_allocate.
Jeremy.
(This used to be commit ef140d15ea)
2003-09-04 01:12:39 +00:00