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

136 Commits

Author SHA1 Message Date
Tim Potter
e6b53ce177 r6930: Use NBT_NAME_CLIENT instead of the number 0. 2007-10-10 13:16:57 -05:00
Jelmer Vernooij
b9d0ae93ba r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
2007-10-10 13:16:50 -05:00
Jelmer Vernooij
46509eb899 r6795: Make some functions static and remove some unused ones. 2007-10-10 13:16:44 -05:00
Stefan Metzmacher
a1c7fe2578 r6612: fix the build
metze
2007-10-10 13:16:30 -05:00
Stefan Metzmacher
55c9746da8 r6609: remove double entry for [BINARY::getntacl]
metze
2007-10-10 13:16:30 -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
b32c159c38 r6527: Resurrect getntacl utility program. At the moment we only display the
output of ndr_print_xattr_NTACL() to stdout.
2007-10-10 13:16:22 -05:00
Andrew Tridgell
f8e77fcdea r6287: sorted out a small but surprisingly tricky dependency problem with the
ndr code for handling sids and security descriptors now that we have a
sid in the nbt IDL
2007-10-10 13:11:29 -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
Jelmer Vernooij
e5bc6f4f17 r5924: Use cli_credentials in libnet/. 2007-10-10 13:11:08 -05:00
Jelmer Vernooij
1d49b57c50 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 :-)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
824289dcc2 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.
2007-10-10 13:11:07 -05:00
Tim Potter
d59bc9dc9b r5827: Make ndrdump accept a uuid as well as a pipe name to specify
which rpc interface to use.
2007-10-10 13:11:04 -05:00
Tim Potter
c3c6dafc31 r5782: Use standard input for reading packet data if filename not specified. 2007-10-10 13:11:03 -05:00
Rafal Szczesniak
eb66180d14 r5425: Convert function tables to new structure (with description)
and remove unnecessary help functions as help is generated
automatically. Usage functions with precise information about
usage of each leaf node remain.

rafal
2007-10-10 13:10:44 -05:00
Rafal Szczesniak
24f7a3860e r5424: Automatically generate basic help display on basis of name
and description from function table.

rafal
2007-10-10 13:10:44 -05:00
Rafal Szczesniak
48568959a8 r5423: Change function table structure to allow short description
of command groups. Also give up help function pointer in the
structure since it's needed only in leaf nodes of command tree,
and leaf nodes decide about help on their own. Usage function
is still available on all levels.

rafal
2007-10-10 13:10:44 -05:00
Andrew Tridgell
6f9eb74ef8 r5413: enable standard samba command line options in ndrdump (so -d works) 2007-10-10 13:10:43 -05:00
Andrew Tridgell
9536936992 r5412: don't force initial debug level up in ndrdump 2007-10-10 13:10:43 -05:00
Rafal Szczesniak
5cebb4feed r5400: Slightly better handling of help messages in net tool.
rafal
2007-10-10 13:10:41 -05:00
Rafal Szczesniak
3005f0408c r5381: Added net_user.c with net tool interface for managing user accounts.
rafal
2007-10-10 13:09:49 -05:00
Rafal Szczesniak
d8fa9baf24 r5380: Removed extra newline.
rafal
2007-10-10 13:09:49 -05:00
Andrew Tridgell
80a95d5688 r5328: - allow case sensitive nbt name lookups
- added --case-sensitive option to nmblookup

 - added case sensitivity tests to the NBT-WINS test
2007-10-10 13:09:42 -05:00
Andrew Tridgell
bf43c9bdcf r5308: trimmed back a lot of the old macros from smb_macros.h 2007-10-10 13:09:40 -05:00
Andrew Tridgell
b902ea546d r5304: removed lib/socket/socket.h from includes.h 2007-10-10 13:09:39 -05:00
Andrew Tridgell
93931b1a74 r5300: more uint32 and system/filesys.h build fixes when developer mode is enabled 2007-10-10 13:09:39 -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
bb1ab11d8e r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
2007-10-10 13:09:37 -05:00
Andrew Tridgell
554d1b70e7 r5261: translate nbt rcode errors to NTSTATUS codes 2007-10-10 13:09:35 -05:00
Andrew Tridgell
919bc14e7b r5260: - show an error message on nmblookup failure
- always try to enable broadcast on nbt name sockets (this matches
  samba3 behaviour better)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
