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

32 Commits

Author SHA1 Message Date
Andrew Bartlett
b135f4467f r12858: This moves the libnet_LookupPdc code to use a GetDC request to find
the remote server's name, or in the absence of a local nbt_server to
communicate with (or without root access), a node status request.

The result is that we are in a better position to use kerberos, as well
as to remove the 'password server' mandatory parameter for the samsync
and samdump commands.  (I need this to put these into SWAT).

The only problem I have is that I must create a messaging context, which
requires a server ID.  As a client process, I don't expect to get
messages, but it is currently required for replies, so I generate a
random() number.  We probably need the servers to accept connections on
streamed sockets too, for client-only tasks that want IRPC.

Because I wanted to test this code, I have put the NET-API-* tests into
our test scripts, to ensure they pass and keep passing.  They are good
frontends onto the libnet system, and I see no reason not to test them.

In doing so the NET-API-RPCCONNECT test was simplified to take a
binding string on the command line, removing duplicate code, and
testing the combinations in the scripts instead.

(I have done a bit of work on the list shares code in libnet_share.c
to make it pass 'make test')

In the future, I would like to extend the libcli/findds.c code (based
off volker's winbind/wb_async_helpers.c, which is why it shows up a bit
odd in the patch) to handle getting multiple name replies, sending a
getdc request to each in turn.

(posted to samba-technical for review, and I'll happily update with
any comments)

