1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

669 Commits

Author SHA1 Message Date
Andrew Bartlett
63118136fa Merge idra's fix for pdb_tdb segfaults from HEAD to 3.0 - sombody changed
unix_strlower semantics.

Andrew Bartlett
(This used to be commit 93bdd1a2925edb9dea3e85d8b025a65460896c05)
2003-04-23 00:56:06 +00:00
Andrew Bartlett
a4b00668e6 Remove ldapsam_search_one_user_by_uid from pdb_ldap.
sambaAccount requires the rid to be present, and doing this fallback is quite
dangerous, becouse it assumes that alorithmic RIDs are in use - which is quite
often not the case.

Also finish of vl's work on 'use a function pointer, not embedded logic' to
tell lower levels that they should/should not attempt to set the user's password
into LDAP with the extended operation.

Andrew Bartlett
(This used to be commit 715d0bd804b6bff4c0b365f98ca196d41ed9c5c4)
2003-04-22 23:14:49 +00:00
Andrew Bartlett
babd260262 This is meant to be initialised to the size of the buffer.
(This used to be commit ca489db7d3d4713401da3627b563af3cbef82c58)
2003-04-22 15:50:15 +00:00
Andrew Bartlett
690e29a041 Make pdb_ldap use a random factor in deciding how long we need to sleep.
This might help avoid killing the ldap server when all 100 smbd processes
reconnect in pulses...

Also, reduces the maximum wait time, as SMB clients will time out after 30
seconds anyway...

Andrew Bartlett
(This used to be commit 08c5aaae6a92d6ee14f9bf8e3330191718e84edf)
2003-04-22 15:19:14 +00:00
Andrew Bartlett
53f2dd686a Merge mimir's trusted domain code from HEAD -> 3.0, plus some memory
leak fixes. (secrets.c portion)

Andrew Bartlett
(This used to be commit 3ea8fdd0361623b38f30f0b815dc4935e2e17447)
2003-04-22 13:10:02 +00:00
Andrew Bartlett
f071020f5e Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 876e00fd112e4aaf7519eec27f382eb99ec7562a)
2003-04-21 14:09:03 +00:00
Jelmer Vernooij
fd8d17393d Default to "passdb.xml" as default output filename instead of "-"
(This used to be commit dfbd2a2e7a5f0f2713bc48daa24d43b07f187d14)
2003-04-21 01:55:37 +00:00
Jelmer Vernooij
858137d0dd - Fix modules build of pdb_mysql and pdb_xml
- Fix typo in script/installswat.sh
(This used to be commit 8d2aec7a73d41a9d32c10abd1c8833ebfd41dd77)
2003-04-21 01:04:17 +00:00
Jelmer Vernooij
0971cbb9eb Pdb modules are in $libdir/pdb not $libdir/passdb
(This used to be commit 9c9d969c93400d91a12e78635d54e1c5f90efab8)
2003-04-21 00:38:39 +00:00
Volker Lendecke
623336e817 Address gcc warnings.
I could not fix the "passing arg 5 of `ldap_search_s'" completely with
gcc -Wall. A non-developer compile does not complain though.

Volker
(This used to be commit cf923d713305620278e3759599247d3cf7aa0e2f)
2003-04-19 18:44:11 +00:00
Jelmer Vernooij
9c3cecbdac Use the new modules system for passdb (merge from HEAD)
(This used to be commit 1755d5f66221a910863cfc8a197f8d792e6b6e3d)
2003-04-15 16:01:14 +00:00
Jelmer Vernooij
f4db74e30a Fix double free on error and typo
(This used to be commit c131c128e396a944e979992d9a5ac76e8b6e653b)
2003-04-09 14:51:17 +00:00
Andrew Bartlett
185346635a Merge from HEAD - restore previous behaviour of pdb_unix (auto upgrade to
add on update)
(This used to be commit 3ebecc662e0ace4a87153aabe644dcf18969435b)
2003-04-07 04:53:07 +00:00
Andrew Bartlett
dfa7c87a18 Ensure we don't segfault if ldap doesn't fill in the ld_error string (merge from HEAD).
Andrew Bartlett
(This used to be commit be27fa2986767fca1876ea5f886d9fb4c7000660)
2003-04-05 05:11:50 +00:00
Volker Lendecke
684d93dd5f This fixes group updates in LDAP the same way as user updates
are handled, though we assume that always everything needs to
be updated in LDAP. PDB_IS_* is not done yet for groups.
Do we need it?

