1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-17 15:17:09 +03:00

81 Commits

Author SHA1 Message Date
Kai Blin
a8b567aac3 net: Use true/false instead of True/False. 2008-05-20 14:27:08 +02:00
Kai Blin
ef0184d580 net: more whitespace cleanup 2008-05-10 09:22:31 +02:00
Kai Blin
1e9319cf88 net: Remove globals 2008-05-10 09:22:27 +02:00
Volker Lendecke
99fc3283c4 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct 2008-04-20 14:08:16 +02:00
Volker Lendecke
783afab9c8 Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
2008-04-20 00:13:09 +02:00
Günther Deschner
0970369ca0 Fix NETLOGON credential chain with Windows 2008 all over the place.
In order to avoid receiving NT_STATUS_DOWNGRADE_DETECTED from a w2k8
netr_ServerAuthenticate2 reply, we need to start with the AD netlogon negotiate
flags everywhere (not only when running in security=ads). Only for NT4 we need
to do a downgrade to the returned negotiate flags.

Tested with w2k8, w2ksp4, w2k3r2 and nt4sp6.

Guenther
2008-04-02 11:12:47 +02:00
Günther Deschner
e12721f73d Fix typo.
Guenther
2008-03-15 12:56:09 +01:00
Günther Deschner
d078a87571 Add my copyright.
Guenther
2008-02-27 19:38:48 +01:00
Günther Deschner
f4581e9f44 Collect all init_lsa_string varients in one place.
Guenther
2008-02-12 22:05:39 +01:00
Günther Deschner
1b48b9d73d Use rpccli_samr_SetUserInfo2() in place of rpccli_samr_set_userinfo().
Guenther
2008-02-12 20:29:13 +01:00
Günther Deschner
bdc4918503 Remove all callers of rpccli_samr_setuserinfo2 and replace with
rpccli_samr_SetUserInfo (see the opcode mixup in rpc_samr.h).

Guenther
2008-02-12 18:53:59 +01:00
Günther Deschner
a513ae630c Use rpccli_samr_LookupNames() in net.
Guenther
2008-02-08 15:30:35 +01:00
Günther Deschner
ce22abcea3 Use rpccli_lsa_QueryInfoPolicy() all over the place.
Guenther
2008-02-08 10:26:20 +01:00
Günther Deschner
bdf8d56262 Use rpccli_samr_Connect2() all over the place.
Guenther
2008-02-04 22:12:40 +01:00
Günther Deschner
701af69118 Use rpccli_samr_CreateUser2() all over the place.
Guenther
2008-02-01 16:29:20 +01:00
Günther Deschner
da90eb7653 Use rpccli_samr_OpenUser() all over the place.
Guenther
2008-02-01 12:30:15 +01:00
Günther Deschner
e4e9d72724 Use rpccli_samr_OpenDomain() all over the place.
Guenther
2008-02-01 12:29:10 +01:00
Günther Deschner
64f0889401 Remove rpccli_samr_close and use pidl generated function instead.
Guenther
2008-01-31 11:09:11 +01:00
Günther Deschner
d4a9e46edf Trying to avoid defining new SAMR acct creation flags when we already have them with different
names. Matt, Jeremy, please check.

Guenther
2008-01-25 01:04:30 +01:00
Andreas Schneider
5aadfcdaac Windows 2008 (Longhorn) auth2 flag fixes.
Interop fixes for AD specific flags. Original patch from Todd Stetcher.
2008-01-23 14:55:22 -08:00
Jeremy Allison
7d94f97947 Forward ported version of Matt Geddes <musicalcarrion@gmail.com>
patch for adding acct_flags to rpccli_samr_create_dom_user().
Jerry please test.
Jeremy.
2008-01-23 13:54:02 -08:00
Günther Deschner
7a3fe68bef Apply const to rpccli_lsa_query_info_policy() and rpccli_lsa_query_info_policy2().
Guenther
2008-01-15 16:40:22 +01:00
Jeremy Allison
98e154c312 This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
2007-10-24 14:16:54 -07:00
Gerald Carter
00a93ed336 r25407: Revert Longhorn join patch as it is not correct for the 3.2 tree.
The translate_name() used by cli_session_setup_spnego() cann rely
Winbindd since it is needed by the join process (and hence before
Winbind can be run).
2007-10-10 12:31:03 -05:00
Gerald Carter
8304ccba73 r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,
and client fixes.  Patch from Todd Stetcher <todd.stetcher@isilon.com>.
2007-10-10 12:31:02 -05:00
Michael Adam
5a16da2185 r25198: Change net_rpc_join_ok() to return NTSTATUS for better
error propagation.

Michael
2007-10-10 12:30:50 -05:00
Michael Adam
46093004a7 r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
return NTSTATUS to allow for better error propagation.