d56e68ebf5 r5252: - fixed nmblookup for the nbt api changes
- added a simple WINS server name registration and query test
2007-10-10 13:09:34 -05:00
Andrew Tridgell
d7d31fdc66 r5114: the nbtd task can now act as a basic B-node server. It registers its
names on the network and answers name queries. Lots of details are
still missing, but at least this now means you don't need a Samba3
nmbd to use Samba4.

missing pieces include:

 - name registrations should be "shout 3 times, then demand"

 - no WINS server yet

 - no master browser code
2007-10-10 13:09:23 -05:00
Andrew Tridgell
9587cbcb9e r5054: added a nmblookup tool, based on the new nbt library 2007-10-10 13:09:18 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Tridgell
854f7f376d r5004: add current samba3 nmblookup.c ready for updating to new nbt lib 2007-10-10 13:09:12 -05:00
Andrew Tridgell
b781a54244 r5003: delete old nmblookup.c code 2007-10-10 13:09:12 -05:00
Andrew Tridgell
c5c65ad8fb r4889: make sure ndr print flags are initialised in ndrdump 2007-10-10 13:09:03 -05:00
Andrew Tridgell
1ea59d1146 r4794: - disabled the ntacl command line utilities until they are rewritten to use the same
acl format as we use in pvfs (and hopefully use common code too)

- removed a lot of old cruft from our autoconf tests. This may well break some builds,
  but then we can fix them properly instead of the "if solaris version 5.1.2" crap

This was prompted by someone sending me solaris 10 patches that
patched the configure script with if statements for several more
versions of solaris to check for and do special stuff. That is just
silly.
2007-10-10 13:08:56 -05:00
Andrew Bartlett
54a231780e r4762: Store the results of a 'net join' in the LDB.
Like Samba3, the storage of the primary domain password is keyed off
the domain name, so we can join multiple domains, and just swap
'workgroup =' around.

Andrew Bartlett
2007-10-10 13:08:51 -05:00
Andrew Bartlett
a9b9606091 r4722: Start to add 'net join' to Samba4.
Andrew Bartlett
2007-10-10 13:08:48 -05:00
Stefan Metzmacher
3c0d16b823 r4620: - add interface functions to the auth subsystem so that callers doesn't need to
use function pointers anymore
- make the module init much easier
- a lot of cleanups

don't try to read the diff in auth/ better read the new files

it passes test_echo.sh and test_rpc.sh

abartlet: please fix spelling fixes

metze
2007-10-10 13:08:34 -05:00
Andrew Tridgell
4004c69937 r4616: the first phase in the addition of proper support for
dcerpc_alter_context and multiple context_ids in the dcerpc client
library.

This stage does the following:

 - split "struct dcerpc_pipe" into two parts, the main part being "struct dcerpc_connection", which
   contains all the parts not dependent on the context, and "struct dcerpc_pipe" which has
   the context dependent part. This is similar to the layering in libcli_*() for SMB

 - disable the current dcerpc_alter code. I've used a #warning until i
   get the 2nd phase finished. I don't know how portable #warning is, but
   it won't be long before I add full alter context support anyway, so it won't last long

 - cleanup the allocation of dcerpc_pipe structures. The previous code
   was quite awkward.
2007-10-10 13:08:34 -05:00
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Stefan Metzmacher
c981808ed4 r4419: move security_token stuff to the libcli/security/
and debug privileges

metze
2007-10-10 13:07:47 -05:00
Andrew Bartlett
1933cd12fb r4358: At metze's request, the Christmas elves have removed gensec_end in
favor of talloc_free().

Andrew Bartlett
2007-10-10 13:07:37 -05:00
Tim Potter
d8b1ba93a8 r4341: Fix const warning. 2007-10-10 13:07:36 -05:00
Tim Potter
1d96717843 r4201: Remove duplicate const. 2007-10-10 13:07:26 -05:00
Andrew Tridgell
7b446af09b r4147: converted from NT_USER_TOKEN to struct security_token
this is mostly just a tidyup, but also adds the privilege_mask, which
I will be using shortly in ACL checking.

note that I had to move the definition of struct security_token out of
security.idl as pidl doesn't yet handle arrays of pointers, and the
usual workaround (to use a intermediate structure) would make things
too cumbersome for this structure, especially given we never encode it
to NDR.
2007-10-10 13:06:31 -05:00
Stefan Metzmacher
ab2c2f27e1 r4070: move some defines from asn_1.h to the places they belong to
metze
2007-10-10 13:06:22 -05:00