Volker
(This used to be commit 091f8f94486057b33f0409887ba09000a8415f4c)
2003-03-30 16:40:41 +00:00
Andrew Bartlett
8d751b02a5 Try to get meaningful errors out of ldap more often - get the error string
from the server, not just the error code translation.

Andrew Bartlett
(This used to be commit 92415441fdc0f7d7c8b338d4cd4bbbba5418f88e)
2003-03-28 09:59:11 +00:00
Volker Lendecke
26482ffad5 This is no functional change. It just makes pdb_ldap.c a bit
easier to understand by moving the logic for init_ldap_from_sam
and friends around.

Volker
(This used to be commit 09a92984baaee94521d0cacf16daaf0291242b42)
2003-03-27 14:31:46 +00:00
Volker Lendecke
e5c998b589 Must have been somewhere else last sunday...
Apply metzes patch (hopefully) correctly this time

Volker
(This used to be commit e52a2d5d49e3c784d5db06bade2c866422258fcc)
2003-03-25 08:55:37 +00:00
Volker Lendecke
7d4bfa0eda Implement abartlet's suggestion to add attribs to ldap if they
are 'SET' when adding the account.

I really don't like passing flags down to inner routines and
complicated if/else conditions, but this time he might be right. ;-)

Volker
(This used to be commit 339c14906802db6ddb59f07a0c71dcc3c73cc3d6)
2003-03-23 14:20:21 +00:00
Volker Lendecke
3970ad75b8 Merge from HEAD:
This adds 'ldap delete dn' as the recommended parameter
for the 'ldap del only sam attr' functionality. So
we are compatiple to the current SuSE patches as well
as to TNG... ;-)

Volker
(This used to be commit 53b5704ff21de6fce097d74dd7f235d3ceccec66)
2003-03-23 09:18:33 +00:00
Volker Lendecke
42ba08260a Metzes change:
> Hi Volker,
>
> if 'displayName' is not available we should fallback to 'cn' for map->nt_name
> 'cn' is used as unix group name by nss_ldap.
>
> and if nt_name is not available we should fail (so does this patch)

Volker
(This used to be commit 7ae9c2500e3ac5f671d41077327156f1f3767fff)
2003-03-23 08:41:05 +00:00
Volker Lendecke
25fc7699d5 Never touch complicated if/else/elsif structures :-)
This repairs domain join with fully existing wks-account which I broke
with my last patch...

Volker
(This used to be commit bc59912aa10e5000225110e48ad548f19756bed5)
2003-03-22 20:49:26 +00:00
Volker Lendecke
49c0726fca This changes the way we do LDAP updates. We don't use LDAP_MOD_MODIFY
anymore, but instead look at what is currently stored in the
database. Then we explicitly delete the existing attribute and add the
new value if it is not NULL or "". This way we can handle appearing
and disappearing attributes quite nicely.

This currently breaks pdbedit -o, as this does not set the CHANGED
flag on the SAM_ACCOUNT.

Jelmer suggested that we set all the fields on CHANGED in
context_add_sam_account. This sounds not too unreasonable.

Volker
(This used to be commit a75015c9ce8246670ee7c7d73df585390696fe95)
2003-03-22 19:16:36 +00:00
Andrew Bartlett
3d8c50c874 Thanks to volker, merge passdb changes from HEAD:
- pdb_guest (including change defaults)
 - 'default' passdb actions (instead of 'not implemented' stubs in each module)

 - net_rpc_samsync no longer assumes pdb_unix

Andrew Bartlett
(This used to be commit 4bec53c8c81019f0f06a93c4df0800bbf7281dd6)
2003-03-22 09:03:46 +00:00
Andrew Bartlett
0655f20f96 Merge from HEAD - patch from Jianliang Lu <j.lu@tiesse.com> to set the
'minimum password age' during a password SET.

