1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-21 01:59:07 +03:00

11046 Commits

Author SHA1 Message Date
Gerald Carter
86f24908c3 * Revert to using rpc for mixed mode AD domains.
The reason for this are:
  (a) the set_dc_type_and_flags() cannot tell the different
      between connecting to an NT4 domain and an NT4 BDC
      of a mixed mode domain.
  (b) the connection management for the rpc backend only
      provides on named pipe per cli_state.  So it is possible
      to connect to an NT4 BDC for netlogon and an AD mixed mode
      DC for lsarpc.  RPC is the lowest common demonimator here.
  (c) Issue with the sequence number value between the
      highestCommittedUSN LDAP attribute and the seq_num returned
      via RPC.


We will revisit this later, but the changes need to make this
work right now are too broad and risky.
-
Jeremy Allison
72d8eea25d Remove duplicate extern.
Jeremy.
-
Jeremy Allison
bf3d06a2e4 Remove references to 'jn' which gcc-3.4 with precompiled headers
doesn't like.
Jeremy.
-
Stefan Metzmacher
ae20cf0810 merge:
fix XFS quotas the macro changed from HAVE_XFS_QUOTA -> HAVE_XFS_QUOTAS

metze
-
Gerald Carter
93fed3074f * allow dns lookups to be disabled for DOMAIN#1c (and #1b)
names
* fix some a mispelled variable name
-
Gerald Carter
c98399e3c9 sync HEAD with recent changes in 3.0 -
Jelmer Vernooij
69a9cfdad8 Fix --with-fhs for swatdir -
Stefan Metzmacher
fcb3c9c61e update copyright to -2004
metze
-
Gerald Carter
2279e98cb8 fix some warnings from the Sun compiler; also merge some of abartlet's error code changes form 3.0 -
Gerald Carter
36d985a75f fix segfault when sid_ptr == 0 in DsEnumDomainTrusts() reply -
Jeremy Allison
88c5145432 Fix for bug #922. Fast path not called for strlower_m() and strupper_m().
From ab@samba.org (Alexander Bokovoy).
Jeremy.
-
Rafal Szczesniak
f912d8c340 This was cut-n-paste mistake, I guess... :)
rafal
-
Rafal Szczesniak
4a2bd4de3f Typo fix.
rafal
-
Rafal Szczesniak
4f92db99be Fixes to doxygen comment. -
Rafal Szczesniak
9ce6dc6476 Prototype version of trust passwords moved to SAM/pdb. This is
backend-independent part ie. interface - does build and (it seems)
doesn't break anything else.


rafal
-
Gerald Carter
05dd338301 commiting jra's fix for Exchange clear test auth -
Jeremy Allison
e763a220f4 Fix from Luke Howard <lukeh@PADL.COM> for incorrect early free().
Jeremy.
-
Volker Lendecke
70b0fcdeec Merge Translation fixes
Volker
-
Andrew Bartlett
24d7eed6ca (merge from 3.0)
Fix segfualt caused by incorrect configuration.  If lp_realm() was not set,
but security=ADS, we would attempt to free the principal name that krb5
never allocated.

Also fix the dump_data() of the session key, now that we use a data_blob to
store that.

Andrew Bartlett
-
Jeremy Allison
a0dc10bed6 Patch penguin. Cleaning out old mbp patch.
Jeremy.
-
Gerald Carter
175c5c9faa remove unused seek_file(); don't hardcode '\' when printing the auth-user -
Gerald Carter
4c877ccc16 isolate ldap debug messages to the common smbldap_XXX() functions -
Volker Lendecke
9f0292091b Correctly detect AFS headers on SuSE in /usr/include/afs/afs/
Volker
-
Andrew Bartlett
6e9c68217b merge torture changes from Samba 3.0 -> HEAD -
Andrew Bartlett
f7d39c7877 Merge NTLMSSP fixes from 3.0 to HEAD.
Andrew Bartlett
-
Andrew Bartlett
ec24c7f42a GUID is struct uuid in HEAD.
Andrew Bartlett
-
Andrew Bartlett
60107efdc6 Merge winbind from Samba 3.0 onto HEAD.
Changes include:
 - header changes for better pre-compiled headers (tridge)
 - get a list of sids for a given user (tridge)
 - fix function prototype

and a few other minor things

Andrew Bartlett
-
Jeremy Allison
3a24dc868d Patch based on work from James Peach <jpeach@sgi.com> to convert over to
using pread/pwrite. Modified a little to ensure fsp->pos is correct.
Fix for #889.
Jeremy.
-
Andrew Bartlett
256b2da7c9 (merge from 3.0)
I think this was tpot's originally:

Fix format types for 64 bit systems.

Andrew Bartlett
-
Andrew Bartlett
34f16eaeaa (merge from 3.0)
Always call the auto-init funciton - this avoids tdb segfaulting under
us if we failed to open it earlier.

Andrew Bartlett
-
Andrew Bartlett
8a63bed293 (merge from 3.0)
Ensure that for wbinfo --set-auth-user, we actually use the domain.

