1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

80 Commits

Author SHA1 Message Date
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
Jeremy Allison
09571aa76d We need to test for major/minor macros.
Jeremy.
(This used to be commit ee8c8add7f)
2002-01-10 01:49:09 +00:00
Jeremy Allison
3454945146 Getting ready to add UNIX extensions in HEAD also.
Jeremy
(This used to be commit 6210d4aa19)
2002-01-10 00:28:09 +00:00
Jeremy Allison
3375267106 Added tests for st_blocks in struct stat, and added a (hateful) constant
the specifies the units that st_blocks is in. The reason for this is
that HPUX uses 8k, AIX uses a #defined constant and everyone else (tm)
uses 512 byte units.
Needed for the CIFS UNIX extensions - coming to a Samba server near
you soon.... :-).
Jeremy.
(This used to be commit 38cfffea5f)
2002-01-09 21:30:37 +00:00
Andrew Tridgell
162a6606bd cope with systems that don't have full gssapi libs
(This used to be commit c4d928e55f)
2001-12-31 14:31:13 +00:00
Jeremy Allison
ce1b141ec0 Added HPUX ACL code.
Jeremy.
(This used to be commit 6d03184f8c)
2001-12-15 02:40:16 +00:00
Andrew Tridgell
6464bb0ae5 added the beginnings of ADS support in smbd
(This used to be commit c7f6116919)
2001-11-20 08:54:15 +00:00
Jeremy Allison
50005ee3ad Fix compile on RedHat 7.2 systems with broken system headers.
Jeremy.
(This used to be commit b14ac75666)
2001-11-14 23:00:37 +00:00
Andrew Tridgell
81f56139b6 initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth
(This used to be commit d330575856)
2001-10-11 07:42:52 +00:00
Jeremy Allison
6ddcd8a3bc Fixup passdb stuff to add new nisplus and ldap backends.
Jeremy.
(This used to be commit 611bf806d5)
2001-09-25 20:21:21 +00:00
Motonobu Takahashi
96db4b1ba3 Added SWAT i18n feature:
TO enable configure with --with-i18n-swat
  to support this gettext is integrated
  and a new directories name "po" and "intl" are created.

  now these languages are supported:

  en - English (default)
  ja - Japanese
  po - Polish
  tr - Turkish

  To add your language,
  to create ${your_language}.po by translating source/po/en.po
  into your language is needed.

  some of html and image files of various language version are not
  included yet, though message catalogue files are installed.
  you need to copy files manually under
  ${swatdir}/lang/$ln/{help,images,included,using_samba}


And also added a option to intall manual pages:
of various lang version
  To enable configure with --with-manlangs
  but manual pages themself are not included yet.
(This used to be commit 486b79a6fc)
2001-09-24 15:55:09 +00:00
Jeremy Allison
d76dfbb879 Attempt to make quotas work with RH7.1, and with other Linuxen... This is
*HARD*, dammit !
Jeremy.
(This used to be commit 59a4684201)
2001-09-21 22:06:03 +00:00
Andrew Bartlett
6794b58a8c Add the ability to display Samba's build options with smbd -b and as a level 4
DEBUG().  Also included are details like build date/time, location and
compiler.

This should get most of the options we set, except those that don't affect
smbd, like WITH_PAM_SMBPASSWD or WITH_WINBINDD.

This work due to Vance Lankhaar <vlankhaar@hotmail.com>

Some work needs to be done to make it only rebuild when needed (ie smbd being
rebuilt) but its in pretty good shape already.

Also fix up some printf() -> d_printf().

Andrew Bartlett
(This used to be commit beff1d2bea)
2001-09-19 09:44:12 +00:00
Jeremy Allison
ab35704cc0 Fixed up Solaris 64 bit configure.
Jeremy.
(This used to be commit 36516b2ca9)
2001-09-15 00:29:54 +00:00
Andrew Bartlett
ed8883c5dd Change the description on --with-pam_smbpass to make it clearer - some peope
seem to think you need this module for normal samba/PAM operation.

rerun autoconf
rerun autoheader

(Note that --with-pam_smbpass still doesn't build, but at least when it does
again only people who actually need it will select it).
(This used to be commit bbda3dd742)
2001-09-07 23:56:54 +00:00
Andrew Tridgell
fd6ea43161 the next step in our error code handling change
- added WERROR for win32 error codes
- added a configure test for immediate structures

