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

775 Commits

Author SHA1 Message Date
Andrew Bartlett
6d1ae6d35a r6271: Don't zero the cli_credentials structure - instead allow valgrind to
track the use of un-initialised values.

This change will require a recompile from clean, as the enum
describing the status of each element now has a default of
CRED_UNINITIALISED.

Andrew Bartlett
(This used to be commit 83c2eb806d)
2007-10-10 13:11:29 -05:00
Jeremy Allison
e3775ee850 r6238: Ensure if realloc fails on an internal
tdb we fail gracefully.
Jeremy.
(This used to be commit d69f7c0546)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
567a74690c r6222: fixed the socket wrapper code for getsockname()
(This used to be commit 11e245a3f0)
2007-10-10 13:11:27 -05:00
Andrew Tridgell
4b96d83147 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")
(This used to be commit 61e1eea0fd)
2007-10-10 13:11:22 -05:00
Andrew Tridgell
c363874466 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.
(This used to be commit 568b9175f3)
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
07e3fa2146 r6144: Apparently there are more systems that have AF_UNIX then
AF_LOCAL (we already use AF_UNIX in other places).
(This used to be commit 88d93b9782)
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
848329b9a0 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)
(This used to be commit 443fb7853b)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
44d7f4f238 r6139: Move socket_wrapper to a seperate directory
(This used to be commit a2ef9225f1)
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
0403e2032b 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
(This used to be commit 5e8558c5b4)
2007-10-10 13:11:20 -05:00
Richard Sharpe
da38166904 r6118: Make it so that we can do --with-zlib=no in configure and also a couple
of small typos.
(This used to be commit 9b4069e845)
2007-10-10 13:11:20 -05:00
Jeremy Allison
8c270fcedb 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.
(This used to be commit 857e98e8ea)
2007-10-10 13:11:18 -05:00
Jelmer Vernooij
e91fb065fa 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?)
(This used to be commit f8a63a843c)
2007-10-10 13:11:18 -05:00
Andrew Tridgell
a5ee5aae69 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 !
(This used to be commit c4728625c0)
2007-10-10 13:11:18 -05:00
Andrew Tridgell
be6285adad r6086: default to stderr for error messages in ldb, so we get errors in ldb_connect()
(This used to be commit a6e492f95c)
2007-10-10 13:11:18 -05:00
Andrew Bartlett
6ed40eda29 r6079: Add inline documentation on the credentials context API.
Andrew Bartlett
(This used to be commit 258c04e367)
2007-10-10 13:11:17 -05:00
Andrew Tridgell
0d36266cd4 r6075: added talloc_enable_null_tracking() (asked for by lifeless)
(This used to be commit 40b8ee186a)
2007-10-10 13:11:17 -05:00
Jelmer Vernooij
5ae38fb963 r6070: Fix typo's and fallback to "" as default user name if no
other username could be guessed.
(This used to be commit 7fe77cd659)
2007-10-10 13:11:17 -05:00
Jelmer Vernooij
2fa732c625 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..
(This used to be commit 6c3b1ec329)
2007-10-10 13:11:16 -05:00
Andrew Bartlett
ae1ea5619b r6033: Patch from 'lifeless' to clarify behaviour with NULL pointers.
Andrew Bartlett
(This used to be commit 48c5187967)
2007-10-10 13:11:16 -05:00
Andrew Bartlett
038c4c4c6a r6024: Some of the ordering constraints on the popt callbacks were getting
painful, so don't call lp_*() functions until the post stage (rather
than in the cli_credentails_init(), which is called in the pre stage),
and don't open the secrets.ldb looking for the machine account details
until we actually need them (well after popt is done, and we know we have the other things right).

Set the domain and realm, as well as the account and password for -P
(fetch machine password) operation.

Allow NETLOGON credentials to be stored in this structure - will allow
SCHANNEL to be made more generic.

Clarify why we don't do special checks for NULL pointers, particularly
in the anonymous check (it indicates a programmer error, not a
run-time condition).

Also make lib/credentials.c a little more consistant.

Andrew Bartlett
(This used to be commit 730e6056b7)
2007-10-10 13:11:15 -05:00
Jelmer Vernooij
4a095be541 r5989: Display authentication information (list of available auth protocols
+ principal names per endpoint) to gepdump. Still need to fix memory management
in the GTK+ utilities...
(This used to be commit b48a0af0b0)
2007-10-10 13:11:13 -05:00
Andrew Bartlett
79f6bcd5ae r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
(This used to be commit e13c671619)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
7c55d0ffa5 r5976: SIDs can't have more then 5 subauths (caught by [validate] and
range())
(This used to be commit ec1eaa274b)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
e25cff1c11 r5942: A couple of small changes to fix things up with the new credentials
infrustructure.

