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

43 Commits

Author SHA1 Message Date
Tim Potter
8d376d56c7 r9357: Remove DBGC_CLASS cruft copied over from Samba 3. I would like to
replace this with something funkier.
2007-10-10 13:33:27 -05:00
Andrew Bartlett
c19d5706f4 r7827: Add in-memory keytab to Samba4, using the new MEMORY_WILDCARD keytab
support in Heimdal.

This removes the 'ext_keytab' step from my Samba4/WinXP client howto.

In doing this work, I realised that the replay cache in Heimdal is
currently a no-op, so I have removed the calls to it, and therefore
the mutex calls from passdb/secrets.c.

This patch also includes a replacement 'magic' mechanism detection,
that does not issue extra error messages from deep inside the GSSAPI
code.

Andrew Bartlett
2007-10-10 13:18:41 -05:00
Jelmer Vernooij
46509eb899 r6795: Make some functions static and remove some unused ones. 2007-10-10 13:16:44 -05:00
Andrew Bartlett
550f17f992 r6573: Start on my project to implement an NT4 compatible BDC in Samba4.
This brings in a compatability layer for Samba3 in Samba4 - where we
will start to define file formats and similar details.

The 'net samdump' command uses 'password server = ' for now, and
performs a similar task to Samba3's 'net rpc samsync'.

Andrew Bartlett
2007-10-10 13:16:27 -05:00
Tim Potter
35354456b2 r5781: Fix build. 2007-10-10 13:11:03 -05:00
Simo Sorce
d58be9e74b r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
2007-10-10 13:10:55 -05:00
Andrew Tridgell
826baec7b3 r5307: removed db_wrap.h from includes.h 2007-10-10 13:09:40 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
6f79432fe6 r5296: - only include the tdb headers where they are needed
- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
2007-10-10 13:09:38 -05:00
Andrew Tridgell
cf6a46c3cb r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy
from the time when smbd was only handling SMB connection. The new code
gets rid of all of the smb_server specific code in smbd/, and creates
a much simpler infrastructures for new server code.

Major changes include:

 - simplified the process model code a lot.

 - got rid of the top level server and service structures
   completely. The top level context is now the event_context. This
   got rid of service.h and server.h completely (they were the most
   confusing parts of the old code)

 - added service_stream.[ch] for the helper functions that are
   specific to stream type services (services that handle streams, and
   use a logically separate process per connection)

 - got rid of the builtin idle_handler code in the service logic, as
   none of the servers were using it, and it can easily be handled by
   a server in future by adding its own timed_event to the event
   context.

 - fixed some major memory leaks in the rpc server code.

 - added registration of servers, rather than hard coding our list of
   possible servers. This allows for servers as modules in the future.

 - temporarily disabled the winbind code until I add the helper
   functions for that type of server

 - added error checking on service startup. If a configured server
   fails to startup then smbd doesn't startup.

 - cleaned up the command line handling in smbd, removing unused options
2007-10-10 13:09:22 -05:00
Andrew Bartlett
ded3303352 r4682: A LDB-based secrets implementation in Samba4.
This uses LDB (a local secrets.ldb and the global samdb) to fill out
the secrets from an LSA perspective.

Some small changes to come, but the bulk of the work is now done.

A re-provision is required after this change.

Andrew Bartlett
2007-10-10 13:08:42 -05:00
Andrew Bartlett
278bf1a61a r4355: More work from the elves on Christmas eve:
- Update Samba4's kerberos code to match the 'salting' changes in
   Samba3 (and many other cleanups by jra).

 - Move GENSEC into the modern era of talloc destructors.  This avoids
   many of the memory leaks in this code, as we now can't somehow
   'forget' to call the end routine.
  - This required fixing some of the talloc hierarchies.

 - The new krb5 seems more sensitive to getting the service name
   right, so start actually setting the service name on the krb5 context.

Andrew Bartlett
2007-10-10 13:07:37 -05:00
Stefan Metzmacher
234166606d r3971: fix compiler warnings
metze
2007-10-10 13:06:09 -05:00
Andrew Tridgell
3f75117db9 r3462: separate out the crypto includes 2007-10-10 13:05:16 -05:00
Andrew Bartlett
415ba95927 r3359: Add magic auto-initialisation hooks here, to match the rest of
secrets.  (Which will, I am assured, go away).

Andrew Bartlett
2007-10-10 13:05:01 -05:00
Andrew Tridgell
11713da2ef r3181: shutdown the secrets db on exit so we don't constantly get talloc leak warnings 2007-10-10 13:04:37 -05:00
Andrew Tridgell
283e38aeb2 r3014: got rid of the old intra-smbd messaging system in preparation for the new one 2007-10-10 12:59:57 -05:00
Andrew Tridgell
04e1171996 r3005: added talloc wrappers around tdb_open() and ldb_connect(), so that the
caller doesn't have to worry about the constraint of only opening a
database a single time in a process. These wrappers will ensure that
only a single open is done, and will auto-close when the last instance
is gone.

When you are finished with a database pointer, use talloc_free() to
close it.

note that this code does not take account of the threads process
model, and does not yet take account of symlinks or hard links to tdb
files.
2007-10-10 12:59:56 -05:00
Andrew Bartlett
b97d3cb2ef r1498: (merge from 3.0)
Rework our random number generation system.

On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

This also requires that we start the secrets subsystem, as that is
where the reseed value is stored, for systems without /dev/urandom.

In order to aviod identical streams in forked children, the random
state is re-initialised after the fork(), at the same point were we do
that to the tdbs.

Andrew Bartlett
2007-10-10 12:57:35 -05:00
Andrew Bartlett
58da78a746 r1198: Merge the Samba 3.0 ntlm_auth, including the kerberos and SPENGO parts.
I have moved the SPNEGO and Kerberos code into libcli/auth, and intend
to refactor them into the same format as NTLMSSP.

