1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

15415 Commits

Author SHA1 Message Date
Andrew Bartlett
fd346ce0c9 Under certain error conditions (a talloc() failure above) this would cause
a double-free(), and the resultant malloc heap corruption.

This may be one of our lurking winbind segfaults.

Andrew Bartlett
(This used to be commit 903263a1bdb755f86dac3a9a92a4af39c8b102c4)
2004-01-02 11:39:07 +00:00
Andrew Bartlett
ffedf5a1aa Having no members of a group is a perfectly valid (if unusual) situation.
Andrew Bartlett
(This used to be commit 3f6d0cd3a83bc75922cb125ffe2b0127c8aa417b)
2004-01-02 05:33:14 +00:00
Andrew Bartlett
b4593e92ff 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
(This used to be commit f9e59f8bc06fae7e5c8cb0980947f78942dc25c0)
2004-01-02 05:32:07 +00:00
Volker Lendecke
9f662094af After talking with abartlet remove the fix for bug 707 again.
Volker
(This used to be commit 0c8ee04c78543b1da3b675df4cf85ee5496c3fbf)
2004-01-01 21:10:35 +00:00
Volker Lendecke
31ff56fd3e 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
(This used to be commit 9d8235bf413f931e40bca0c27a25ed62b4f3d226)
2004-01-01 20:30:50 +00:00
Andrew Bartlett
5d55674b52 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
(This used to be commit 6a8cc7f0122ac4dd5b10ff1160735ef1a177d448)
2003-12-31 08:45:03 +00:00
Andrew Bartlett
b34401b48a Forgot to commit this for the 'get our primary domain' change.
(This used to be commit 6f3cd9e2af7f1b4bdd7cb0e487987de159bb0dd8)
2003-12-31 08:42:22 +00:00
Andrew Bartlett
e6de276ff4 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
(This used to be commit cc050e01370633a985c9878bdce297f9175fdbf7)
2003-12-31 05:26:29 +00:00
Andrew Bartlett
5eee23cc64 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
(This used to be commit 494781f628683d6e68e8ba21ae54f738727e8c21)
2003-12-31 00:31:43 +00:00
Andrew Bartlett
bcd0e51e28 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
(This used to be commit 3225f262b18bdcf326d3bfd031dac169bd9347c9)
2003-12-30 22:27:33 +00:00
Gerald Carter
318190580d 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()
(This used to be commit 10b9976e0ab961dc34c9426f0a497e0f81a5e17f)
2003-12-30 22:17:14 +00:00
Volker Lendecke
2abf5f928f Another little one: Make pdb_test.c at least compile, although its way out of
date.

Volker
(This used to be commit 5d7a14166af3daf04b570fd5f66469d5db5a3500)
2003-12-30 21:12:36 +00:00
Volker Lendecke
0ac7dcce6b 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
(This used to be commit 6d2285b6d1599648661be47abaaa888419700d22)
2003-12-30 16:00:56 +00:00
Volker Lendecke
a0f8007da5 Fix Bug # 924
Volker
(This used to be commit 3663ed2b964cc306cfe6b4060b51d991405e720d)
2003-12-30 15:18:25 +00:00
Andrew Bartlett
829188b34f 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
(This used to be commit 7a3a5a63612b2698a39f784859496c395505a79b)
2003-12-30 13:20:39 +00:00
Andrew Bartlett
43772e1d4a Make the name of the NTLMSSP client more consistant before we lock it in stone.
(This used to be commit 0fa268863b7352343eb7f211181a02f60848bd0c)
2003-12-30 08:52:46 +00:00
Andrew Bartlett
ca1b7e353d Remove testing hack
(This used to be commit 96f3beb462a6d4a489e894c1f05c528107135b3a)
2003-12-30 07:38:32 +00:00
Andrew Bartlett
adc07646a3 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
(This used to be commit 48315e8fd227978e0161be293ad4411b45e3ea5b)
2003-12-30 07:33:58 +00:00
Andrew Bartlett
bccf3f374b 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
(This used to be commit 2375abfa0077a884248c84614d5109f57dfdf5b1)
2003-12-30 05:02:32 +00:00
Andrew Bartlett
d90e416006 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
(This used to be commit de3c3cbeeb8b674ffc0dd8fe16913f15edcf9022)
2003-12-29 04:21:32 +00:00
Andrew Bartlett
5dff713735 Shutting down the connection closes outstanding sessions, so we don't need
to do it twice...

Amdrew Bartlett
(This used to be commit 8f9a069c59cbd357cbef8814764c10f6d8b6e6e8)
2003-12-28 09:57:29 +00:00
Andrew Bartlett
f73492a58a This patch corrects some errors in the NTLMSSP implementation, that
would incorrectly return INVALID_PARAMETER, instead of allowing a
login.

Andrew Bartlett
(This used to be commit 76c59469a340209959c420bd5c2e947d3347bdb1)
2003-12-27 11:33:24 +00:00
Volker Lendecke
82027c1ea2 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
(This used to be commit f5afaafd61dc7bd191225ffa8eee184125dd97c3)
2003-12-27 10:11:26 +00:00
Volker Lendecke
e84d8b7015 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
(This used to be commit d74137d227cfb7b09294f4429fa09b10d3d01229)
2003-12-26 21:33:53 +00:00
Volker Lendecke
8bfc33f5ed 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
(This used to be commit e6b4b956f68bfea69b2de3608b4c829250d24a7a)
2003-12-26 19:38:36 +00:00
Andrew Bartlett
66f039d58c 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
(This used to be commit 9080c30de8aa96ed3b9b121ca111f1632572754e)
2003-12-26 03:14:31 +00:00
Andrew Bartlett
988f561477 Show the error message for failure to set the ldap password.
(For 'ldap password sync = yes')