Andrew Bartlett
-
Andrew Bartlett
c5d1e2112b (merge from 3.0)
Try to keep vl happy - shorten some of these lines.

--

Grumble... grumble... fix the build...

--

Show the sid type in name->sid translatons in a way that can be easily
understood by humans.

Andrew Bartlett
-
Andrew Bartlett
4c3bd0a99e (merge from 3.0)
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
-
Andrew Bartlett
b08502a8fb (merge from 3.0)
Add const.

Andrew Bartlett
-
Andrew Bartlett
a00f29624d (merge from 3.0)
There is some memory corruption hidden somewhere in our winbind code.  If I
could reproduce it, I would fix it, but for now just make sure we always
SAFE_FREE() and set our starting pointers to NULL.

Andrew Bartlett
-
Andrew Bartlett
3c02aad8b3 (merge from 3.0)
Change (unused) structure parameter for cli_ds_enum_domain_trusts() cleanup.

Andrew Bartlett
-
Andrew Bartlett
627d33d166 rpc_client/cli_lsarpc.c:
rpc_parse/parse_lsa.c:
nsswitch/winbindd_rpc.c:
nsswitch/winbindd.h:
 - Add const

libads/ads_ldap.c:
-  Add ads_sid_to_dn utility function

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
-
Andrew Bartlett
08e851c741 (merge from 3.0)
Fix for bug 707, getent group for huge ads groups (>1500 members)
This introduces range retrieval of ADS attributes.

VL rewrote most of Güther's patch, partly to remove code duplication and
partly to get the retrieval of members in one rush, not interrupted by the
lookups for the DN.

I rewrote that patch, to ensure that we can keep an eye on the USN
(sequence number) of the entry - this allows us to ensure the read was
atomic.

In particular, the range retrieval is now generic, for strings.  It
could easily be made generic for any attribute type, if need be.

Andrew Bartlett
-
Andrew Bartlett
326becbde2 (merge from 3.0)
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
-
Andrew Bartlett
43ee2e0b6a (merge from 3.0)
Match Win2k, and return NT_STATUS_INVALID_PARAMETER
if this parameter is not an account type

Andrew Bartlett
-
Andrew Bartlett
bc77b586be (merge from 3.0)
Having no members of a group is a perfectly valid (if unusual) situation.

Andrew Bartlett
-
Andrew Bartlett
cc535a6c70 (merge from 3.0)
JHT came up with a nasty (broken) torture case in preparing examples for
his book.

This prompted me to look at the code that reads the unix group list.  This
code did a lot of name -> uid -> name -> sid translations, which caused
problems.  Instead, we now do just name -> sid

I also cleaned up some interfaces, and client tools.

Andrew Bartlett
-
Andrew Bartlett
06b4eb4b9f (merge from 3.0)
Changes to our PAM code to cope with the fact that we can't handle some
domains (in particular, the domain of the current machine, if it is not a PDC)

By changing the error codes, we now return values that PAM can correctly
use for better stacking of PAM modules - in particular of the password change
module.

This allows pam_winbind to co-exist with other pam modules for password changes.
Andrew Bartlett
-
Andrew Bartlett
acacd27ba2 (merge from 3.0)
auth/auth_util.c:
 - Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

--

Jerry rightly complained that we can't assume that the first domain is
our primary domain - new domains are added to the front of the list. :-(

Use a much more reliable 'flag test' instead.  (note:  changes winbind
structures, make clean).

--

Forgot to commit this for the 'get our primary domain' change.

Andrew Bartlett
-
Andrew Bartlett
4c2e1189ff (merge from 3.0)
Try to gain a bit more consistancy in the output of usernames from ntlm_auth:

Instead of returning a name in DOMAIN\user format, we now return it in the
same way that nsswtich does - following the rules of 'winbind use default
domain', in the correct case and with the correct seperator.

This should help sites who are using Squid or the new SASL code I'm working
on, to match back to their unix usernames.

--

Get the DOMAIN\username around the right way (I had username\domain...)

Push the unix username into utf8 for it's trip across the socket.

Andrew Bartlett
-
Andrew Bartlett
273dcda9ce (merge from 3.0)
Remove testing hack

Make the name of the NTLMSSP client more consistant before we lock it in stone.

Andrew Bartlett
-
Andrew Bartlett
2f196bb31a (merge from 3.0)
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
-
Andrew Bartlett
0d97b10248 (merge from 3.0)
Refactor our authentication and authentication testing code.

The next move will be to remove our password checking code from the SAM
authentication backend, and into a file where other parts of samba can use
it.

The ntlm_auth changes provide for better use of common code.

Andrew Bartlett
-
Andrew Bartlett
39d8a9e488 (merge from 3.0)
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
-
Andrew Bartlett
77b3515981 (merge from 3.0)
Shutting down the connection closes outstanding sessions, so we don't need
to do it twice...

Amdrew Bartlett
-