Andrew Bartlett
(This used to be commit d51718ab8a)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Andrew Tridgell
da5349dede r5939: improve talloc_realloc() docs after feedback from lifeless
(This used to be commit 301cbb0d12)
2007-10-10 13:11:10 -05:00
Andrew Tridgell
689a803ac7 r5938: - allow NULL string argument to talloc_vasprintf_append()
- default to using va_copy(), thus assuming a modern libc
(This used to be commit 3060b26c9e)
2007-10-10 13:11:10 -05:00
Andrew Tridgell
340d35be2d r5937: - performance improvement to talloc_asprintf_append()
- allow standalone talloc to use gcc printf attributes
(This used to be commit e25aa54e96)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
455be8fb82 r5932: Use cli_credentials somewhat more in the Gtk+ code
Support ncacn_spx in DCE/RPC bindings.
(This used to be commit a0233a3a9a)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
105660d3f9 r5906: Fix the usage of the internal popt (make proto should ignore it)
Updated included popt to 1.7.
(This used to be commit d60cb643e8)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
63b5ad6d54 r5903: While I can't test IPv6, metze asked me to commit a matching change
for unknown hosts that I just did for IPv4.

Andrew Bartlett
(This used to be commit 7e1d82a200)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
3240f01636 r5898: Handle errors in the 'sync' name and IP address handling code.
Andrew Bartlett
(This used to be commit 6b8b40f73b)
2007-10-10 13:11:07 -05:00
Jelmer Vernooij
d4c0da18a7 r5871: Remove file with unused function (that uses fstring)
Remove fstring usage from version.c
(This used to be commit d25163159c)
2007-10-10 13:11:06 -05:00
Tim Potter
ee461300a5 r5781: Fix build.
(This used to be commit 35354456b2)
2007-10-10 13:11:03 -05:00
Tim Potter
03cd26e353 r5780: Remove unused arguments.
(This used to be commit 1ee84e373e)
2007-10-10 13:11:03 -05:00
Tim Potter
639edc4097 r5779: Remove signal and timeout gubbage from tdb.
(This used to be commit dbb56e9a59)
2007-10-10 13:11:03 -05:00
Jelmer Vernooij
e9ca6e48ff r5775: Remove some unused functions (unions are no longer as special as they used to be)
Add oxid mapping table support in DCOM
(This used to be commit e193555f0e)
2007-10-10 13:11:02 -05:00
Tim Potter
f58143b025 r5769: Fix unused variable warning.
(This used to be commit 80dfac3640)
2007-10-10 13:11:02 -05:00
Stefan Metzmacher
bbb69c5a7a r5682: fix the build
metze
(This used to be commit 67a2b09126)
2007-10-10 13:11:00 -05:00
Jelmer Vernooij
3e88cae57b r5680: Don't crash if none of the predefined keys is available (reported by Alexander)
(This used to be commit 0d789872a8)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
d892500e73 r5676: Fix some alignment issues and IRemoteActivation
(This used to be commit a9b13f6701)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
dd2aefd56b r5675: - More DCOM bug fixes
- Keep COM and DCOM more seperated
(This used to be commit f694f484c4)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
77ec3f684d r5674: - Re-enable DCOM support.
- Always put IID in vtables (useful for asserts)
- Add table to keep track of DCOM proxy classes
- Bunch of smaller bug fixes
(This used to be commit 26d5a0b92c)
2007-10-10 13:10:59 -05:00
Simo Sorce
0b4c61a05a r5670: simplify and clarify ldb_modules.c code
rectify the test schema
correct a glitch in schema module
(This used to be commit 0579b5f7ad)
2007-10-10 13:10:58 -05:00
Andrew Tridgell
a52a6f1c42 r5666: winxp will use a NTTIME of -1 to mean "don't change" in setfileinfo
basic_info. Add null_nttime() as the equivalent of the existing
null_time() call for cheecking for valid NTTIME values
(This used to be commit 439ce2efbf)
2007-10-10 13:10:58 -05:00
Andrew Tridgell
2f9e1650f9 r5665: the data within el2->values can still be used at this point, so don't free
(This used to be commit 12d03f9663)
2007-10-10 13:10:57 -05:00