1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

4077 Commits

Author SHA1 Message Date
Rafal Szczesniak
01cbed98b3 r6164: More comments in the code.
rafal
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
f4d550c348 r6159: Move some more general ndr stuff (alignment calculations) to ndr.pm 2007-10-10 13:11:22 -05:00
Andrew Tridgell
61e1eea0fd r6150: fixed a few socket_wrapper bugs.
- now works properly with UDP, so the NBT tests work
  - fixed byte order in a few places
  - connect() now fails to non-localhost
  - fixed some places that tested for < 0, which should be == -1 (most syscalls
    return -1 on error, not "negative")
2007-10-10 13:11:22 -05:00
Tim Potter
87f88aacee r6148: Add a showflags target to display the various compiler flags a la
showlayout.  There seems to be a bunch of -D and -I stuff in LD_FLAGS
which I don't think should be there.
2007-10-10 13:11:22 -05:00
Andrew Tridgell
568b9175f3 r6147: The maxfd was being recalculated on every event loop, which made us
less scalable. It only needs to be recalculated when we the highest fd
is destroyed.
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
88d93b9782 r6144: Apparently there are more systems that have AF_UNIX then
AF_LOCAL (we already use AF_UNIX in other places).
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
fac5edd2b7 r6143: Put compression support in the subcontext handling functions rather
then at the element level.
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
443fb7853b r6140: - Add configure option for enabling the socket-wrapper library, so it
can be enabled on the buildfarm without requiring --enable-developer
- Support tcp and udp being used on the same port
- FIx some portability issues (should fix the build on
							   some hosts on the buildfarm)
- Ignore setting TCP_NODELAY on (semi-)TCP sockets rather then complain about
  it not being supported (saves us from a couple of error messages for each
						  connection that is opened)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
a2ef9225f1 r6139: Move socket_wrapper to a seperate directory 2007-10-10 13:11:21 -05:00
Stefan Metzmacher
75e427dca9 r6135: - make use of the new dom_sid28 type
(this fixes parsing of w2k blob, which some times have random gargabe data in the sid buffer)

- make the names of the DsReplicaCoursor*Ctr* 's more consistent
  and fix DsGetNCchangesCtr6 parsing

metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
460d1b089e r6134: add a new type dom_sid28 which is a 28 byte fixed buffer with a dom_sid in it
metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
2791de069a r6132: allow up to 15 sub_auth in a dom_sid
(tridge: asked me for that commit)

metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
2d121c8431 r6131: decompression of DsGetNCChanges level 2 responses works now
(and the push side isn't used currently...)

metze
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
ad7ea50eb2 r6130: More work on the NDR tree generator 2007-10-10 13:11:20 -05:00
Stefan Metzmacher
5e8558c5b4 r6129: - add our own MSZIP decompression implementation
(taken from cabextract.c from KDE)
  this code maybe need to be rewritten and the
  compression side needs to be done,
  but for now it seems to works

- remove the dependency to zlib

metze
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
8059315034 r6128: fix the build
metze
2007-10-10 13:11:20 -05:00
Richard Sharpe
9b4069e845 r6118: Make it so that we can do --with-zlib=no in configure and also a couple
of small typos.
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
bbc0f6c552 r6115: don't try to decompress level 7 buffers yet
metze
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
4b88ff2971 r6114: the marker is const and is 0x434B 'CK'
metze
2007-10-10 13:11:20 -05:00
Andrew Bartlett
e074d63f3d r6113: Move GENSEC and the kerberos code out of libcli/auth, and into
auth/gensec and auth/kerberos.

This also pulls the kerberos configure code out of libads (which is
otherwise dead), and into auth/kerberos/kerberos.m4

Andrew Bartlett
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
0d44d07797 r6112: try to decompress all chunks and put them together
it produces the correct DATA_BLOB length, but only the first chunk is
successfull decompressed...

metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
a3cec189e1 r6109: nicer way to handle compression in the torture test
metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
55963934db r6101: only allow properties we know about, that helps to catch typos!
what does length_of() and id() do?

metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
87d48b2076 r6100: - fix nondiscriminant -> nodiscriminant (that takes me 2 days to find...:-( )
- use a DATA_BLOB for the driver specific data in the devmode

metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
ff32e2182e r6099: use the enum print function
metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
f3c64120a1 r6098: fix parsing of empty union cases
metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
2a7eead1c8 r6097: allow compression only on subcontexts
metze
2007-10-10 13:11:19 -05:00
Andrew Bartlett
ed5755d9d1 r6094: Work on the Kerberos code recently merged from Samba 3.0. This fixes
up issues I introduced during the merge, that caused a segfault.

I've still not got the keytab code to work for me (using Samba3 to
generate the keytab) so this is still not fully tested, but it's
better than it was.

To add debugging, I now use the krb5_get_error_message() function from
Heimdal when present, to return the custom error string, which
contains far, far more information than the simple error code does.

(This last point may well be worth merging back into 3.0)

Andrew Bartlett
2007-10-10 13:11:18 -05:00
Jeremy Allison
857e98e8ea r6093: Patch to fix sys_select so it can't drop signals if another fd
is ready to read. Patch from Mark Weaver <mark-clist@npsl.co.uk>.
Jeremy.
2007-10-10 13:11:18 -05:00
Jelmer Vernooij
f8a63a843c r6088: Add the socket_wrapper library. This is a very simple library that
redirects traffic (currently just IP traffic) over unix domain sockets
if the SOCKET_WRAPPER_DIR environment variable has been set.
Aim is to use this for the Samba4 torture suite on the buildfarm.

The socket_wrapper library can only be used if Samba was compiled with
--enable-developer.

test_rpc.sh passes against a local smbd with SOCKET_WRAPPER_DIR set.
(and ethereal showed no traffic whatsoever)

Stuff that still needs to be fixed in socketwrapper:
 - Give ENETUNREACH if target is not localhost
 - A given port number can only be used for UDP /or/ TCP, not both.
 - Perhaps allow some calls to circumvent socketwrapper (do we need DNS?)
2007-10-10 13:11:18 -05:00
Andrew Tridgell
c4728625c0 r6087: - remove the dlopen code for now (before it goes back, it needs to be
made into something that isn't a maze of #ifdefs)

- when a module is not found, make it a non-fatal error. Otherwise the standalone ldb
  tools just bail out. The previous code meant that if you had a
  module listed and it wasn't present then you could _never_ fix it,
  as you coudln't open the ldb to remove that module from @MODULES !
2007-10-10 13:11:18 -05:00
Andrew Tridgell
a6e492f95c r6086: default to stderr for error messages in ldb, so we get errors in ldb_connect() 2007-10-10 13:11:18 -05:00
Simo Sorce
55117f1ab9 r6085: dc is case insensitive 2007-10-10 13:11:18 -05:00
Simo Sorce
fb9afcaf53 r6084: - Introduce the samldb module dependency on samba4
- This module will take care of properly filling an user or group object
  with required fields. You just need to provide the dn and the objectclass
  and a user/group get created

  Simo.
2007-10-10 13:11:18 -05:00
Andrew Bartlett
258c04e367 r6079: Add inline documentation on the credentials context API.
Andrew Bartlett
2007-10-10 13:11:17 -05:00
Andrew Bartlett
6439de9ec8 r6078: Correctly fix the failures for NT1 (not SPNEGO) session setups in the
client.  The issue was actually a cut-and-paste bug, I was filling in
the .old not the .nt1 part of the union.

I've also removed the 'error checks' - I'll shortly document the API
for the credentials code to clarify that it will always return a
pointer here, except in cases of programmer error.

Tridge:  I hope this is OK.

Andrew Bartlett
2007-10-10 13:11:17 -05:00
Andrew Tridgell
40b8ee186a r6075: added talloc_enable_null_tracking() (asked for by lifeless) 2007-10-10 13:11:17 -05:00
Andrew Tridgell
ff6663aac8 r6074: fixed non-spnego connections for new credentials code 2007-10-10 13:11:17 -05:00
Jelmer Vernooij
7fe77cd659 r6070: Fix typo's and fallback to "" as default user name if no
other username could be guessed.
2007-10-10 13:11:17 -05:00
Stefan Metzmacher
fca4dc4827 r6065: revert test value
metze
2007-10-10 13:11:16 -05:00
Stefan Metzmacher
335adef370 r6061: add start of compression support in our rpc code
this is not complete cuurently...

but I want other people to test it and help me on finishing it.
(try to change the #if 0 in torture/rpc/drsuapi.c into #if 1)

metze
2007-10-10 13:11:16 -05:00
Jelmer Vernooij
6c3b1ec329 r6045: Couple of small GTK+ fixes
Use uint32_t and uint16_t rather then DWORD and WORD in
the NT4 backend. Add some more unknown fields..
2007-10-10 13:11:16 -05:00
Andrew Bartlett
48c5187967 r6033: Patch from 'lifeless' to clarify behaviour with NULL pointers.
Andrew Bartlett
2007-10-10 13:11:16 -05:00
Andrew Bartlett
c324d97413 r6032: Fix up SetServerPassword2 on NETLOGON for [bigendian]. Clearly nobody
has the patience to run test_w2k3.sh to completion :-)

It looks to me that the Windows server runs the RC4 over the C struct,
not the NDR data.

Andrew Bartlett
2007-10-10 13:11:16 -05:00
Andrew Tridgell
54c0284679 r6031: don't try to send errors when the socket has been destroyed 2007-10-10 13:11:16 -05:00
Andrew Bartlett
1e0e66d720 r6030: Missing from previous commit, a small header file to link
libcli/auth/schannel.c and libcli/auth/schannel_sign.c

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
2301a4b38a r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
b5260cf0d4 r6027: Add copyright, and add a useful debug message.
Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
ef7f9a01b4 r6026: Update the kerberos keytab code to match Samba3 again.
(untested at this point).

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
13d09c8e9a r6025: Remove unused variables. This code will be modified again for the new
cli_credentials code shortly.

Andrew Bartlett
2007-10-10 13:11:15 -05:00