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

857 Commits

Author SHA1 Message Date
Gerald Carter
344e113368 commiting jra's fix for Exchange clear test auth 0001-01-01 00:00:00 +00:00
Andrew Bartlett
06c3f15aa1 rpc_client/cli_lsarpc.c:
rpc_parse/parse_lsa.c:
nsswitch/winbindd_rpc.c:
nsswitch/winbindd.h:
 - Add const

libads/ads_ldap.c:
 - Cleanup function for use

nsswitch/winbindd_ads.c:
 - Use new utility function ads_sid_to_dn
 - Don't search for 'dn=', rather call the ads_search_retry_dn()

nsswitch/winbindd_ads.c:
include/rpc_ds.h:
rpc_client/cli_ds.c:
 - Fixup braindamage in cli_ds_enum_domain_trusts():
    - This function was returning a UNISTR2 up to the caller, and
      was doing nasty (invalid, per valgrind) things with memcpy()
    - Create a new structure that represents this informaiton in a useful way
      and use talloc.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
de3c3cbeeb Add the alignment required before all 2-byte quantities in NDR. Allows us
to correctly parse plaintext netlogon calls with odd-length passwords

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
c6594e3557 Fix UNISTR2 length bug in LsaQueryInfo(3) that cause SID resolution to fail on local files on on domain members; bug 875 0001-01-01 00:00:00 +00:00
Andrew Tridgell
310f90f368 fixed a problem with "net rpc vampire" mis-parsing the alias member
info reply

Thanks to a bug report by 'musb'
0001-01-01 00:00:00 +00:00
Gerald Carter
da12bbdb0d * 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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
9ecf9408d9 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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f3bbc87b0d 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...
0001-01-01 00:00:00 +00:00
Jeremy Allison
703b1b76e2 Fix from Andrew Bartlett to fix up the munged-dial problem.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
fd98af75d6 * 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
0001-01-01 00:00:00 +00:00
Gerald Carter
ccd5665a65 fix crash bug due to empyrt munged dial string; patch from metze 0001-01-01 00:00:00 +00:00
Jeremy Allison
e591854eda Handle munged dial string. Patch from Aur?lien Degr?mont <adegremont@idealx.com>with memory leak fixes by me.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
68945027b5 Fix some uninitialised variable warnings. 0001-01-01 00:00:00 +00:00
Jim McDonough
4e86243ea1 Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534
0001-01-01 00:00:00 +00:00
cvs2svn Import User
e569418861 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
Jim McDonough
532fab74c1 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
0001-01-01 00:00:00 +00:00
Jim McDonough
00e0aba2cf Be sure referent ID is updated for incoming structures, too. 0001-01-01 00:00:00 +00:00
Jim McDonough
26956cdef9 Fix typo 0001-01-01 00:00:00 +00:00
Jim McDonough
9d0f322a85 Update structures after ethereal showed some marshalling/unmarshalling
errors.
0001-01-01 00:00:00 +00:00
Jim McDonough
71dcdf54e6 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)
0001-01-01 00:00:00 +00:00
Jim McDonough
2f84c6c9a1 Fix tower length calculations and add some const 0001-01-01 00:00:00 +00:00
Jim McDonough
e9fc15d58c 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.
0001-01-01 00:00:00 +00:00
Jim McDonough
041c17bd66 Add epmapper pipe 0001-01-01 00:00:00 +00:00
Jim McDonough
bdd5158d9a Add (un)marshalling code for endpoint mapper map operation 0001-01-01 00:00:00 +00:00
Tim Potter
2aaafa5007 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
cdba166e31 Max warnings with gcc.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3ebbd67dec Tut tut - always run with max warnings on gcc...
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
c78f2d0bd1 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
couldn't compile to test these due to some kerberos problems wirh 3.0,
but on HEAD they're working well, so I suppose it's ok to commit
0001-01-01 00:00:00 +00:00
Simo Sorce
66074d3b09 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
dfbde4be71 Grrr. compile patches before you apply !
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
6cbdbdf9e1 abstract UUID parsing code to an individual function; patch from Anthony 0001-01-01 00:00:00 +00:00
Gerald Carter
9365c619d6 abstract UUID parsing code to an individual function; patch from Anthony 0001-01-01 00:00:00 +00:00
Andrew Bartlett
641652cad9 Remove duplicate function (now in rpc_parse/parse_prs.c) and fix a RPC debug
(I renamed the element of the structure).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
9d2e585e5e commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain 0001-01-01 00:00:00 +00:00
Gerald Carter
3802f5895e commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain 0001-01-01 00:00:00 +00:00
Tim Potter
e2ab9e54cd 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f82c273a42 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
546b2271c0 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
28b315a750 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
71ecd10181 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
cd7bd8c2da 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
c17a7dc9a1 sync 3.0 into HEAD for the last time 0001-01-01 00:00:00 +00:00
Tim Potter
695aa39c5d Fix for bug #334. We don't unmarshall the trusted domain or secrets
info delta correctly and thus crash when doing a net rpc samdump.

The easiest thing at the moment it to comment out these functions as
they seriously don't correspond with reality (netmon/ethereal) and the
data in the containers aren't used anyway.
0001-01-01 00:00:00 +00:00
Gerald Carter
dd2cf4897e Fix bug #252. Implement missing SAMR_REMOVE_USER_FOREIGN_DOMAIN
call.
0001-01-01 00:00:00 +00:00
Herb Lewis
398bd14fc6 get rid of more compiler warnings 0001-01-01 00:00:00 +00:00
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX 0001-01-01 00:00:00 +00:00
Andrew Bartlett
024d32f793 Fix comment 0001-01-01 00:00:00 +00:00
Simo Sorce
3101c236b8 port latest changes from SAMBA_3_0 tree 0001-01-01 00:00:00 +00:00
Jim McDonough
a2bd8f0bfa Update my copyrights according to my agreement with IBM 0001-01-01 00:00:00 +00:00
Jim McDonough
15d2bc4785 Fix copyright statements for various pieces of Anthony Liguori's work. 0001-01-01 00:00:00 +00:00