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

776 Commits

Author SHA1 Message Date
Volker Lendecke
e6fd597fce And some more memory leaks in mapping.c and pdb_tdb.c. tdb_nextkey
mallocs its key, so we should free it after use.

Volker
(This used to be commit 9750799ba2e1aaa59fa255f23880c9c618195c3d)
2003-06-18 12:00:52 +00:00
Volker Lendecke
e48ebd09ff Better panic cleanly than segfault later when no sid can be found and created.
Everybody who calls get_global_sam_sid expects this to return non-NULL, and
there are way too many places where this is called.

Volker
(This used to be commit 2dfa896e6fdd52aa0eebe7d811c7b4072fe98be3)
2003-06-18 08:42:04 +00:00
Volker Lendecke
9606397ab1 Fix a memory leak in pdb_tdb.c.
Simo, I remember you complaining about a memleak there, could it be
this one, or did you resolve it at that time?

Volker
(This used to be commit c660595deda2ce836c0a191da0236f850004ba0d)
2003-06-17 12:03:48 +00:00
Jelmer Vernooij
c0e24984f0 Make static (patch from metze)
(This used to be commit 908b16cc2a8b6c5c67aae0e1af9d51f57fe31212)
2003-06-17 10:48:06 +00:00
Jelmer Vernooij
cafb5c512d The return value of init_module functions is NTSTATUS, not int
(This used to be commit f09df852ac0b25470fb9435c79a4a417e06e9b75)
2003-06-17 10:38:22 +00:00
Jelmer Vernooij
ac44100674 Update link to DTD
(This used to be commit 2737518b2571fecf60fcbcd99575dd6cf5bd0bdb)
2003-06-16 21:34:59 +00:00
Tim Potter
3d65c033da Quieten another debug message.
(This used to be commit 2c47893c7542889d9e2ee097897a1df248b1a5e2)
2003-06-16 05:22:53 +00:00
Tim Potter
94d1dd96d6 Quieten debug message.
(This used to be commit 02d12cc4b9b9c5cfb7a05a6c2cf71cc59144bec9)
2003-06-16 05:20:37 +00:00
Tim Potter
0a9396dcca Rename some uuid functions so as not to conflict with system
versions.  Fixes bug #154.
(This used to be commit 986eae40f7669d15dc75aed340e628aa7efafddc)
2003-06-13 04:35:53 +00:00
Andrew Bartlett
ed9c090737 Try to fix memory leaks found by valgrind in pdb_ldap code.
Andrew Bartlett
(This used to be commit decadfcc8205ed5611d74141e301569ef8b1d9f4)
2003-06-07 03:22:37 +00:00
Gerald Carter
e485bc7e3e support LDAP_EXOP_MODIFY_PASSWORD (not experiemental in OpenLDAP 2.1)
(This used to be commit 50fdc938222112b5470d05d8cd15386bd0a112df)
2003-06-06 22:50:54 +00:00
Gerald Carter
711f8d0a13 * break out more common code used between pdb_ldap and idmap_ldap
* remove 'winbind uid' and 'winbind gid' parameters (replaced
  by current idmap parameter)
* create the sambaUnixIdPool entries automatically in the 'ldap
  idmap suffix'
