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

801 Commits

Author SHA1 Message Date
Volker Lendecke
339c149068 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
-
Volker Lendecke
53b5704ff2 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
-
Volker Lendecke
7ae9c2500e 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
-
Volker Lendecke
bc59912aa1 Never touch complicated if/else/elsif structures :-)
This repairs domain join with fully existing wks-account which I broke
with my last patch...

Volker
-
Volker Lendecke
a75015c9ce 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
-
Andrew Bartlett
4bec53c8c8 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
-
Andrew Bartlett
dd6516e2e8 Merge from HEAD - patch from Jianliang Lu <j.lu@tiesse.com> to set the
'minimum password age' during a password SET.

Andrew Bartlett
-
Volker Lendecke
62d5a78b02 Merge from HEAD -
Herb Lewis
55681422e9 void function cannot return a value (besides the function called was
a void)
-
cvs2svn Import User
6f94672d3d This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
Jelmer Vernooij
af7bfee0c6 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.
-
Volker Lendecke
f420320608 Merge from HEAD.
Volker
-
Volker Lendecke
5eaf9195ee 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
-
Volker Lendecke
12110a263b merge from HEAD -
Volker Lendecke
aa9b8382d3 Hey -- there is an error code NT_STATUS_CANNOT_DELETE :-) -
Volker Lendecke
a5218499eb If we fail, return an error code :-)
Volker
-
Volker Lendecke
da83d97eb5 Put group mapping into LDAP.
Volker
-
Volker Lendecke
f0f1518fc4 Put group mapping into LDAP.
Volker
-
Andrew Bartlett
b5283c00a9 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
-
Volker Lendecke
115cd4b27f Fix memory leak.
Volker
-
Volker Lendecke
e8975d6e7b Fix memory leak.
Volker
-
Andrew Bartlett
21add5f97d Fix invalid SAFE_FREE() of talloc()ed memory.
Andrew Bartlett
-
Rafal Szczesniak
5281ee7e84 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
-
Andrew Bartlett
0620320002 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
-
Jelmer Vernooij
f8f2165322 - Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module()
- Add init_modules()
- Call these functions
-
Andrew Bartlett
9ef0d40c3f Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
-
Andrew Bartlett
523d1429b1 Fix comment - the other bits of code don't call this any more. -
Andrew Bartlett
6f32fa2349 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
-
cvs2svn Import User
c31455779d This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
Andrew Tridgell
f4f1f84a6b 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 -
Andrew Bartlett
9c3a1710ef Merge LDAP filter parinoia from HEAD, a few other pdb_ldap updates and some
misc libads fixes.

Andrew Bartlett
-
Andrew Bartlett
e9f56a157b Merge of signed/unsigned fixes from HEAD. -
Andrew Bartlett
21da8c3bb3 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
-
Andrew Bartlett
34b2e558a4 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
-
Andrew Bartlett
01d78b828b A couple more signed/unsigned issues. -
Jeremy Allison
3d04872499 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
-
Jeremy Allison
daf179bcd6 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
-
Herb Lewis
dc88827786 initialize acct_ctrl before using it
remove ldap_msgfree(result); as result is unitialized at this point
-
Herb Lewis
1102a6f8cd initialize acct_ctrl variable before it is used
remove ldap_msgfree(result); as result is unitialized at this point
-
Andrew Bartlett
68de9a5920 Fix some debug lines, and add a bit more info to help track down ldap
connectivity problems.

Andrew Bartlett
-
Andrew Bartlett
2a1adb8f81 Merge indirection, signed/unsigned and uninitialiased-value fixes from HEAD.
Andrew Bartlett
-
Andrew Tridgell
31894ba0e5 clearer debug message when the user is already in the ldap db -
Andrew Bartlett
740bf439d2 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
-
Jeremy Allison
1cff725e37 Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
-
Jeremy Allison
465d86d95f Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
-
Andrew Bartlett
91ca4771c6 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
-
Andrew Bartlett
f3432869b9 Merge from HEAD - don't base RID on a name being the lp_guest_account(), let
the actual passdb modules decide that.

Andrew Bartlett
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Andrew Bartlett
f71c8338d3 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
-
Andrew Bartlett
92a777d0ea 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
-