1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

15414 Commits

Author SHA1 Message Date
Andrew Bartlett
3f6d0cd3a8 Having no members of a group is a perfectly valid (if unusual) situation.
Andrew Bartlett
-
Andrew Bartlett
f9e59f8bc0 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
-
Volker Lendecke
0c8ee04c78 After talking with abartlet remove the fix for bug 707 again.
Volker
-
Volker Lendecke
9d8235bf41 Fix for bug 707, getent group for huge ads groups (>1500 members)
This introduces range retrieval of ADS attributes.

I've rewritten most of Gnther'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.

Andrew, you told me that you would like to see a check whether the AD sequence
number is the same before and after the retrieval to achieve atomicity. This
would be trivial to add, but I'm not sure that we want this, as this adds two
roundtrips to every membership query. We can not know before the first query
whether we get additional range values, and at that point it's too late to ask
for the USN.

Tested with a group of 4000 members along with lots of small groups.

Volker
-
Andrew Bartlett
6a8cc7f012 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
6f3cd9e2af Forgot to commit this for the 'get our primary domain' change. -
Andrew Bartlett
cc050e0137 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).

Andrew Bartlett
-
Andrew Bartlett
494781f628 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
-
Andrew Bartlett
3225f262b1 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
-
Gerald Carter
10b9976e0a Move to short lived TALLOC_CTX* for allocating printer
objects from the print handle cache.   Fixes bug that
caused smbd to consume large amounts of RAM when

(a) a printer handle was kept open over an extended
    period of time, and
(b) the client issued frequent requests that resulted
    in a call to get_a_printer()
-
Volker Lendecke
5d7a14166a Another little one: Make pdb_test.c at least compile, although its way out of
date.

Volker
-
Volker Lendecke
6d2285b6d1 The AFS pts command always generates completely lower-case user names. As case
is not significant in windows user names we should not lose information by
lower-casing the name before handing it to AFS.

Volker
-
Volker Lendecke
3663ed2b96 Fix Bug # 924
Volker
-
Andrew Bartlett
7a3a5a6361 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.

Andrew Bartlett
-
Andrew Bartlett
0fa268863b Make the name of the NTLMSSP client more consistant before we lock it in stone. -
Andrew Bartlett
96f3beb462 Remove testing hack -
Andrew Bartlett
48315e8fd2 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
2375abfa00 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
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
-
Andrew Bartlett
8f9a069c59 Shutting down the connection closes outstanding sessions, so we don't need
to do it twice...

Amdrew Bartlett
-
Andrew Bartlett
76c59469a3 This patch corrects some errors in the NTLMSSP implementation, that
would incorrectly return INVALID_PARAMETER, instead of allowing a
login.

Andrew Bartlett
-
Volker Lendecke
f5afaafd61 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
-
Volker Lendecke
d74137d227 Collecting another little patch from gd@suse.de
As broken as it might be, smbwrapper.so should be put into the
libdir and not bindir.

Volker
-
Volker Lendecke
e6b4b956f6 Collecting some minor patches...
This adds the ability to specify the new user password for 'net ads password'
on the command line. As this needs the admin password on the command line, the
information leak is minimally more.

Patch from gd@suse.de

Volker
-
Andrew Bartlett
9080c30de8 Check the return value of string_to_sid in a few more places. (But
string_to_sid also needs to be less permissive on what it thinks are
valid sids...)

Andrew Bartlett
-
Andrew Bartlett
5b682aef67 Show the error message for failure to set the ldap password.
(For 'ldap password sync = yes')

Andrew Bartlett
-
Andrew Bartlett
fabf801690 Based on patch by Petri Asikainen <paca@sci.fi> fix bug #387 and #330.
This patch will change order how attributes are modified
from: add, delete
to:   delete, add

This is needed to update single valued attributes in Novell NDS and
should not harm anyone else.
-
Andrew Bartlett
6f828ff3d3 ldap rebind sleep -> ldap replication sleep
While writing documentation for metze's patch, it became clear that this is a
better name.

Andrew Bartlett
-
Volker Lendecke
63ffa770b6 This is metze's LDAP rebind sleep patch:
When smb.conf tells us to write to a read-only LDAP replica and we are
redirected by the LDAP server, the replication might take some seconds,
especially over slow links. This patch delays the next read after a rebind for
'ldap rebind sleep' milliseconds.

Metze, thanks for your patience.

Volker
-
Volker Lendecke
17473a65eb Fix our parsing of the LDAP url. We get around it as all decent systems seem
to have ldap_initialize.

Thanks to abartlet for the fix (and the bug in the first place ;-))

Volker
-
Volker Lendecke
d4e071d14b abartlet pointed me at the fact that the order and flags in loadparm.c are
actually used.... 'afs username map' should not show up in the swat basic
view. :-)

Maybe I should use swat from time to time....

Volker
-
Andrew Bartlett
8d54f5fe0c Fix bug 916 - do not perform a + -> space substitution for squid URL encoded
strings, only form input in SWAT.

Andrew Bartlett
-
Andrew Bartlett
e0a026c9b5 Thanks to Serassio Guido for noticing issues in our Squid NTLMSSP
implementation.  We were not resetting the NTLMSSP state for new
negotiate packets.

Andrew Bartlett
-
John Terpstra
46b2fb4db5 Fix typo. -
Jeremy Allison
bee4b3348e Fix for special files being hidden from admins by Dmitry Butskoj <buc@odusz.elektra.ru>
Jeremy.
-
Gerald Carter
33a1a374eb add well known rid for pre win2k compatible access group; bug 897 -
Gerald Carter
6060afb989 correct typo in delete user script; bug 887 -
Jeremy Allison
72252fb0b2 Patch from Jianliang Lu j.lu@tiesse.com to manage Power Users
group.
Jeremy.
-
Richard Sharpe
34351e457a A small fix to torture.c to cleanup the error handling and prevent crashes.
I really should clean up the comment as well.
-
Gerald Carter
850e4be29e * add a few useful debug lines
* fix bug involving Win9x clients.  Make sure we
  save the right case for the located username
  in fill_sam_account()
-
Jeremy Allison
b611f8d170 Add in comments explaining NTLMv2 selection. Use lm session key if that's
all there is.
Jeremy.
-
Jeremy Allison
5aab4b976c Tidyup debug message in ntlmssp code. Add brackets around dodgy if statement.
Jeremy
-
Gerald Carter
ef4ab8d7c4 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.
-
Gerald Carter
19a8dd523a make sure we delete the group mapping before calling the delete group script; patch from Jianliang Lu <j.lu@tiesse.com> -
Jeremy Allison
6ce7932520 Small fix from Jérôme Tournier <jerome.tournier@IDEALX.com>
Jeremy.
-
Gerald Carter
c368defc05 correct problem with pam config install -
Gerald Carter
1742780dd6 more fixes after moving /var/cache/samba -> /var/lib/samba -
Volker Lendecke
bc383582b2 When parsing 'param = value', don't split 'value' at spaces.
Thanks to Ralf Spenneberg for the fix.

Volker
-
Jeremy Allison
6d46e66ac2 Fix from ndb@theghet.to to allow an existing LDAP machine account to be
re-used, rather than created from scratch.
Jeremy.
-
Jeremy Allison
ba0b5b8c9b Fix for bug #815. Make plaintext unicode passwords work with NT4.x
Jeremy.
-