* add new 'ldap idmap suffix' and 'ldap group suffix' parametrer
* "idmap backend = ldap" now accepts 'ldap:ldap://server/' format
  (parameters are passed to idmap init() function
(This used to be commit 1665926281ed2be3c5affca551c9d458d013fc7f)
2003-06-06 13:48:39 +00:00
Gerald Carter
3bdfd57a2d working draft of the idmap_ldap code.
Includes sambaUnixIdPool objectclass

Still needs cleaning up wrt to name space.
More changes to come, but at least we now have a
a working distributed winbindd solution.
(This used to be commit 824175854421f7c27d31ad673a8790dd018ae350)
2003-06-05 02:34:30 +00:00
Gerald Carter
1a6f9e5a86 cut-n-paste error
(This used to be commit eb567e803e2da3ce11174812a5162642d8ef342b)
2003-05-27 22:36:07 +00:00
Gerald Carter
52f92cf577 fix bug 118; replace hard coded 'next[User|Group]Rid' attribute names
(This used to be commit f7ebb3c9e5d38d86d48459b7962a3da6d4900285)
2003-05-27 16:55:53 +00:00
Tim Potter
3ddaeed282 I'm pretty sure these uint32's should be uid_t's. Can the passdb guys
please check this?
(This used to be commit af4b1f869a7dca0d24391fb2cefef7e05cca2c04)
2003-05-27 07:21:57 +00:00
Gerald Carter
52ae1c4b2d fix bug #108; sambaSambaAccount string attributes are case insensitive; don't try to change a string that only differs in case
(This used to be commit 01ef08352007487040edefcc0b99ca79823cbddf)
2003-05-22 17:07:41 +00:00
Andrew Bartlett
90d24ee9a6 Well spotted typo by Marco Berger <MARCOB@voelcker.com>
Andrew Bartlett
(This used to be commit f16b0e025ea3112b4c231b67bc95f63418599f2e)
2003-05-16 14:15:09 +00:00
Simo Sorce
10717c720d Fix from Alex Deiter <tiamat@komi.mts.ru>
Reversed check.
(This used to be commit 542ee1d3d6401c4d03770f07cfc907d016e166b4)
2003-05-16 07:59:52 +00:00
Simo Sorce
9e9849c0ee add metze's patch for smb_register functions
(This used to be commit 1480c7e8c7a84c34181118c449c50ca99fdcbc6b)
2003-05-16 06:20:57 +00:00
Gerald Carter
b81af9ebbd readding reverted changes during idmap merge (noticed by Andrew b.)
(This used to be commit c6d836c61cb3e122dcc41b874ed5a03a130b6a4c)
2003-05-14 18:36:54 +00:00
Gerald Carter
df641bc7ca fix group mapping in LDAP under new schema
(This used to be commit 0714dda7cc4a1df73e1b9d11daae80a1f46583de)
2003-05-14 05:28:16 +00:00
Gerald Carter
5d16254f56 *****LDAP schema changes*****
New objectclass named sambaSamAccount which uses attribute
prefaced with the phrase 'samba' to prevent future name clashes.

Change in functionality of the 'ldap filter' parameter.  This always
defaults to "(uid=%u)" now and is and'd with the approriate objectclass
depending on whether you are using ldapsam_compat or ldapsam

conversion script for migrating from sambaAccount to
sambaSamAccount will come next.
(This used to be commit 998586e65271daa919e47e1206c0007454cbca66)
2003-05-14 03:32:20 +00:00
Tim Potter
8652163471 Fix pointer return bug in get_unix_attributes()
(This used to be commit 7aa54f0a7f3bcfb5d9560ca3bb88e1549b7ce421)
2003-05-14 00:58:41 +00:00
Tim Potter
402fbc518a spelling
(This used to be commit 865c11275685c85124b506c9bbd2a8bde2e760b9)
2003-05-14 00:46:43 +00:00
Tim Potter
d956b34997 spelling
(This used to be commit 1b4f904277b5e9331cdf4491163f856aa78d0453)
2003-05-14 00:27:12 +00:00
Andrew Bartlett
b47963ae5a Restore a number of fixes that idra removed when he merged his
idmap-and-the-rest from HEAD.

These are correctness fixes that were already in 3.0, and a memory leak fix.

The pdb_ldap changes are held back at jerry's request (he is also playing
with pdb_ldap ATM).

Andrew Bartlett
(This used to be commit c7d5e336bd91514a02974044742b058be387e490)
2003-05-13 15:29:23 +00:00
Andrew Bartlett
ddb600102f Try to fix up some code in pdb_smbpasswd that assumed we still had a 'uid'.
This is to get non-unix accounts going for the build farm.

