summaryrefslogtreecommitdiffstats
path: root/source/include/passdb.h
Commit message (Collapse)AuthorAgeFilesLines
* BIG patch...Andrew Bartlett2003-01-021-1/+1
| | | | | | | | | | | | | | | | 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
* Use smb_register_passdb() - plus some small fixesJelmer Vernooij2002-11-151-7/+0
|
* Add smb_register_passdb()Jelmer Vernooij2002-11-151-0/+1
|
* This moves the group mapping API into the passdb backend.Volker Lendecke2002-10-211-1/+47
| | | | | | | | | | | | Currently this calls back to mapping.c, but we have the framework to get the information into LDAP and the passdb.tdb (should we? I think so..). This has received moderate testing with net rpc vampire and usrmgr. I found the add_groupmem segfault in add_aliasmem as well, but that will be another checkin. Volker
* Nice *big* patch from metze.Andrew Bartlett2002-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual design change is relitivly small however: It all goes back to jerry's 'BOOL store', added to many of the elements in a SAM_ACCOUNT. This ensured that smb.conf defaults did not get 'fixed' into ldap. This was a great win for admins, and this patch follows in the same way. This patch extends the concept - we don't store values back into LDAP unless they have been changed. So if we read a value, but don't update it, or we read a value, find it's not there and use a default, we will not update ldap with that value. This reduced clutter in our LDAP DB, and makes it easier to change defaults later on. Metze's particular problem was that when we 'write back' an unchanged value, we would clear any muliple values in that feild. Now he can still have his mulitivalued 'uid' feild, without Samba changing it for *every* other operation. This also applies to many other attributes, and helps to eliminate a nasty race condition. (Time between get and set) This patch is big, and needs more testing, but metze has tested usrmgr, and I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly flawed ;-). The same system will be introduced into the SAM code shortly, but this fixes bugs that people were coming across in production uses of Samba 3.0/HEAD, hence it's inclusion here. Andrew Bartlett
* forgot include file, sorrySimo Sorce2002-09-261-14/+14
|
* Add 'const' to the function prototypes to match the recent commit.Andrew Bartlett2002-08-071-2/+2
|
* Add module versioning to the passdb module systemAndrew Bartlett2002-06-221-0/+14
| | | | | | | | | | | | | All passdb modules need to include a 'magic' macro that creates simple 'return my version number' function. (from metze and jelmer) Also fix up the dir_drive autosubsitute code to correctly use lp_logon_drive(). (from metze) Andrew Bartlett
* change: pdb_getsampwrid() ->pdb_getsampwsid()Simo Sorce2002-05-261-2/+2
| | | | | | passdb interface change, now the passdb modules will be asked for SID not for rid, the modules have been updated with a passthrough function that calls the old getsampwrid() functions. srv_samr_nt.c functions that made use of the pdb_getsampwrid funcion has been updated to use the SID one.
* Don't duplicat this here, use the existing function prototype.Andrew Bartlett2002-05-241-4/+2
|
* Oops, I missed commiting this earlier.Andrew Bartlett2002-05-181-3/+3
| | | | | | | The idea is that pdb_add_sam_account() should have a non-const SAM_ACCOUNT, and update some of the the properties generated during the add. Andrew Bartlett
* indentAndrew Bartlett2002-05-171-2/+2
|
* This is the 'multiple pdb backends' patch from ctrlsoft, aka Jelmer VernooijAndrew Bartlett2002-04-131-9/+15
| | | | | | | | | | | | | <jelmer@nl.linux.org>. This patch also includes major rework of pdbedit to use popt, and the addition of -i paramter (allowing the user to specify which PDBs is being operated on) and -e to export a pdb - useful for backup and testing etc. Use of -i and -e gets us pdb2pdb functionality for transition between backends, much like the sam2sam in TNG. Andrew Bartlett
* second step to gain free uid<->rid mappingSimo Sorce2002-03-191-8/+0
| | | | we still need to free gid<->rid mapping and few other stuff
* ops forgot this :-)Simo Sorce2002-03-191-0/+8
|
* Add the pdb_plugin module from Jelmer Vernooij <jelmer@nl.linux.org>.Andrew Bartlett2002-02-221-1/+4
| | | | | | | | | | | | | This allow the user to select 'passdb backend = plugin : /path/to/plugin.so : pluging args' And load any arbitary plugin. Apparently Jelmer has a mysql plugin in the works - hence this patch. We probably need to rework the interface a bit before 3.0 (add versioning of some kind) but this is a good start. Andrew Bartlett
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* This always points at a string literal, so it probably should be 'const'.Andrew Bartlett2002-01-261-1/+1
|
* This is another *BIG* change...Andrew Bartlett2002-01-201-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Samba now features a pluggable passdb interface, along the same lines as the one in use in the auth subsystem. In this case, only one backend may be active at a time by the 'normal' interface, and only one backend per passdb_context is permitted outside that. This pluggable interface is designed to allow any number of passdb backends to be compiled in, with the selection at runtime. The 'passdb backend' paramater has been created (and documented!) to support this. As such, configure has been modfied to allow (for example) --with-ldap and the old smbpasswd to be selected at the same time. This patch also introduces two new backends: smbpasswd_nua and tdbsam_nua. These two backends accept 'non unix accounts', where the user does *not* exist in /etc/passwd. These accounts' don't have UIDs in the unix sense, but to avoid conflicts in the algroitmic mapping of RIDs, they use the values specified in the 'non unix account range' paramter - in the same way as the winbind ranges are specifed. While I was at it, I cleaned up some of the code in pdb_tdb (code copied directly from smbpasswd and not really considered properly). Most of this was to do with % macro expansion on stored data. It isn't easy to get the macros into the tdb, and the first password change will 'expand' them. tdbsam needs to use a similar system to pdb_ldap in this regard. This patch only makes minor adjustments to pdb_nisplus and pdb_ldap, becouse I don't have the test facilities for these. I plan to incoroprate at least pdb_ldap into this scheme after consultation with Jerry. Each (converted) passdb module now no longer has any 'static' variables, and only exports 1 init function outside its .c file. The non-unix-account support in this patch has been proven! It is now possible to join a win2k machine to a Samba PDC without an account in /etc/passwd! Other changes: Minor interface adjustments: pdb_delete_sam_account() now takes a SAM_ACCOUNT, not a char*. pdb_update_sam_account() no longer takes the 'override' argument that was being ignored so often (every other passdb backend). Extra checks have been added in some places. Minor code changes: smbpasswd no longer attempts to initialise the passdb at startup, this is now done on first use. pdbedit has lost some of its 'machine account' logic, as this behaviour is now controlled by the passdb subsystem directly. The samr subsystem no longer calls 'local password change', but does the pdb interactions directly. This allow the ACB_ flags specifed to be transferred direct to the backend, without interference. Doco: I've updated the doco to reflect some of the changes, and removed some paramters no longer applicable to HEAD.
* removed stuff I wasn't usingGerald Carter2002-01-021-49/+0
|
* rpcclient merge from 2.2 (including Jeremy's non-void return fix)Gerald Carter2001-04-281-1/+1
|
* forgot one thingGerald Carter2001-04-121-0/+4
|
* still working on itGerald Carter2001-04-121-6/+13
|
* looking towards abstracting the passdb and uidmapping interfaces.Gerald Carter2001-04-091-0/+66
This is more of a note to myself. In not used anywhere yet.