still lots to do, so its not enabled by default, but the main
structure is there
(This used to be commit 24f9ab683d)
2001-09-03 08:50:59 +00:00
Jeremy Allison
16afd6d2bc Added Mike Davidsons Tru64 ACL patch.
Jeremy.
(This used to be commit 8c5e5f8c84)
2001-08-10 20:48:25 +00:00
Jeremy Allison
ad4144d81d Put HPUX on mmap blacklist.
Jeremy.
(This used to be commit 4d5fe9ed4f)
2001-08-02 20:52:57 +00:00
Jeremy Allison
08138a3244 Fix from Michael Davidson <md@caldera.com> for DEC OSF/1 ACLs (ie.
Digital UNIX).
Jeremy.
(This used to be commit 324ba0512e)
2001-07-26 21:16:39 +00:00
Andrew Tridgell
7879d999ab a better test for unix domain sockets
(This used to be commit 7b3d030e1f)
2001-07-25 03:28:45 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Andrew Tridgell
b95a294a08 fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define
(This used to be commit e2ecff419f)
2001-06-25 02:53:13 +00:00
Jeremy Allison
809c025878 Added patches to remove Linux specific XFS ACLs. These are now handled by the
generic Linux ACL code.
rpc_server/srv_samr_nt.c: Don't delete a policy handle before it's created.
Jeremy.
(This used to be commit db5b82e53a)
2001-06-18 20:27:35 +00:00
Andrew Tridgell
05d0841472 - added AC_HAVE_DECL() macro to aclocal.m4, so we can easily add
tests for a fn or variable being defined in headers
- used this to add prototypes for asprintf and vasprintf on systems
  that don't have them
