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

1174 Commits

Author SHA1 Message Date
Andrew Bartlett
570c0c12fd Merge from 3.0:
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 e97f1eb62a)
2003-12-07 11:06:40 +00:00
Gerald Carter
386e319ab5 fix process_incoming_data() to return the number of bytes handled this call whether we have a complete pdu or not; fixes bug with multiple pdu request rpc's broken over SMBwriteX calls each
(This used to be commit 514acc655d)
2003-12-04 20:22:19 +00:00
Gerald Carter
3a1dd0dc77 * fix RemoveSidForeignDomain() ; bug 252
* don't fall back to unmapped UNIX group for
  get_local_group_from_sid()
* remove an extra become/unbecome_root() pair
  from group enumeration
(This used to be commit c0f34b42a6)
2003-12-04 04:08:32 +00:00
Jeremy Allison
90d4b84636 Patch for #263 from jpjanosi@us.ibm.com.
Jeremy.
(This used to be commit 6543bca0cb)
2003-11-25 02:04:10 +00:00
Gerald Carter
f5ee9c7b02 more access fixes for group enumeration in LDAP; bug 281
(This used to be commit c4ce92e806)
2003-11-24 17:33:15 +00:00
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 1287cf5f92)
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 57a895aaab)
2003-11-22 13:29:02 +00:00
Jeremy Allison
3848849b02 Correct fix for '$' termination test.
Jeremy.
(This used to be commit b93e44e01e)
2003-11-19 00:22:47 +00:00
Rafal Szczesniak
66603d58e0 Fix to correct checking of '$' name termination.
Patch by metze.


rafal
(This used to be commit 7191186fc6)
2003-11-18 20:06:10 +00:00
Gerald Carter
8b9622f50d * make sure we only enumerate group mapping entries
(not /etc/group) even when doing local aliases

* remove "hide local users" parameter; we have this
  behavior built into 3.0
(This used to be commit 3b75e862df)
2003-11-17 16:11:16 +00:00
Andrew Bartlett
30d0680106 Merge from 3.0:
source/passdb/pdb_get_set.c:
I agree with vl's #if 0 here, and am not quite sure what I was
thinking with regard to the original code.

Let's keep samba simple, and just remove it.


source/rpc_server/srv_netlog_nt.c:
Remove compleatly wrong comments.  (There were correct, 2 years ago...)


source/intl/lang_tdb.c:
Add newline to debug message


Andrew Bartlett
(This used to be commit 2a8dbe0369)
2003-11-09 09:30:21 +00:00
Gerald Carter
f9230c937b * only install swat html files once
* revert the change that prevent the guest
  account from being added to a passdb backend
  since it broke the build farm.
* apply patch from Alex Deiter to fix the
  "smbldap_open: cannot access when not root
  error" messages when looking up group
  information (bug 281)
(This used to be commit 20bd309239)
2003-11-07 23:04:52 +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 daceed3738)
2003-11-07 18:32:29 +00:00
Tim Potter
f59bd26894 Merge of 64-bit printf warning fixes.
(This used to be commit a6cc763333)
2003-11-05 18:28:29 +00:00
Jim McDonough
1587245a05 Another round of GUID->struct uuid.
Takes care of the lsass pipe
(This used to be commit 3dca3efa4b)
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 1532b5d2e3)
2003-10-30 16:38:39 +00:00
Jeremy Allison
3638769e02 Fix for bug #667. DFS filenames can now have arbitrary case.
Jeremy.
(This used to be commit cbefb5c4f9)
2003-10-28 00:51:19 +00:00
Jeremy Allison
db8e98175c 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 7fde193efe)
2003-10-21 21:18:58 +00:00
Jim McDonough
989b57f783 Add server side support for epmapper pipe. Currently only does a fixed
mapping, but this is the base for changes to come.
(This used to be commit 73882e970a)
2003-10-21 17:59:08 +00:00
Gerald Carter
1b259ab003 * fix some compile warnings in the gums code
* add server support for DsEnumerateDomainTrusts()
(This used to be commit 06bacf6e34)
2003-10-17 16:27:26 +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 66074d3b09)
2003-10-06 01:24:48 +00:00
Jeremy Allison
460aa84639 Portability fix from schmitz@hp.com (Joachim Schmitz) for bug #548.
Jeremy.
(This used to be commit a0828a2a1c)
2003-10-02 17:36:45 +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 9d2e585e5e)
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 e2ab9e54cd)
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 546b2271c0)
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 71ecd10181)
2003-09-18 23:54:12 +00:00
Tim Potter
ac4ae84d08 Merge from Samba 3.0:
>Patch from Gregory Hinton Nietsky <gregory@networksentry.co.za>,
>ensure the desired access is read from the incoming RPC request.
>Jeremy.
(This used to be commit a556637d0b)
2003-09-15 05:25:49 +00:00
Gerald Carter
4093bf7ff8 sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a1)
2003-09-09 04:07:32 +00:00
Simo Sorce
04bf12b176 port latest changes from SAMBA_3_0 tree
(This used to be commit 3101c236b8)
2003-08-02 20:06:57 +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 adb98e7b7c)
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 6fb5bdb30e)
2003-06-03 16:19:31 +00:00
Gerald Carter
79315aabf4 fixes bugs 85 & 99 (XP domain logons); don't enable the lsa_query_info2 unless we are trying to be an ADS DC
(This used to be commit 689576c242)
2003-05-22 17:27:13 +00:00
Jeremy Allison
de7cd07a29 Patch from "Esh, Andrew" <Andrew_Esh@adaptec.com> to fix core dump bug
in add groupmem code.
Jeremy.
(This used to be commit 7e7077e9e3)
2003-05-16 18:30:19 +00:00
Jeremy Allison
88b1670e8c Ensure sys_adminlog code won't coredump with incorrect client params.
Jeremy.
(This used to be commit 0f7f762a1e)
2003-05-15 17:21:28 +00:00
Jeremy Allison
d7ec9f6835 Fix compiler warnings.
Jeremy.
(This used to be commit e12934c67b)
2003-05-12 21:29:01 +00:00
Simo Sorce
75cace04fd *id_to_*id call reshape to return NTSTATUS errors
plus internal fixes
1st stage
(This used to be commit 6d036761e5)
2003-05-01 11:47:48 +00:00
Simo Sorce
a1eaa7d5e0 This is a nice rewrite:
SAM_ACCOUNT does not have anymore uid and gid fields
all the code that used them has been fixed to use the proper idmap calls