Andrew Bartlett
(This used to be commit 3daf7cba2393af768b253c419152ea305204f3d8)
2003-05-13 01:00:25 +00:00
Jeremy Allison
6abef08100 Fix obvious compiler warnings.
Jeremy.
(This used to be commit 2a6d0c2481c3c34351e57c30a85004babdbf99b0)
2003-05-12 21:27:54 +00:00
Simo Sorce
c823b191ab And finally IDMAP in 3_0
We really need idmap_ldap to have a good solution with ldapsam, porting
it from the prvious code is beeing made, the code is really simple to do
so I am confident it is not a problem to commit this code in.

Not committing it would have been worst.
I really would have been able to finish also the group code, maybe we can
put it into a followin release after 3.0.0 even if it may be an upgrade
problem.

The code has been tested and seem to work right, more testing is needed for
corner cases.

Currently winbind pdc (working only for users and not for groups) is
disabled as I was not able to make a complete group code replacement that
works somewhat in a week (I have a complete patch, but there are bugs)

Simo.
(This used to be commit 0e58085978f984436815114a2ec347cf7899a89d)
2003-05-12 18:12:31 +00:00
Gerald Carter
9308eaf77d fixing typos in debug statements
(This used to be commit f59bcb51cfe4e268ba43245d401d212aefdf2b72)
2003-05-12 16:06:05 +00:00
Andrew Bartlett
2735fb0119 As discussed on samba-technical - move to 'primaryGroupSid' insted of
primaryGroupID (rid).  This is consistant with the move from 'rid' to ntSid
for the primary user identifier.

Also cope with legacy installations where primaryGroupID might have been
stored as 0.

Andrew Bartlett
(This used to be commit 0e432817cb927b41af7b49fb0b5081ffdb46f85e)
2003-05-11 05:59:34 +00:00
Andrew Bartlett
0058395444 Using /dev/urandom for determining an ldap server backoff is a waste of system
entropy - use sys_random() instead.

Andrew Bartlett
(This used to be commit 640462a365235aa7ce6f817778f022530a25d909)
2003-05-11 02:26:53 +00:00
Jelmer Vernooij
0914e541f5 Reverse previous patch from Stefan and me after comments by Andrew Bartlett
(This used to be commit d817eaf0ecca2d878ab1ffcf7a747a02d71c811e)
2003-05-10 11:49:51 +00:00
Jelmer Vernooij
c507ebe567 Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
(This used to be commit 74d9ecfe2dd7364643d32acb62ade957bd71cd0d)
2003-05-10 10:53:48 +00:00
John Terpstra
aae4f09c84 Fix typo.
(This used to be commit 7bec28f23c5bef8516e798a0808585ed1a30517e)
2003-05-10 00:03:58 +00:00
Jeremy Allison
075695ee7f Fix irritating typo - non arg functions should be fn(void).
Jeremy.
(This used to be commit 395dfd196cf4bcd432a4895d3dd09fefd46cd6d8)
2003-05-07 21:40:11 +00:00
Andrew Bartlett
3eeb40f9b5 Set our 'global sam name' in one place. For domain controllers, this is
lp_workgroup(), for all other server this is global_myname().

This is the name of the domain for accounts on *this* system, and getting
this wrong caused interesting bugs with 'take ownership' on member servers
and standalone servers at Snap.

(They lookup the username that they got, then convert that to a SID - but
becouse the domain out of the smbpasswd entry was wrong, we would fail the
lookup).