Andrew Bartlett
(This used to be commit 5b682aef678cc9ee135852d7ee6b8c159902fab7)
2003-12-26 00:43:48 +00:00
Andrew Bartlett
db088293ae 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.
(This used to be commit fabf80169079483a1378aa0177d8d8335bd98bb3)
2003-12-26 00:38:12 +00:00
Andrew Bartlett
38b17cb153 ldap rebind sleep -> ldap replication sleep
While writing documentation for metze's patch, it became clear that this is a
better name.

Andrew Bartlett
(This used to be commit 6f828ff3d3622c56ee732b976e7ab90b7897a8d3)
2003-12-25 23:11:07 +00:00
Volker Lendecke
3a1b189a9f 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
(This used to be commit 63ffa770b67d700f138d19b4982da152f57674fc)
2003-12-25 22:42:15 +00:00
Volker Lendecke
38d0c9698f 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
(This used to be commit 17473a65eb119ca2240b40a8c029d9a499cde177)
2003-12-25 22:29:38 +00:00
Volker Lendecke
91e1154370 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
(This used to be commit d4e071d14b8ae622c1edbb33bb5677713df1f961)
2003-12-25 10:08:31 +00:00
Andrew Bartlett
3b38606491 Fix bug 916 - do not perform a + -> space substitution for squid URL encoded
strings, only form input in SWAT.

Andrew Bartlett
(This used to be commit 8d54f5fe0c5689660f37788916b37014754ce23e)
2003-12-25 09:37:41 +00:00
Andrew Bartlett
2e9deb12bf 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
(This used to be commit e0a026c9b561893e5534923b18ca748e6177090e)
2003-12-24 09:56:51 +00:00
John Terpstra
1d2cfc6845 Fix typo.
(This used to be commit 46b2fb4db5c7e273a9b43c59340a0a47ade5bd5e)
2003-12-23 20:25:21 +00:00
Jeremy Allison
033fc98a6e Fix for special files being hidden from admins by Dmitry Butskoj <buc@odusz.elektra.ru>
Jeremy.
(This used to be commit bee4b3348e5052cc927c837c2a21b4c90db980fc)
2003-12-23 07:33:42 +00:00
Gerald Carter
380e160778 add well known rid for pre win2k compatible access group; bug 897
(This used to be commit 33a1a374ebb44c839d995d11e1229767fc679678)
2003-12-22 21:48:06 +00:00
Gerald Carter
25a990bde0 correct typo in delete user script; bug 887
(This used to be commit 6060afb98949a39eb4386d35481eaa5caae0fd97)
2003-12-22 21:32:33 +00:00
Jeremy Allison
9f0e1c0f7f Patch from Jianliang Lu j.lu@tiesse.com to manage Power Users
group.
Jeremy.
(This used to be commit 72252fb0b207205d41a2ec50f6d364bf0bb21747)
2003-12-22 11:12:15 +00:00
Richard Sharpe
a07d253fda A small fix to torture.c to cleanup the error handling and prevent crashes.
I really should clean up the comment as well.
(This used to be commit 34351e457a0d9c494653179429fb71453d1d838e)
2003-12-19 01:43:44 +00:00
Gerald Carter
682f20c9ca * 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()
(This used to be commit 850e4be29e185ebe890f094372aa8c2cc86de76a)
2003-12-19 00:33:09 +00:00
Jeremy Allison
68e692738b Add in comments explaining NTLMv2 selection. Use lm session key if that's
all there is.
Jeremy.
(This used to be commit b611f8d170743f1f4d71b1def83bb757d9f467af)
2003-12-17 21:57:26 +00:00
Jeremy Allison
93a983b7cb Tidyup debug message in ntlmssp code. Add brackets around dodgy if statement.
Jeremy
(This used to be commit 5aab4b976c0aced68d71c1e71e85287072a6f3c7)
2003-12-17 20:11:39 +00:00
Gerald Carter
54cff4535e 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.
(This used to be commit ef4ab8d7c497e4229d0c1deeb20d05c95bd8feb9)
2003-12-17 06:18:13 +00:00
Gerald Carter
c763e9548c make sure we delete the group mapping before calling the delete group script; patch from Jianliang Lu <j.lu@tiesse.com>
(This used to be commit 19a8dd523a4ee50ba9066efd60a29cf3ba9ae419)
2003-12-16 18:35:23 +00:00
Jeremy Allison
2ff5ed9555 Small fix from Jérôme Tournier <jerome.tournier@IDEALX.com>
Jeremy.
(This used to be commit 6ce7932520c0e5417e3b8a214a97244d10bdf4ad)
2003-12-16 18:14:10 +00:00
Gerald Carter
5121bd6ede correct problem with pam config install
(This used to be commit c368defc05f80c255ceb51229ea7a2ef16ee6aee)
2003-12-15 16:42:42 +00:00
Gerald Carter
c13109358d more fixes after moving /var/cache/samba -> /var/lib/samba
(This used to be commit 1742780dd67bec7fd30522b47d57035f51f330ad)
2003-12-15 06:52:26 +00:00
Volker Lendecke
9d97b20473 When parsing 'param = value', don't split 'value' at spaces.
Thanks to Ralf Spenneberg for the fix.

Volker
(This used to be commit bc383582b248518e39225405d0def411d552aa7d)
2003-12-14 17:47:15 +00:00
Jeremy Allison
ec83590024 Fix from ndb@theghet.to to allow an existing LDAP machine account to be
re-used, rather than created from scratch.
Jeremy.
(This used to be commit 6d46e66ac2048352ca60f92fc384f60406024d4b)
2003-12-13 01:43:54 +00:00