1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
samba-mirror/source3/smbd
Andrew Bartlett 1a74d8d1f0 This is another *BIG* change...
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.
(This used to be commit ff354c99c5)
2002-01-20 14:30:58 +00:00
..
.cvsignore add *.po32 to ignore list 2001-12-12 16:04:37 +00:00
blocking.c Don't put a \n on the end of the arg to exit_server() 2001-11-05 00:02:38 +00:00
build_options.c WITH_MSDFS is not define anywhere. It's built by default. 2001-11-22 05:29:04 +00:00
change_trust_pw.c A farily large commit: 2002-01-01 03:10:32 +00:00
chgpasswd.c This is another *BIG* change... 2002-01-20 14:30:58 +00:00
close.c removed unused variable 2001-12-17 11:13:03 +00:00
conn.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 2001-10-02 04:29:50 +00:00
connection.c Removed MAXSTATUS which was set incorrectly - thus causing tdb traversal 2002-01-14 19:34:28 +00:00
dfree.c Added NT_USER_TOKEN into server_info to fix extra groups problem. 2001-11-03 23:34:24 +00:00
dir.c Made "hide unreadable" work much more reliably (just for Volker :-). 2001-12-17 19:16:22 +00:00
dosmode.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 2001-10-02 04:29:50 +00:00
error.c Fixup error mapping so we have only one table containing errno -> dos error -> NT STATUS 2002-01-16 21:27:57 +00:00
fileio.c Ensure identical between 2.2.3 and 3.0 - no need for difference here.. 2002-01-20 01:01:46 +00:00
filename.c Fixed the bug with descending into mangled directories. 2001-12-18 01:26:54 +00:00
files.c Move from timestamp to gen count file id's for finding oplocked files 2001-10-20 21:59:34 +00:00
groupname.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 2001-10-02 04:29:50 +00:00
ipc.c This is the current patch from Luke Leighton <lckl@samba-tng.org> to add a 2002-01-20 02:40:05 +00:00
lanman.c Kill off the old varient of 'check_plaintext_password' (new version just 2002-01-20 09:00:32 +00:00
mangle.c removed unused function 2001-11-24 13:58:40 +00:00
message.c again an intrusive patch: 2001-12-06 13:09:15 +00:00
negprot.c Same fix as went into 2.2 (I'm waiting for jerry to finish some code). 2002-01-11 19:10:25 +00:00
noquotas.c The big character set handling changeover! 2001-07-04 07:15:53 +00:00
notify_hash.c smbd/notify_hash.c: Merged Herb's fix. 2001-10-27 07:17:21 +00:00
notify_kernel.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 2001-10-02 04:29:50 +00:00
notify.c Don't put a \n on the end of the arg to exit_server() 2001-11-05 00:02:38 +00:00
nttrans.c This is the current patch from Luke Leighton <lckl@samba-tng.org> to add a 2002-01-20 02:40:05 +00:00
open.c don't use O_NONBLOCK in open(). This was added erroneously for kernel 2002-01-17 00:25:13 +00:00
oplock_irix.c Move from timestamp to gen count file id's for finding oplocked files 2001-10-20 21:59:34 +00:00
oplock_linux.c Fixed unsigned / long unsigned format missmatch. 2001-11-06 22:07:04 +00:00
oplock.c Don't put a \n on the end of the arg to exit_server() 2001-11-05 00:02:38 +00:00
password.c Kill off another ugly wart from the side of the passdb subsystem. 2002-01-20 13:26:31 +00:00
pipes.c This is the current patch from Luke Leighton <lckl@samba-tng.org> to add a 2002-01-20 02:40:05 +00:00
posix_acls.c fixed a crash in merge_aces() 2002-01-11 11:26:31 +00:00
process.c Report write fail in smb_dump. 2002-01-19 21:29:20 +00:00
quotas.c XFS quota patch for Linux. 2001-11-30 21:50:02 +00:00
reply.c Same fix as went into 2.2 (I'm waiting for jerry to finish some code). 2002-01-11 19:10:25 +00:00
sec_ctx.c Added NT_USER_TOKEN into server_info to fix extra groups problem. 2001-11-03 23:34:24 +00:00
server.c Ensure (C) message is output on startup. 2002-01-18 03:26:53 +00:00
service.c Separate out get_user_home_dir() from get_user_home_service_dir(). 2002-01-16 23:53:10 +00:00
session.c Don't resolve the hostname in smbd as we can pause for a long time while 2001-11-19 04:27:39 +00:00
sesssetup.c A nice *big* change to the fundemental way we do things. 2002-01-17 08:45:58 +00:00
srvstr.c The big character set handling changeover! 2001-07-04 07:15:53 +00:00
ssl.c merge from 2.2 2001-10-11 16:44:17 +00:00
statcache.c fixed a typo 2001-09-25 06:38:07 +00:00
trans2.c Same fix as went into 2.2 (I'm waiting for jerry to finish some code). 2002-01-11 19:10:25 +00:00
uid.c This patch makes the 'winbind use default domain' code interact better with 2002-01-20 01:24:59 +00:00
utmp.c Tidyup utmp code to cope with hostname = NULL. 2001-12-18 08:19:02 +00:00
vfs-wrap.c Getting ready to add UNIX extensions in HEAD also. 2002-01-10 00:28:09 +00:00
vfs.c Attempt to fix bugs in write cache code (yes I know it's going away :-). 2002-01-20 00:04:15 +00:00