Andrew Bartlett
(This used to be commit dd6516e2e87cbe6bcbc371756d99ebb3b5617c2b)
2003-03-22 08:09:22 +00:00
Volker Lendecke
d02f57f144 Merge from HEAD
(This used to be commit 62d5a78b024898485f610b5d9db1a6d9a5c68c21)
2003-03-20 12:52:56 +00:00
Herb Lewis
4377376832 void function cannot return a value (besides the function called was
a void)
(This used to be commit 55681422e97ede0ff9446925c7678d6254b13878)
2003-03-19 22:38:37 +00:00
cvs2svn Import User
1719a676f3 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 6f94672d3da070aae0b17f4dcdc6cd119b68d84c) 2003-03-19 18:45:20 +00:00
Jelmer Vernooij
47ea3a2bf2 Put in the new modules system. It's now used by passdb and rpc. I will
put a doc about it in dev-doc later today.
(This used to be commit af7bfee0c6902c07fdb8d3abccf4c8d6bab00b5a)
2003-03-19 18:45:19 +00:00
Volker Lendecke
9da46eec53 Merge from HEAD.
Volker
(This used to be commit f42032060812e9bf409042c790e71fefb40ff17a)
2003-03-19 18:21:44 +00:00
Volker Lendecke
45df237d13 Add paramter 'ldap del only sam attr'.
This patch is heavily based on a patch by SuSE. Thanks
to Guenther Deschner <gd@suse.de> for providing it.

Volker
(This used to be commit 5eaf9195eefda5ababba85cc0f6d581ff6f0f454)
2003-03-19 18:17:12 +00:00
Volker Lendecke
bde1f785b4 merge from HEAD
(This used to be commit 12110a263b5ac65d6b965ccbe19b7be3025f0373)
2003-03-19 14:59:51 +00:00
Volker Lendecke
97575a9ba7 Hey -- there is an error code NT_STATUS_CANNOT_DELETE :-)
(This used to be commit aa9b8382d38346cb3e94ddf2e7caf6d663034579)
2003-03-19 14:58:20 +00:00
Volker Lendecke
91d55a509a If we fail, return an error code :-)
Volker
(This used to be commit a5218499eb3f0a62cd663a06157591fbb0dfcbef)
2003-03-19 14:56:50 +00:00
Volker Lendecke
7679811afb Put group mapping into LDAP.
Volker
(This used to be commit da83d97eb50c3c3a67985e22410842100207431f)
2003-03-19 09:43:23 +00:00
Volker Lendecke
6fe08f60ca Put group mapping into LDAP.
Volker
(This used to be commit f0f1518fc450834725902e9cdf33fb8d35f99360)
2003-03-19 09:38:47 +00:00
Andrew Bartlett
a8eaea53ed Merge from HEAD - make winbindd locking sane again:
Original message:


This patch attemptes to clean up winbindd's mutex locking.

The current locking scheme in winbind is a complete mess - indeed, the
next step should be to push the locking into cli_full_connection(), but
I'll leave it for now.

This patch works on the noted behaviour that 2 parts of the connection
process need protection - and independent protection.  Tim Potter did
some work on this a little while back, verifying the second case.

The two cases are:
 - between connect() and first session setup
 - during the auth2 phase of the netlogon pipe setup.

I've removed the counter on the lock, as I fail to see what it gains us.

This patch also adds 'anonymous fallback' to our winbindd -> DC connection.

If the authenticated connection fails (wbinfo -A specifed) - say that
account isn't trusted by a trusted DC - then we try an anonymous.

Both tpot and mbp like the patch.

Andrew Bartlett
(This used to be commit b5283c00a900393b83f0edb2785c5caf402404eb)
2003-03-17 23:06:12 +00:00
Volker Lendecke
b20eb4825b Fix memory leak.
Volker
(This used to be commit 115cd4b27f84343c7f98622717edda6da4866a6b)
2003-03-17 22:10:49 +00:00
Volker Lendecke
0a8e719a4b Fix memory leak.
Volker
(This used to be commit e8975d6e7bdcceb78a83a3446cf1430e1e3f1a72)
2003-03-17 22:09:06 +00:00
Andrew Bartlett
a9034ec179 Fix invalid SAFE_FREE() of talloc()ed memory.
Andrew Bartlett
(This used to be commit 21add5f97d0d112094e34a02e6319991a1d2af4d)
2003-03-17 10:59:11 +00:00
Rafal Szczesniak
e583dd6278 Fresh meat in trusted domains code:
- packing/unpacking utility functions for trusted domain
   password struct; can be used to prepare buffer to store
   in secrets.tdb or (soon) passdb backend
 - similiar functions for DOM_SID
 - respectively modified secrets_(fetch|store) routines
 - new auth mapping code utilising introduced is_trusted_domain
   function
 - added tdb (un)packing of single bytes