Andrew Bartlett
(This used to be commit 7ccddfd351)
2007-10-10 13:50:54 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -05:00
Stefan Metzmacher
e81eb91e00 r8235: fix the build
metze
(This used to be commit 5933b00461)
2007-10-10 13:19:23 -05:00
Stefan Metzmacher
0b92507760 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
(This used to be commit e601042c07)
2007-10-10 13:19:22 -05:00
Rafal Szczesniak
4fa6a156bc r8077: Propagate changes in rpc connect routine to functions using it
(it's quite common).

rafal
(This used to be commit 798b00c24a)
2007-10-10 13:19:06 -05:00
Andrew Bartlett
7cc9ce3cd0 r7204: Also fall back to different password set methods on WRITE_FAULT, as
NT4 apparently returns this.

Andrew Bartlett
(This used to be commit 06b1416c31)
2007-10-10 13:17:26 -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
Tim Potter
abc28d66e9 r5364: Rename string fields called 'domain' and 'name' to be 'domain_name'.
(This used to be commit 6749b9404d)
2007-10-10 13:09:46 -05:00
Andrew Tridgell
759da3b915 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.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Bartlett
335a277662 r4722: Start to add 'net join' to Samba4.
Andrew Bartlett
(This used to be commit a9b9606091)
2007-10-10 13:08:48 -05:00
Andrew Bartlett
025bf43aa0 r4721: Changes to libnet_passwd to take advantage of the new easier to call
RPC client libs, and to make the fallback between the various SAMR
levels easier to manage.

I'm starting to enjoy the structure that libnet has actually, and I'm
about to build 'net join' on that basis (and I didn't want to have to
duplicate the password set code).

Andrew Bartlett
(This used to be commit f1dd179a50)
2007-10-10 13:08:48 -05:00
Andrew Tridgell
cc8f4358cc r4035: more effort on consistent naming of the access mask bits.
This removes the duplicate named SEC_RIGHTS_MAXIMUM_ALLOWED and
SEC_RIGHTS_FULL_CONTROL, which are just other names for
SEC_FLAG_MAXIMUM_ALLOWED and SEC_RIGHTS_FILE_ALL. The latter names
match the new naming conventions in security.idl

Also added names for the generic->specific mappings for files are
directories
(This used to be commit 17a4e0b3ac)
2007-10-10 13:06:16 -05:00
Andrew Bartlett
50916c8f2f r3724: Rename a number of structures, for better consistance between SAMR and
NETLOGON.

In particular, rename samr_Name to samr_String - given that many
strings in this pipe are not 'names', the previous was just confusing.
(I look forward to PIDL turning these into simple char * some day...).

Also export out a few changes from testjoin.c to allow for how I have
written the new RPC-SAMSYNC test.

Andrew Bartlett
(This used to be commit 9cd666bcfb)
2007-10-10 13:05:47 -05:00
Andrew Tridgell
6bd02aa504 r3478: split out some more pieces of includes.h
(This used to be commit 8e9212ecfc)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
a1d0b97ed4 r3462: separate out the crypto includes
(This used to be commit 3f75117db9)
2007-10-10 13:05:16 -05:00
Andrew Tridgell
90067934cd r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
(This used to be commit b8f5fa8ac8)
2007-10-10 13:05:09 -05:00
Andrew Bartlett
352de0eaaf r2545: str_charnum -> strlen_m.
These two functions do exactly the same thing, I'll be removing
str_charnum shortly.

Andrew Bartlett
(This used to be commit 5eaa4c9748)
2007-10-10 12:59:04 -05:00
Tim Potter
0e71bf8148 r2458: Rename policy handle parameters for the SAMR pipe. Parameters now
have the handle type implied by the parameter name.  There are four
types of handle: connect, domain, user and group handles.  The
various samr_Connect functions return a connect handle, and the
samr_OpenFoo functions return a foo handle.

There is one exception - the samr_{Get,Set}Security function can
take any type of handle.

Fix up all C callers.
(This used to be commit 32f0f3154a)
2007-10-10 12:58:55 -05:00
Stefan Metzmacher
fe70e8aa7a r2346: fix some minor stuff
metze
(This used to be commit 56e21d0ce2)
2007-10-10 12:58:45 -05:00
Stefan Metzmacher
c9656212f5 r2064: fix some error cases
metze
(This used to be commit 85ba7b4d60)
2007-10-10 12:58:23 -05:00
Stefan Metzmacher
13c899de96 r2021: add password change fallback to SetUserInfo level 25,24,23
metze
(This used to be commit d31405ff2f)
2007-10-10 12:58:18 -05:00
Stefan Metzmacher
cc5b454aa7 r1952: change the _RPC levels into _SAMR
because we may have other rpc levels in future

add more comments about what's going on

check the rsult of samr_OpenUser

metze
(This used to be commit 741f95909b)
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
a5ca84508c r1950: implement libnet_SetPassword_rpc()
this currently tries only SetUserInfo26
the fallback is not yet done

metze
(This used to be commit af6b5673b0)
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
5a8f826653 r1947: fix cup & paste errors
metze
(This used to be commit 1c72f30650)
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
011ff131f8 r1928: give up on NT_STATUS_PASSWORD_RESTRICTION
(NOTE: this code pass isn't called yet,
       because pidl mixes the NTSTATUS of transport and request layer,
       and will be fixed soon)

metze
(This used to be commit 84c06d9ab0)
2007-10-10 12:58:12 -05:00
Stefan Metzmacher
618368ead6 r1926: fallback to other SAMR ChangePasswordUser levels
1. ChangePasswordUser3
2. ChangePasswordUser2
3. OemChangePasswordUser2
4. ChangePasswordUser (not implemented complete)

metze
(This used to be commit eb93d38de0)
2007-10-10 12:58:12 -05:00
Stefan Metzmacher
9d62046b0e r1919: paasword change basicly works now:-)
but we need to find the real pdc for the users domain
and fallback to other levels

metze
(This used to be commit f1b9c1f3dd)
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
226478521b r1878: implemet libnet_context_{init,destroy}
and implement libnet_Change_Password_generic()

metze
(This used to be commit d48050ae90)
2007-10-10 12:58:07 -05:00
Stefan Metzmacher
d3e7a22630 r1836: - as abartlet said to me, we need to contact the users domain pdcfor doing a
password change
- add start of libnet_SetPassword
- use KRB5 and LDAP instead of ADS as ADS isn't a protocol
- add start of lib_rpc_connect()

metze
(This used to be commit 05c40dca8a)
2007-10-10 12:58:00 -05:00
Stefan Metzmacher
1406581761 r1816: here's the initial idea of libnet
metze
(This used to be commit dcb3ea32da)
2007-10-10 12:57:59 -05:00