(This used to be commit ab24652394)
2001-05-30 12:28:13 +00:00
Andrew Tridgell
dfc07f6174 added test for C99 compliant vsnprintf
(This used to be commit 9ebd90904e)
2001-04-27 02:35:42 +00:00
Jeremy Allison
ce4d3cd4fa Re-ran autoheader; autoconf to fix pam_smb build.
Jeremy.
(This used to be commit c6f25e84d3)
2001-04-25 19:03:57 +00:00
Jeremy Allison
8a1c2e0298 AIX ACLs donated by IBM.
Merge Andrew's fnmatch fix for WfW.
Jeremy.
(This used to be commit 1d4438f077)
2001-04-17 05:41:07 +00:00
Jeremy Allison
ed449b8ca7 Added POSIX_ACL support for *BSD. Patch from jedgar@fxp.org. Changed
a bit to use AC_TRY_LINK to ensure functions are available for link
instead of AC_TRY_COMPILE.
Jeremy.
(This used to be commit c236287463)
2001-04-14 19:46:28 +00:00
Jeremy Allison
6578fd8742 To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
(This used to be commit 9b32b8a8cf)
2001-04-11 23:19:08 +00:00
Jeremy Allison
a6d201a8d7 Added XFS ACLs on Linux. Code from John Trostel <jtrostel@connex.com>.
Jeremy.
(This used to be commit 0865366f6b)
2001-04-03 00:40:01 +00:00
Jeremy Allison
f93bb0801c rpc_client/cli_netlogon.c: Fixed incorrect printf.
Added Solaris ACL support.
Jeremy.
(This used to be commit f0d11b6997)
2001-02-25 00:24:54 +00:00
Jeremy Allison
cffc311b8a Fixed typo with acl_set_fd() not needing an ACL_TYPE_T parameter.
Ensure HAVE_NO_ACLS is set in configure if ACL support not selected.
Jeremy
(This used to be commit 523c919356)
2001-01-11 23:41:33 +00:00
Jeremy Allison
423227d7ca Working code to read POSIX ACLs on a Linux system using the bestbits
ACL patch from http://acl.bestbits.at/.
configure support needs more work (just assumes correct headers at
the moment). ACL writing needs adding.
Jeremy.
(This used to be commit 6ae63e502e)
2000-12-07 05:38:01 +00:00
Jeremy Allison
7e4c4721b4 Changed to sourceforge tdb code. This includes spinlocks (so we now have
a --with-spinlocks option to configure, this does mean the on-disk tdb
format has changed, so 2.2alphaX sites will need to re-create their
tdb's. The upside is no more tdb fragmentation and a +5% on netbench.
Swings and roundabouts....
Jeremy.
(This used to be commit 9dea7b7c25)
2000-12-06 00:05:15 +00:00
Gerald Carter
01e0d3879e TDB password backend support written by Simo Sorce <simo.sorce@polimi.it>
Marked as an experimental compile time option (defaults to off) for now.





jerry
(This used to be commit 0435af4417)
2000-10-26 03:31:41 +00:00
Jeremy Allison
d199eebcf7 Fixes from David Lee for utmp handling.
Jeremy.
(This used to be commit 70cecfefc8)
2000-10-21 01:47:25 +00:00
Jeremy Allison
f601ecdda2 Fix for yp_get_default_domain from Neil Hoggarth <neil.hoggarth@physiol.ox.ac.uk>
Jeremy.
(This used to be commit 44ed8abb2a)
2000-10-07 00:26:04 +00:00
Andrew Tridgell
f94f053b76 added support for kernel level share modes. These are a (small) hack,
I suspect we will either get rid of them or do them properly at some
stage.
(This used to be commit fabe1f350e)
2000-06-15 09:35:37 +00:00
Andrew Tridgell
1896c721fb fixed autoconf test for kernel change notify support
(This used to be commit 92d0382c9e)
2000-06-14 07:10:15 +00:00
Andrew Tridgell
bda48b3824 - changed HAVE_KERNEL_OPLOCKS to HAVE_KERNEL_OPLOCKS_IRIX
- added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX
(This used to be commit 0368f68529)
2000-06-08 07:40:55 +00:00
Tim Potter
3808642beb Fixed last remaining instance of MS_DFS to WITH_MSDFS.
(This used to be commit d4e2e59566)
2000-05-26 18:44:40 +00:00
Andrew Tridgell
d99bec7170 got rid of some more old configure tests and includes
(This used to be commit f137648504)
2000-04-17 06:11:08 +00:00
Andrew Tridgell
98825661dd removed some obsolete configure tests (sysv ipc etc)
(This used to be commit e8905a557a)
2000-04-17 05:56:49 +00:00
Jeremy Allison
332013e09e Added check for LL suffix to long long ints needed by AIX 4.3.x compiler
to allow successful build.
Jeremy.
(This used to be commit 567713a07c)
2000-03-29 23:03:48 +00:00
Jeremy Allison
8f1620125d acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
(This used to be commit f02999dbf7)
2000-03-22 19:03:12 +00:00
Shirish Kalele
952799d9af dded Microsoft Dfs services.
* added a new msdfs/ directory under source/
* added msdfs sources under this directory.
* modified configure setup to add a --with-msdfs configure time option

 Modified Files:
 	Makefile.in acconfig.h configure configure.in
 	include/config.h.in include/includes.h include/proto.h
 	include/smb.h include/smb_macros.h param/loadparm.c
 	smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c
 	smbd/server.c smbd/trans2.c
 Added Files:
 	include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c
 	msdfs/parse_dfs_map.c
 ----------------------------------------------------------------------
(This used to be commit 4684b4a188)
2000-03-08 22:14:30 +00:00
Jeremy Allison
3cf31a194f Added replacement functions sys_popen and sys_pclose. These are based
on the glibc source code and are safer than the traditional popen as
they don't use a shell to exec the requested command. Now we have
these functions they can be tightened up (environment etc.) as required
to make a safe popen. It should now be safe to add the environement
variable loading code to loadparm.c
Jeremy.
(This used to be commit b52e92b09d)
2000-02-15 19:36:47 +00:00
Jeremy Allison
868c81eefa Added check for SGI IRIX brokenness with semaphores when using gcc.
Code from Don Badrak <dbadrak@census.gov>
Jeremy.
(This used to be commit 773d6e504b)
2000-02-07 14:27:04 +00:00
Jeremy Allison
1e2f92af55 Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
(This used to be commit 95d37a1d25)
2000-01-12 03:09:17 +00:00
Jeremy Allison
211697ee6c Converted most of the functions in lib/util_str.c to smb_ucs2_t equivalents.
Jeremy.
(This used to be commit 1ba42aca21)
1999-12-29 02:00:38 +00:00