Andrew Bartlett
2007-10-10 12:56:44 -05:00
Stefan Metzmacher
18062d2ed9 r960: convert 'unsigned int' to uint_t in the most places
metze
2007-10-10 12:56:23 -05:00
Andrew Tridgell
e306e27cf3 r826: removed a pile of old code, in preparation for a new ACL handling system. I'd like to get rid of DOM_SID completely soon 2007-10-10 12:53:53 -05:00
Andrew Bartlett
2aa0b55fb8 r685: The SAM is dead! Long live the new SAM! ;-)
This commit kills passdb, which was only hosting the auth subsystem.

With the work tridge has done on Samba4's SAM backend, this can (and
now is) all hosted on ldb.  The auth_sam.c file now references this
backend.

You will need to assign your users passwords in ldb - adding a new line:

unicodePwd: myPass

to a record, using ldbedit, should be sufficient.  Naturally, this
assumes you have had your personal SAMR provisioning tutorial from
tridge.  Everybody else can still use the anonymous logins.

Andrew Bartlett
2007-10-10 12:53:42 -05:00
Stefan Metzmacher
c78a2ddb28 r665: merge over the new build system from my tmp branch
to the main SAMBA_4_0 tree.

NOTE: that it's not completely ready, but it's functional:-)

metze
2007-10-10 12:53:36 -05:00
Andrew Tridgell
bb74a94e26 r506: got rid of unused function secrets_get_trusted_domains() 2007-10-10 12:51:46 -05:00
Gerald Carter
11717ae912 r42: importing .cvsignore files 2007-10-10 12:50:40 -05:00
Stefan Metzmacher
db0b222202 remove pdb_nisplus, its also removed in samba3, because it was broken
metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
09839de27c as I renamed the PDB subsystem to PASSDB, we need to rename
the static init functions of the modules too:-)

metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
1516f79749 the subsystem name is 'PASSDB' so name the modules 'passdb_XXX'
metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
3d50b327ce fix pdb_ldap build if LDAP support was detected
metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
af89a78123 - port AUTH and PASSDB subsystems to new
SMB_SUBSYSTEM() scheme

- some const fixes in ntvfs

metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
956d212c83 - move all SMB server stuff to smb_server/*
and create the SMB server subsystem

- remove unused XML and MYSQL configure tests

metze
0001-01-01 00:00:00 +00:00
Andrew Tridgell
bb1af644a5 a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.

In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.

I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.

The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
46e0a35819 * the RPC-ECHO pipe now works in smbd, as long as the data sizes
don't cause fragmented pdus (I'll add fragments shortly)

 * change data_blob_talloc() to not zero memory when the 2nd argument
   is NULL. The zeroing just masks bugs, and can't even allow a DOS
   attack

 * modified pidl to ensure that [ref] arguments to the out side of
   functions are allocated when parsing the in side. This allows rpc
   backends to assume that [ref] variables are all setup. Doesn't work
   correctly for [ref] arrays yet

 * changed DLIST_ADD_END() to take the type instead of a tmp
   variable. This means you don't need to declare a silly tmp variable in
   the caller
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f3eaf270e5 * removed some unused code
* updated tdb to latest version from Samba3

 * removed some extraneous ';' in tdbutil.c (Thanks to Erlend Aasland
   for pointing this out)
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
369a9c1ac1 Initial step at cleaning and splitting up configure.in. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
3dd978b12b * netr_ServerPasswordSet() now works - the test suite changes the
machine account password.

  * neater handling on value() options in IDL. The auto-print code
    will now display the right value so you don't need to initialise
    it in your C code
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2955ce55ee got rid of more group mapping code 0001-01-01 00:00:00 +00:00
Andrew Tridgell
9b02b486ef * got rid of UNISTR2 and everything that depends on it
* removed a bunch of code that needs to be rewritten using the new
    interfaces
0001-01-01 00:00:00 +00:00
Andrew Tridgell
1c2b8a93c5 fixed some warnings 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
7512b9ab1a CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: 	Makefile.in configure.in include/includes.h include/ntvfs.h
CVS: 	include/smb.h lib/iconv.c lib/module.c ntvfs/ntvfs_base.c
CVS: 	ntvfs/cifs/vfs_cifs.c ntvfs/ipc/vfs_ipc.c
CVS: 	ntvfs/posix/vfs_posix.c ntvfs/print/vfs_print.c
CVS: 	ntvfs/reference/vfs_ref.c ntvfs/simple/vfs_simple.c
CVS: 	passdb/pdb_interface.c
CVS: Added Files:
CVS: 	include/module.h
CVS: ----------------------------------------------------------------------
Update to the modules system. Fixed:
 - get rid of smb_probe_module
 - merge older updates from 3.0
 - introduced register_subsystem() and register_backend() functions
 - adapt ntvfs and charset to use new register functions
 - made smb_load_modules() work recursively (e.g. 'preload modules = /usr/lib/samba')
 - got rid of some old remains

Things that still need work:
 - Did I break tankFS? I don't think so, but I can't test it here :-(
 - Add 'postload modules = ' (for modules that need to be loaded after fork() in smbd, if applicable)
 - Convert RPC, auth, passdb, etc to use new register_{subsystem,backend}() functions
 - Accept wildcards in 'preload modules' option, instead of loading recursively
0001-01-01 00:00:00 +00:00
Andrew Tridgell
04eb12b56c reduced the number of magic types we need in mkproto.pl
In general I prefer "struct foo" to just "foo" for most
structures. There are exceptions.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b0510b5428 first public release of samba4 code 0001-01-01 00:00:00 +00:00