fix to idmap_tdb for first time idmap.tdb initialization.

auth_serversupplied_info structure has now an uid and gid field

few other fixes to make the system behave correctly with idmap

tested only with tdbsam, but smbpasswd and nisplus should be ok

have not tested ldap !
(This used to be commit 6a6f603246)
2003-04-29 22:06:16 +00:00
Andrew Bartlett
8e7525be92 Merge 3.0's change to how we add users onto HEAD, including a few other bits
of sync-up for the rpc_server/srv_samr_nt.c

Andrew Bartlett
(This used to be commit 3c867aedd9)
2003-04-29 10:26:51 +00:00
Gerald Carter
46eac77b3b only call the add_script if the getpwnam_alloc() fails
(This used to be commit ba1e654a15)
2003-04-29 05:37:42 +00:00
Jelmer Vernooij
81256ecbb9 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
(This used to be commit f4576757d1)
2003-04-28 18:33:25 +00:00
Simo Sorce
221729252b A RID can never be zero
(This used to be commit e2d757aed2)
2003-04-26 01:01:14 +00:00
Volker Lendecke
a85e841188 Setting the credentials for the netsec netlogon pipe connect upon each
samlogon call certainly breaks the credential chain. Do it once during
the bind response.

Volker
(This used to be commit 616b6dd60f)
2003-04-22 11:25:21 +00:00
Andrew Bartlett
c2e997d6a7 Merge from 3.0 - try harder to get our real DNS domain name, and send this
to the client when it asks for our DNS name and forest name.

(needed for win2k to trust us as a trusted domain).

Andrew Bartlett
(This used to be commit 2a1015eb57)
2003-04-22 07:45:16 +00:00
Gerald Carter
9d16dac3d1 wrap pdb_enum_group_mapping() in [un]become_root() so LDAP queries can get the credentials from secrets.tdb
(This used to be commit cf6af44a24)
2003-04-22 03:16:18 +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 ec82e8e9f4)
2003-04-16 15:54:00 +00:00
Tim Potter
75913ec2a9 Typo in comment.
(This used to be commit 0a87d668a0)
2003-04-15 04:08:59 +00:00
Jelmer Vernooij
ee8e82822e Fix typos
(This used to be commit 7bd80376cc)
2003-04-14 20:35:46 +00:00
Gerald Carter
a056cd8845 * We must return 0x2 as the majorversion for nt4 to upload drivers
* fix bug found by clobber_region()
(This used to be commit ad2765bb5e)
2003-04-11 23:50:21 +00:00
Gerald Carter
70231290ea simple fix to hopefully speed up srv_spoolss_replyopenprinter().
Use the client address from the pipe->conn->client_address
instead of trying to resolve the name in the _spoolss_rffpcn()
request.  Should make us more robust as well when the clients
are not registered in DNS or WINS.
(This used to be commit 78b2c1be7d)
2003-04-11 20:32:54 +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 4ccd34ef83)
2003-04-11 04:09:14 +00:00