Michael
2007-10-10 12:30:50 -05:00
Rafal Szczesniak
30d99d8ac3 r24789: Add implementation of machine-authenticated connection to netlogon
pipe used when connecting to win2k and newer domain controllers. The
server may be configured to deny anonymous netlogon connections which
would stop domain join verification step. Still, winnt domains require
such smb sessions not to be authenticated using machine credentials.
Creds employed in smb session cannot have a username in upn form, so
provide the separate function to use machine account.

rafal
2007-10-10 12:30:21 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
fd0ee6722d r21831: Back out r21823 for a while, this is going into a bzr tree first.
Volker
2007-10-10 12:18:37 -05:00
Volker Lendecke
f94e5af72e r21823: Let secrets_store_machine_password() also store the account name. Not used
yet, the next step will be a secrets_fetch_machine_account() function that
also pulls the account name to be used in the appropriate places.

Volker
2007-10-10 12:18:36 -05:00
Gerald Carter
50d74ce048 r18747: replace rpccli_lsa_close() with rpccli_lsa_Close() 2007-10-10 12:00:54 -05:00
Volker Lendecke
3df0bf7d60 r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749

in net_rpc_audit.c: 754 755 756

in net_rpc_join.c: 757

in net_rpc_registry: 766 767

in net_rpc_samsync.c: 771 773

in net_sam.c: 797 798

Volker
2007-10-10 11:18:48 -05:00
Gerald Carter
4c4ea7b20f r15543: New implementation of 'net ads join' to be more like Windows XP.
The motivating factor is to not require more privileges for
the user account than Windows does when joining a domain.

The points of interest are

* net_ads_join() uses same rpc mechanisms as net_rpc_join()
* Enable CLDAP queries for filling in the majority of the
  ADS_STRUCT->config information
* Remove ldap_initialized() from sam/idmap_ad.c and
  libads/ldap.c
* Remove some unnecessary fields from ADS_STRUCT
* Manually set the dNSHostName and servicePrincipalName attribute
  using the machine account after the join

Thanks to Guenther and Simo for the review.

Still to do:

* Fix the userAccountControl for DES only systems
* Set the userPrincipalName in order to support things like
  'kinit -k' (although we might be able to just use the sAMAccountName
  instead)
* Re-add support for pre-creating the machine account in
  a specific OU
2007-10-10 11:16:57 -05:00
Jeremy Allison
88dd4ab481 r14087: Protect against domain being NULL. Finish Coverity #152.
Jeremy.
2007-10-10 11:11:11 -05:00
Jim McDonough
d8e69c18e0 r14085: Fix coverity bg #152, uninit'ed var. 2007-10-10 11:11:11 -05:00
Jeremy Allison
68005f6bdb r13641: Finish fix for #3510. Don't use client schannel when told
not to, cope with a server that doesn't offer schannel also.
Jeremy
2007-10-10 11:10:20 -05:00
Jeremy Allison
7de1ee1861 r13614: First part of the bugfix for #3510 - net join fails
against server with schannel disabled. Second part
will come tomorrow (fixing net_rpc_join_ok()).
Jeremy.
2007-10-10 11:10:19 -05:00
Lars Müller
f650e3bdaf r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout.

Fix some compiler warnings for system() calls where we didn't used the
return code.  Add appropriate error messages and return with the error
code we got from system() or NT_STATUS_UNSUCCESSFUL.
2007-10-10 11:06:09 -05:00
Jeremy Allison
37e6ef9389 r11492: Fix bug #3224 (I hope). Correctly use machine_account_name
and client_name when doing netlogon credential setup.
Jeremy.
2007-10-10 11:05:18 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
84651aca04 r8564: Sometimes we're too dumb to live... Fix samr calls where we were
using USER_INFO_XX structs and functions where XX was sometimes
in hex and sometimes in decimal. Now it's all in decimal (should
be no functionality change).
Jeremy.
2007-10-10 11:00:09 -05:00
Gerald Carter
a0ac9a8ffd r7415: * big change -- volker's new async winbindd from trunk 2007-10-10 10:57:08 -05:00
Tim Potter
68b1c1f533 r6769: Fix bugzilla #2538 and #2527. Unused variables found by Jason Mader. 2007-10-10 10:56:54 -05:00
Gerald Carter
5ec1faa2ad r5203: additional changes for BUG 2291 to restrict who can join a BDC and add domain trusts 2007-10-10 10:55:32 -05:00
Volker Lendecke
dc294c52e0 r4570: Replace cli->nt_pipe_fnum with an array of NT file numbers, one for each
supported pipe. Netlogon is still special, as we open that twice, one to do
the auth2, the other one with schannel.

The client interface is completely unchanged for those who only use a single
pie. cli->pipe_idx is used as the index for everything except the "real"
client rpc calls, which have been explicitly converted in my last commit. Next
step is to get winbind to just use a single smb connection for multiple pipes.

Volker
2007-10-10 10:53:47 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Tim Potter
7f161702fa r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
2007-10-10 10:52:55 -05:00
Andrew Bartlett
fcdc5efb1e Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
-