Andrew Bartlett
(This used to be commit 5fc78eba20411f3f5a8ccadfcba5c4ab73180dba)
2003-05-07 08:21:06 +00:00
Jelmer Vernooij
d2373e7dce Make the version numbers ints (patch from metze)
(This used to be commit dbe36b4c43dceddea9f14161c6cf7b34709287c8)
2003-04-30 23:06:44 +00:00
Andrew Bartlett
281d95e2f3 Use a common function to create the SAM_ACCOUNT being used to add accounts
to the system.  This means that we always run Get_Pwnam(), and can never add
FOO when foo exists on the system (the idea is to instead add foo into
the passdb, using it's full name, RID etc).

Andrew Bartlett
(This used to be commit bb79b127e02cefae13c822fd0fd165f1f214b740)
2003-04-29 09:43:17 +00:00
Gerald Carter
e30c2e18f6 don't implement any group mapping functions in the guest sam module
(This used to be commit a354bf4b7eadec3e6aa5f5547b58c7856fda3471)
2003-04-29 05:31:06 +00:00
Jelmer Vernooij
17a3acafa8 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
(This used to be commit bc4b51bcb2daa7271c884cb83bf8bdba6d3a9b6d)
2003-04-28 17:48:48 +00:00
Andrew Bartlett
c5be81e636 The caller must always set the RID on the SAM_ACCOUNT, so don't try and guess
it from the UID.

Andrew Bartlett
(This used to be commit cdc1d0505107d05d784693d321b24208a386d4f0)
2003-04-28 11:46:22 +00:00
Andrew Bartlett
84e479c4a3 The RID must be 'SET', not 'DEFAULT' or we won't set it into LDAP, and try
to make it up from the algorithm...

Andrew Bartlett
(This used to be commit 0d8e4066a3bfbe89b464a90fc9f16a7dd1539573)
2003-04-28 11:40:58 +00:00
Andrew Bartlett
9449d80f87 Guenther Deschner <gd@suse.de> notes that I missed out setting the default
for the 'normal' case (not --with-ldapsam).

Andrew Bartlett
(This used to be commit ebe5c618189391e6adf27e565a5821f8d47c8c7d)
2003-04-28 11:14:12 +00:00
Andrew Bartlett
49530d0db5 A new pdb_ldap!
This patch removes 'non unix account range' (same as idra's change in HEAD),
and uses the winbind uid range instead.

More importanly, this patch changes the LDAP schema to use 'ntSid' instead
of 'rid' as the primary attribute.  This makes it in common with the group
mapping code, and should allow it to be used closely with a future idmap_ldap.

Existing installations can use the existing functionality by using the
ldapsam_compat backend, and users who compile with --with-ldapsam will get
this by default.

More importantly, this patch adds a 'sambaDomain' object to our schema -
which contains 2 'next rid' attributes, the domain name and the domain sid.
Yes, there are *2* next rid attributes.  The problem is that we don't 'own'
the entire RID space - we can only allocate RIDs that could be 'algorithmic'
RIDs.  Therefore, we use the fact that UIDs in 'winbind uid' range will be
mapped by IDMAP, not the algorithm.

Andrew Bartlett
(This used to be commit 3e07406ade81e136f67439d4f8fd7fe1dbb6db14)
2003-04-28 10:20:55 +00:00
Tim Potter
266f1fddff Merge of a debuglevel downgrade from HEAD.
(This used to be commit d17e04e82b77256f10f4bdf4442dac6d30e197b5)
2003-04-28 05:26:59 +00:00
Jelmer Vernooij
45ffe8c816 Fix number of arguments to asprintf()
(This used to be commit 42e76c312333c6e5b8feb2d687e3355235b0d4a0)
2003-04-28 00:28:25 +00:00
Jelmer Vernooij
d32e9ee6e1 Make some more functions static
(This used to be commit ddd2e65586ff47daf4f63e9928413cc05bf5db85)
2003-04-28 00:28:01 +00:00
Andrew Bartlett
38c0f29c9e Remove the unpopular pdb_unix, which has served it's time well.
Also get charset 'werid' for both --enable-developer options in configure.

Andrew Bartlett
(This used to be commit 2a99e77e91cd214296f12b0aaf30c3c51d5a2c0a)
2003-04-26 13:49:55 +00:00