1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

765 Commits

Author SHA1 Message Date
Andrew Bartlett
13a6b9833e Merge from 3.0:
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)
2003-11-23 00:22:17 +00:00
Andrew Bartlett
354c0fbc91 (merge from 3.0)
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...

Andrew Bartlett
(This used to be commit 57a895aaabacc0c9147344d097d333793b77c947)
2003-11-22 13:29:02 +00:00
Jeremy Allison
c86a6b04c8 Fix from Andrew Bartlett to fix up the munged-dial problem.
Jeremy.
(This used to be commit 5df3d16c9226bf884226e8302b996a484017f8c3)
2003-11-17 22:07:23 +00:00
Gerald Carter
ac20c8cfb0 * Fix from SATOH Fumiyasu for bug 660 (failing to view print
jobs) by only enforce the 'max reported print jobs' parameter
  when it is non-zero.

* Fixed bug 338 by making sure that data values are written
  out when we are marshalling an EnumPrinterDataEx() reply.
  This probably fixes other bugs reported against point-n-print
  feature in 3.0.0
(This used to be commit d7026f6d178f6ed531bbf7d681d4efde0828616c)
2003-11-13 20:16:28 +00:00
Gerald Carter
0f98e8ab83 fix crash bug due to empyrt munged dial string; patch from metze
(This used to be commit aef7f54355a71e36963ed7427e9c2f05d26cc222)
2003-11-11 19:22:44 +00:00
Jeremy Allison
a3aa2c9ed4 Handle munged dial string. Patch from Aur?lien Degr?mont <adegremont@idealx.com>
with memory leak fixes by me.
Jeremy.
(This used to be commit daceed37387c517b3f0ab9c173f419215e3d676b)
2003-11-07 18:32:29 +00:00
Tim Potter
596783105b Merge of some compiler warning fixes.
(This used to be commit 6a001dbd13c11f22b5d3c444fd1da3055f3afb67)
2003-11-05 17:34:33 +00:00
Jim McDonough
4f22327e21 Ok, nearing the end of the GUID->struct uuid changes.
Takes care of secdescs.

Had to move the uuid marshall/unmarshalling code to parse_misc, because
it's needed outside of parse_rpc.c (for no-auth calls)
(This used to be commit 5d2bb079b65ccfec14604d8dcf0ce789d1795b46)
2003-10-30 17:37:21 +00:00
Jim McDonough
1587245a05 Another round of GUID->struct uuid.
Takes care of the lsass pipe
(This used to be commit 3dca3efa4b427fa3094a8cd392fe5744b5f6f6a8)
2003-10-30 17:07:32 +00:00
Jim McDonough
523444b7b6 First round of merging various UUID structures.
This eliminates RPC_UUID.  It creates the following struct:

struct uuid
{
  uint32 time_low;
  uint16 time_mid;
  uint16 time_hi_and_version;
  uint8  clock_seq[2];
  uint8  node[6];
};
which replaces RPC_UUID and various random struct uuid definitions


and a flat version:
#define UUID_FLAT_SIZE 16
typedef struct uuid_flat
{
	uint8 info[UUID_FLAT_SIZE];
} UUID_FLAT;

which pretty much looks like GUID (which I will start eliminating).

I want us to use the FLAT one only on the wire (perhaps in files, too?), and
I want it to be obvious to the coder that it is the FLAT version.

This leaves a couple of compiler warnings, where GUID isn't completely
replaced by FLAT_UUID yet...I'll get to those soon.
(This used to be commit 1532b5d2e3c61df232b16394acedf6eac387588b)
2003-10-30 16:38:39 +00:00
Jim McDonough
65ae858c1b Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534
(This used to be commit 99f4fa54497ba1c0fc0ba39d51b3ce201a8e6cd2)
2003-10-24 13:49:25 +00:00
Jim McDonough
6258550534 New files for support of initshutdown pipe. Win2k doesn't respond properly
to all requests on the winreg pipe, so we need to handle this new pipe.