Rafal
(This used to be commit 5281ee7e84421b9be746aed2f1718ceaf2a2fe3d)
2003-03-14 17:12:40 +00:00
Andrew Bartlett
3b580ff000 This patch attemptes to clean up winbindd's mutex locking.
The current locking scheme in winbind is a complete mess - indeed, the
next step should be to push the locking into cli_full_connection(), but
I'll leave it for now.

This patch works on the noted behaviour that 2 parts of the connection
process need protection - and independent protection.  Tim Potter did
some work on this a little while back, verifying the second case.

The two cases are:
 - between connect() and first session setup
 - during the auth2 phase of the netlogon pipe setup.

I've removed the counter on the lock, as I fail to see what it gains us.

This patch also adds 'anonymous fallback' to our winbindd -> DC connection.

If the authenticated connection fails (wbinfo -A specifed) - say that
account isn't trusted by a trusted DC - then we try an anonymous.

Both tpot and mbp like the patch.

Andrew Bartlett
(This used to be commit 0620320002082298a15cbba72bd79aecfc607947)
2003-03-11 11:28:59 +00:00
Jelmer Vernooij
d21b15ff57 - Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module()
- Add init_modules()
- Call these functions
(This used to be commit f8f21653225792c0001d183c6efe8b7d89a0785d)
2003-02-27 01:54:41 +00:00
Andrew Bartlett
266ec4aac0 Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
(This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
2003-02-24 03:09:08 +00:00
Andrew Bartlett
db94beaa41 Fix comment - the other bits of code don't call this any more.
(This used to be commit 523d1429b1072c999d376d2b4e13a1c08349990a)
2003-02-22 12:17:02 +00:00
Andrew Bartlett
3e19eda335 Remove 'unixsam' from the default passdb backends.
The intention is to remove the muliple passdb backends, but we need the
'guest' account to always be there.  If the admin adds the guest account to
(say) LDAP, there will only be one backend required for operation.

This helps remove some nasty behaviours with adding accounts to the system
for both the RPC 'create user' and the SAMSYNC code.  Users 'added' with
an 'add user/machine' script won't magicly appear, and machine accounts
'pre-added' to unix, but not the smbpasswd file will not cause mayhem.

This commit also implements somthing tridge discussed with me, the concept
of 'default' passdb operation pointers - so that each backend does not
need it's own stub funcitons wrapping the default tdb privilages/group
mapping code.

This also removes an implicit 'sid->name' and 'name->sid' mapping from our
own local SID space, to winbind usernames.  When adding mapping for NIS/LDAP
non-sam users in future, we need to be careful.

Andrew Bartlett
(This used to be commit 6f32fa234961a525760a05418a08ec48d22d7617)
2003-02-22 12:01:05 +00:00
cvs2svn Import User
059c4fd81d This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit c31455779d7948e866fe1916425c3746134dea01) 2003-02-18 05:05:16 +00:00
Andrew Tridgell
faf30e69ae initial server side privileges implementation, using a tdb. This needs to be hooked into pdb, and we need some access control on changing privileges. That's next
(This used to be commit f4f1f84a6bf1d356ccc83f0ecb135bef4a39619e)
2003-02-12 09:14:35 +00:00
Andrew Bartlett
963e88aa90 Merge LDAP filter parinoia from HEAD, a few other pdb_ldap updates and some
misc libads fixes.

Andrew Bartlett
(This used to be commit 9c3a1710efba9fa4160004a554687d4b85927bb1)
2003-02-01 07:59:29 +00:00
Andrew Bartlett
3b2244526c Merge of signed/unsigned fixes from HEAD.
(This used to be commit e9f56a157bd472914eebf64fde586104d8274717)
2003-02-01 07:25:53 +00:00