1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

648 Commits

Author SHA1 Message Date
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
Andrew Bartlett
97716129f5 More ldap parinoia - if we ever get more than one result, bail. The order we
get them in should be indeterminate, so just picking the first one would be
bad...

Andrew Bartlett
(This used to be commit 21da8c3bb39c507eb90865549c3bb3538dcea138)
2003-02-01 06:13:33 +00:00
Andrew Bartlett
c2b134cc3b Always escape ldap filter strings. Escaping code was from pam_ldap, but I'm to
blame for the realloc() stuff.

Plus a couple of minor updates to libads.

Andrew Bartlett
(This used to be commit 34b2e558a4b3cfd753339bb228a9799e27ed8170)
2003-02-01 05:20:11 +00:00
Andrew Bartlett
840e8b3502 A couple more signed/unsigned issues.
(This used to be commit 01d78b828b89f04b70b53ded01a7f4b356979317)
2003-02-01 04:39:15 +00:00
Jeremy Allison
effbd70c21 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
(This used to be commit 3d04872499332ef2d8e7479b924afc8fc1ac29d7)
2003-01-16 20:08:33 +00:00
Jeremy Allison
6b2eb72df0 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
(This used to be commit daf179bcd6297b525bfc644efb154734723f4d58)
2003-01-16 20:08:26 +00:00
Herb Lewis
f6f4492874 initialize acct_ctrl before using it
remove ldap_msgfree(result); as result is unitialized at this point
(This used to be commit dc8882778694289ca461de57d443992f52ab7524)
2003-01-15 16:44:35 +00:00
Herb Lewis
6999ff1d48 initialize acct_ctrl variable before it is used
remove ldap_msgfree(result); as result is unitialized at this point
(This used to be commit 1102a6f8cdf295d564df5447a223b354be72895d)
2003-01-15 16:41:29 +00:00
Andrew Bartlett
bc11f19051 Fix some debug lines, and add a bit more info to help track down ldap
connectivity problems.

Andrew Bartlett
(This used to be commit 68de9a59203ed9778f11b78f233dc437b9dab55d)
2003-01-14 23:45:14 +00:00
Andrew Bartlett
212077afa2 Merge indirection, signed/unsigned and uninitialiased-value fixes from HEAD.
Andrew Bartlett
(This used to be commit 2a1adb8f81d8966e8919fffb9b4c69f3e6acd44f)
2003-01-14 07:26:12 +00:00
Andrew Tridgell
cfe3a1731c clearer debug message when the user is already in the ldap db
(This used to be commit 31894ba0e5847eb934688598cd8d65bead23c58b)
2003-01-14 00:39:18 +00:00
Andrew Bartlett
1276959d7c Always initialise this variable - and don't set the 'must change now' if it was
last changed at '0'.

We need to actually change this password sometime...

Andrew Bartlett
(This used to be commit 740bf439d2d1512127c873cf0e57697161d6566b)
2003-01-13 21:49:49 +00:00
Jeremy Allison
7f4177aa9e Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
(This used to be commit 1cff725e37d04e25d2cd5523683b35c82d5040fa)
2003-01-08 02:09:18 +00:00
Jeremy Allison
f420f75508 Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
(This used to be commit 465d86d95fbdeda423d1f4b06cee46c119a31447)
2003-01-08 02:09:14 +00:00
Andrew Bartlett
302bffc08f Merge from HEAD - we already have one function for converting a unistr2 to a
static 'unix' string, so we don't need a second pdb specific version.

Andrew Bartlett
(This used to be commit 91ca4771c6b834747b06fff21822a14e929de2c1)
2003-01-04 08:57:51 +00:00
Andrew Bartlett
c1a357ecb5 Merge from HEAD - don't base RID on a name being the lp_guest_account(), let
the actual passdb modules decide that.

Andrew Bartlett
(This used to be commit f3432869b9c761a029fd804d244d0ea26b26173d)
2003-01-04 08:50:57 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
2003-01-03 08:28:12 +00:00
Andrew Bartlett
ff18825765 We already have one function to move unistr2 -> multibyte-static, so we
don't need a second just for pdb.

Also, remove magic 'is lp_guest_account' test - the magic RID should be
up to the passdb backend to set.

Andrew Bartlett
(This used to be commit f71c8338d35a2e8c73c3d8006ea6858cb522c715)
2003-01-02 13:10:25 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2003-01-02 09:07:17 +00:00
Jeremy Allison
98ac4503ac Finish adding strings to all talloc_init() calls.
Jeremy.
(This used to be commit aa8439a49ec4b9f433745fefa1e769e45398f4df)
2002-12-23 23:54:10 +00:00
Jeremy Allison
7f23546730 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a665ae678eea239759bb2de1a0d7b33)
2002-12-20 20:23:06 +00:00
Jeremy Allison
ef8bd7c4f7 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 09a218a9f6fb0bd922940467bf8500eb4f1bcf84)
2002-12-20 20:21:31 +00:00