First part of fix for bug #534
(This used to be commit 532fab74c12d8c55872c2bad2abead2647f919d7)
2003-10-24 13:38:13 +00:00
Jim McDonough
bca9e7d325 Be sure referent ID is updated for incoming structures, too.
(This used to be commit 00e0aba2cf97e686a0b6b4d7bab50afbc5e97ac1)
2003-10-22 20:59:46 +00:00
Jim McDonough
7186340179 Fix typo
(This used to be commit 26956cdef902819f94616c33694641752f0f14e9)
2003-10-21 16:27:46 +00:00
Jim McDonough
6fe9423fc6 Update structures after ethereal showed some marshalling/unmarshalling
errors.
(This used to be commit 9d0f322a851f487cea320e57076213435e5c6481)
2003-10-20 21:10:18 +00:00
Jim McDonough
2cfb3e9b70 Several updates:
- add support for named pipe and netbios queries in parse code
- fix map request structure...unknown byte was alignment
- add sample of named pipe over netbios query in rpcclient (comment only)
(This used to be commit 71dcdf54e60204d6b499d25d8759ed20fc7a021a)
2003-10-20 18:35:12 +00:00
Jim McDonough
ba0c899510 Fix tower length calculations and add some const
(This used to be commit 2f84c6c9a1c292535e73721a8bcdb27aaa2b2b46)
2003-10-18 01:07:37 +00:00
Jim McDonough
e6900132ca uuid itself might not be aligned (as is the case in epm map requests), so
it needs to be aligned outside the smb_io_rpc_uuid() call if a specific
rpc or struct needs it that way.
(This used to be commit e9fc15d58c52c12438c1f9c69394c11f76ce72d8)
2003-10-17 19:47:06 +00:00
Jim McDonough
d807bc12fb Add epmapper pipe
(This used to be commit 041c17bd665ea5fa771b111d7008036fb3e7b72f)
2003-10-17 15:07:23 +00:00
Jim McDonough
a6ff6254da Add (un)marshalling code for endpoint mapper map operation
(This used to be commit bdd5158d9a45f4b935ea0fa495c0d83bc5ca96f8)
2003-10-17 15:03:46 +00:00
Tim Potter
58153961e4 Merge from 3.0:
>Remove duplicate function (now in rpc_parse/parse_prs.c) and fix a RPC debug
>(I renamed the element of the structure).
>
>Andrew Bartlett
(This used to be commit 2aaafa500780f7de0dec5632d53f3347b67fae4a)
2003-10-09 06:29:08 +00:00
Jeremy Allison
2c1030d755 Max warnings with gcc.
Jeremy.
(This used to be commit cdba166e31b3c611652783a2ab63e59f57f41fde)
2003-10-07 17:23:59 +00:00
Simo Sorce
762e7e1dff split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
(This used to be commit 66074d3b097d8cf2a231bf08c7f4db62da68189d)
2003-10-06 01:24:48 +00:00
Gerald Carter
8ae168b46d abstract UUID parsing code to an individual function; patch from Anthony
(This used to be commit 6cbdbdf9e1e76837c8ef03e795db11caa74ccf18)
2003-10-03 15:08:16 +00:00
Gerald Carter
e9568f8df2 commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain
(This used to be commit 9d2e585e5e6f9066c6901aa8d8308734f8667296)
2003-10-01 22:00:19 +00:00
Tim Potter
5400952f7f Merge from 3.0:
>Fix for #480. Change the interface for init_unistr2 to not take a length
>but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
>This is not the case. Count it after conversion.
>Jeremy.
(This used to be commit e2ab9e54cd0ec0002175cf18ff364f4aebaf85a0)
2003-09-29 06:17:09 +00:00
Jeremy Allison
8139c5fcfa Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying
the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on
auto inherited checks.
Jeremy.
(This used to be commit 546b2271c08735ac1049a453abac996d794aa364)
2003-09-19 21:57:46 +00:00
Jeremy Allison
30fd359914 The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
(This used to be commit 71ecd10181cd35313b79f618c2928c2f45424812)
2003-09-18 23:54:12 +00:00
Gerald Carter
4093bf7ff8 sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad)
2003-09-09 04:07:32 +00:00
Simo Sorce
04bf12b176 port latest changes from SAMBA_3_0 tree
(This used to be commit 3101c236b8241dc0183995ffceed551876427de4)
2003-08-02 20:06:57 +00:00
Gerald Carter
c39c02e1ae fix the build. Ifdef out some code
(This used to be commit e66541d0e1befec5d589890994454dd639ea0665)
2003-07-17 02:49:26 +00:00
Gerald Carter
4a090ba06a trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
(This used to be commit adb98e7b7cd0f025b52c570e4034eebf4047b1ad)
2003-07-16 05:34:56 +00:00
Gerald Carter
e1e363e4e9 * set winbind cache time to 5 minutes
* quit obsessing over the sequence number so much
* share the updated sequence number between parent
  and child winbindd processes in dual mode
(This used to be commit 6fb5bdb30e2b1341ba600ce0dfd397394f7a831c)
2003-06-03 16:19:31 +00:00
Tim Potter
0842573b51 Merge of secchan fix from 3.0 that was eaten by CVS yesterday. I think
it was becuase I ran out of disk quota.
(This used to be commit 10cbec05a7bfe2fab54940329c5b348d5e524f29)
2003-05-27 00:30:29 +00:00
Volker Lendecke
42954dc084 Fix an insufficient alloc when querying alias members.
Volker
(This used to be commit 9d2d570caa4dad194534249cd5e4dc4984b4002e)
2003-05-24 14:53:15 +00:00
Volker Lendecke
0865120fca parse_string is only used for the authentication negotiators.
It can itself determine the length of the string it has to
transfer. Andrew B., could you take a look at the length calculation?
Is that safe?

Thanks,

Volker
(This used to be commit d5f1082753f84f0e3a22739055b6b9cbde29faa9)
2003-04-22 15:55:07 +00:00
Volker Lendecke
cdb197135f Survive a samdump with an alias that has no description
Volker
(This used to be commit 408a94b64d4d799f256c11a2009e161b27553cbb)
2003-04-18 08:36:12 +00:00
Jeremy Allison
8f25fd3d72 Fixes to make SCHANNEL work against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
(This used to be commit ec82e8e9f4a6bf807a91ac265af39a516c7ab631)
2003-04-16 15:54:00 +00:00
Tim Potter
065561932c A new RPC pipe! The \pipe\echo named pipe is for testing large RPC
requests and responses and is only compiled in when --enable-developer
is passed to configure.  It includes server and client side code for
generating and responding to functions on this pipe.  The functions are:

 - AddOne: add one to the uint32 argument and return ig
 - EchoData: echo back a variable sized char array to the caller
 - SourceData: request a variable sized char array
 - SinkData: send a variable sized char array and throw it away

There's a win32 implementation of the client and server in the
junkcode CVS repository in the rpcecho-win32 subdirectory.
(This used to be commit 4ccd34ef836eba05f81dc2da73fd7cfaac201798)
2003-04-11 04:09:14 +00:00
Volker Lendecke
803e23f403 This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password"

and it should work with the schannel. Needs testing platforms
different from NT4SP6.

Volker
(This used to be commit ecd0ee4d248e750168597ccf79c389513bb0f740)
2003-04-09 15:47:06 +00:00
Volker Lendecke
d9440df579 A little clarification in the rpc auth header struct.
Volker
(This used to be commit 9fc3e4bf9fa7845b5d4a7eb4cacfec586045ebd0)
2003-04-09 09:52:57 +00:00
Volker Lendecke
425797700b Put the core schannel functions to parse_prs.c. They are also used by
schannel clients.

Volker
(This used to be commit 41e92409e1c6912db05acc80b6c0d5dccd51859b)
2003-04-09 09:29:47 +00:00
Volker Lendecke
02bb4e1b8a This is a merge of the NETLOGON schannel server code from Samba
TNG. Actually, it exists in the main Samba cvs tree in APPLIANCE_TNG
as I found out later :-)

It adds a new parameter: server schannel = yes/auto/no defaulting to
auto.

What does this mean to the user: No requireSignOrSeal registry patch
for XP anymore.

Many thanks for this code to Luke Leighton, Elrond and anybody else I
forgot to mention.

My next thing will be to see if this applies cleanly to 3_0.

Please test and comment!

Volker
(This used to be commit e1f953241eb020f19fe657f29afdae28dcf5a03b)
2003-04-04 15:21:04 +00:00
Jelmer Vernooij
4905ba282f - Support building all auth modules as .so's
- Change 2 variable names to avoid conflicts (patch by Stephan Kulow <coolo@kde.org>)
(This used to be commit 71b05cd14ae6df8340730e7bad1c783dc278c5d3)
2003-03-25 14:46:11 +00:00
Andrew Bartlett
a27d434c4b Fix signed/unsigned issues - mostly 'i' counters.
Fix an inconpatible poitner type that caused the IA64 not to build

Andrew Bartlett
(This used to be commit 37436b0aae108fceace3049d3868510e1ba592ac)
2003-03-15 07:45:51 +00:00
Andrew Tridgell
537e4d5565 fixed the unmarshalling of the queryaliasmem SAMR call
(This used to be commit 80c45434092a881fe2c9ae7f90856deea4722cb0)
2003-03-13 04:35:15 +00:00
Andrew Bartlett
6ed6740236 Don't fault on error returns (ptr == 0) for this LSA query.
(for example, query to non-dc)

Andrew Bartlett
(This used to be commit d1dde5f684652f86e63ac6cfa34ff42a680693de)
2003-03-09 01:13:41 +00:00
Simo Sorce
8a751c019c Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
(This used to be commit 4c6d461a8572f03cd33cba95500cc837638b732c)
2003-03-07 18:26:24 +00:00
Gerald Carter
26b1ed7cc0 add #define for the max device name length in a DEVICEMODE
(This used to be commit 21ec2b6ba3ddba6964f6ddb53f8494e4a8b48a83)
2003-03-06 16:06:12 +00:00
Gerald Carter
21be9e7776 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
(This used to be commit 7377d671e8a95ac2ab0452f564b18b2a098699cb)
2003-03-03 16:34:19 +00:00