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

648 Commits

Author SHA1 Message Date
Jim McDonough
1fa1e931a3 More sync between passdb on 3.0 and HEAD.
Replace unknown_3 with fields_present.  Also causes rpc_samr structure field changes.
(This used to be commit 1976843345)
2004-02-12 16:16:53 +00:00
Gerald Carter
0cf45c96b4 fix another bug caused by cli_lsa_query_info_policy() changes
(This used to be commit faec928564)
2004-01-16 22:15:35 +00:00
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +00:00
Andrew Bartlett
af8fb7e01e Change (unused) structure parameter for cli_ds_enum_domain_trusts() cleanup.
(This used to be commit 6e5b084c20)
2004-01-05 02:05:19 +00:00
Tim Potter
80bbfbaf44 Fix comment.
(This used to be commit a999f7f23f)
2003-12-07 10:48:31 +00:00
Tim Potter
36d534ef74 Patch from James Henstridge to allow rpcclient adddriver command to specify
printer driver version.  Closes bug #514.
(This used to be commit c5865e3dfe)
2003-11-05 16:40:13 +00:00
Tim Potter
4ebe9f9167 Remove trailing comma on typedef enum. albert chin (china@thewrittenword.com)
(This used to be commit 67dd1c4366)
2003-10-27 23:43:15 +00:00
Jim McDonough
3d8e3f314b Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534
(This used to be commit 4e86243ea1)
2003-10-24 13:49:29 +00:00
cvs2svn Import User
6440c4b34d This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit e569418861) 2003-10-24 13:38:14 +00:00
Jim McDonough
6258550534 New files for support of initshutdown pipe. Win2k doesn't respond properly
to all requests on the winreg pipe, so we need to handle this new pipe.

First part of fix for bug #534
(This used to be commit 532fab74c1)
2003-10-24 13:38:13 +00:00
Jeremy Allison
cc88a03cd0 Fixed typo spotted by Daniel Jarboe <daniel.jarboe@custserv.com>.
Jeremy.
(This used to be commit 89d42685b7)
2003-10-20 21:02:08 +00:00
Jeremy Allison
5fad0208ad Fixed typo spotted by Daniel Jarboe <daniel.jarboe@custserv.com>.
Jeremy.
(This used to be commit c68b6f64d9)
2003-10-20 21:02:05 +00:00
Jim McDonough
2cfb3e9b70 Several updates:
- add support for named pipe and netbios queries in parse code
- fix map request structure...unknown byte was alignment
- add sample of named pipe over netbios query in rpcclient (comment only)
(This used to be commit 71dcdf54e6)
2003-10-20 18:35:12 +00:00
Jim McDonough
86102b0e15 Add epmapper commands to rpcclient
(This used to be commit 1d68e108a7)
2003-10-18 01:14:41 +00:00
Jim McDonough
2702510b46 Add client side code to do endpoint map queries. Currently does one
fixed query.  Updates to come soon.
(This used to be commit 3ca8240aff)
2003-10-18 01:13:01 +00:00
Gerald Carter
e9568f8df2 commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain
(This used to be commit 9d2e585e5e)
2003-10-01 22:00:19 +00:00
Gerald Carter
cbe69f65f6 commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain
(This used to be commit 3802f5895e)
2003-10-01 21:18:32 +00:00
Tim Potter
5400952f7f Merge from 3.0:
>Fix for #480. Change the interface for init_unistr2 to not take a length
>but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
>This is not the case. Count it after conversion.
>Jeremy.
(This used to be commit e2ab9e54cd)
2003-09-29 06:17:09 +00:00
Jeremy Allison
d3b9384308 Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
(This used to be commit f82c273a42)
2003-09-25 21:26:16 +00:00
Jeremy Allison
30fd359914 The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
(This used to be commit 71ecd10181)
2003-09-18 23:54:12 +00:00
Jeremy Allison
3a48e4b287 The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
(This used to be commit cd7bd8c2da)
2003-09-18 23:53:48 +00:00
Gerald Carter
4093bf7ff8 sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a1)
2003-09-09 04:07:32 +00:00
Andrew Bartlett
f1be3a5c5d - Make 'net' use a single funciton for setting the 'use machine account' code.
- Make winbindd try to use kerberos for connections to DCs, so that it can
   access RA=2 servers, particularly for netlogon.
 - Make rpcclient follow the new flags for the NETLOGON pipe
 - Make all the code that uses schannel use the centralised functions for doing so.

Andrew Bartlett
(This used to be commit 96b4187963)
2003-08-19 22:47:10 +00:00
Andrew Bartlett
f0cd6b35e5 - Fix the kerberos downgrade problem:
- When connecting to the NETOGON pipe, we make a call to auth2, in order
   to verify our identity.  This call was being made with negotiation flags
   of 0x1ff.  This caused our account to be downgraded.  If we instead make
   the call with flags > 1ff (such as 0x701ff), then this does not occour.

 - This is *not* related to the use of kerberos for the CIFS-level connection

My theory is that Win2k has a test to see if we are sending *exactly* what
NT4 sent - setting any other flags seems to cause us to remain intact.

Also ensure that we only have 'setup schannel' code in a few places, not
scattered around cmd_netlogon too.

Andrew Bartlett
(This used to be commit e10f0529fe)
2003-08-19 20:39:32 +00:00
Gerald Carter
5ba60c5608 working on fix for BUG #294. Not done yet, but this at least clears
up some of the false positives in "rpcclient -c getdriver".
Also make sure that we ask for version2 and 3 drivers on x86.
(This used to be commit 5be5151568)
2003-08-19 16:56:53 +00:00
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6)
2003-08-15 04:42:05 +00:00
Andrew Bartlett
172766eea7 Change Samba to always use extended security for it's guest logins, (ie,
NTLMSSP with "" username, NULL password), and add --machine-pass (-P) to
all of Samba's clients.

When connecting to an Active Directory DC, you must initiate the CIFS level
session setup with Kerberos, not a guest login.  If you don't, your machine
account is demoted to NT4.

Andrew Bartlett
(This used to be commit 3547cb3def)
2003-08-14 01:08:00 +00:00
Jeremy Allison
8d94de787e Patch from waider@waider.ie to print out Port Type.
Jeremy.
(This used to be commit 8516baf58d)
2003-08-07 00:55:35 +00:00
Simo Sorce
04bf12b176 port latest changes from SAMBA_3_0 tree
(This used to be commit 3101c236b8)
2003-08-02 20:06:57 +00:00
Jeremy Allison
29ca70cd34 Add a command line option (-S on|off|required) to enable signing on client
connections. Overrides smb.conf parameter if set.
Jeremy.
(This used to be commit 879309671d)
2003-07-30 23:49:29 +00:00
Gerald Carter
c856d9274b add a few more tidy ups. Now onto winbindd
(This used to be commit f8abdd23e1)
2003-07-30 17:37:46 +00:00
Gerald Carter
de1a998622 add support for DsEnumerateDomainTrusted for enumerating all the
trusted domains in a forest.
(This used to be commit c691c7f7d9)
2003-07-30 17:29:00 +00:00
Andrew Bartlett
c9305f1c64 Schannel, once setup, may be used on *ANY* TCP/IP connection until the
connection that set it up has been shut down.

(Also, pipes still connected, and reconnections to the same pipe (eg SAMR)
may continue to use that session key until their TCP/IP connection is shut
down)

Allow further testing by printing out the session key, and allowing it's input
into rpcclient.

Next step is automatic storage in a TDB.

Andrew Bartlett
(This used to be commit fa4d7be161)
2003-07-25 01:26:19 +00:00
Gerald Carter
3a5dc7c2ec convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
(This used to be commit 9f835b85dd)
2003-07-23 12:33:59 +00:00
Tim Potter
274f1f8806 Replace the eight (!) copies of dummy become/unbecome root with a single one.
(This used to be commit 8b818ce381)
2003-07-22 00:20:53 +00:00
Gerald Carter
4a090ba06a trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
(This used to be commit adb98e7b7c)
2003-07-16 05:34:56 +00:00
Andrew Bartlett
456f51bcbe Jeremy requested that I get my NTLMSSP patch into CVS. He didn't request
the schannel code, but I've included that anyway. :-)

This patch revives the client-side NTLMSSP support for RPC named pipes
in Samba, and cleans up the client and server schannel code.  The use of the
new code is enabled by the 'sign', 'seal' and 'schannel' commands in
rpcclient.

The aim was to prove that our separate NTLMSSP client library actually
implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation,
in the hope that knowing this will assist us in correctly implementing
NTLMSSP signing for SMB packets.  (Still not yet functional)

This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with
calls to libsmb/ntlmssp.c.  In the process, we have gained the ability to
use the more secure NT password, and the ability to sign-only, instead of
having to seal the pipe connection.  (Previously we were limited to sealing,
and could only use the LM-password derived key).

Our new client-side NTLMSSP code also needed alteration to cope with our
comparatively simple server-side implementation.  A future step is to replace
it with calls to the same NTLMSSP library.

Also included in this patch is the schannel 'sign only' patch I submitted to
the team earlier.  While not enabled (and not functional, at this stage) the
work in this patch makes the code paths *much* easier to follow.  I have also
included similar hooks in rpccleint to allow the use of schannel on *any* pipe.

rpcclient now defaults to not using schannel (or any other extra per-pipe
authenticiation) for any connection.  The 'schannel' command enables schannel
for all pipes until disabled.

This code is also much more secure than the previous code, as changes to our
cli_pipe routines ensure that the authentication footer cannot be removed
by an attacker, and more error states are correctly handled.

(The same needs to be done to our server)

Andrew Bartlett
(This used to be commit 5472ddc9ea)
2003-07-14 08:46:32 +00:00
Gerald Carter
816724fb39 more compile fixes for become/unbecome_root()
(This used to be commit f005f1cf12)
2003-07-09 03:32:07 +00:00
Jeremy Allison
ce0709666c More conversions I missed. Thanks metze.
Jeremy.
(This used to be commit 4f78d747e6)
2003-07-04 18:52:31 +00:00
Jeremy Allison
ce72beb2b5 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Gerald Carter
f36c96d59c * s/get_dc_name/rpc_dc_name/g (revert a previous change)
* move back to qsort() for sorting IP address in get_dc_list()

* remove dc_name_cache in cm_get_dc_name() since it slowed
  things down more than it helped.  I've made a note of where
  to add in the negative connection cache in the ads code.
  Will come back to that.

* fix rpcclient to use PRINTER_ALL_ACCESS for set printer (instead
  of MAX_ALLOWED)

* only enumerate domain local groups in our domain

* simplify ldap search for seqnum in winbindd's rpc backend
(This used to be commit f8cab8635b)
2003-06-23 19:05:23 +00:00
Jelmer Vernooij
0914e541f5 Reverse previous patch from Stefan and me after comments by Andrew Bartlett
(This used to be commit d817eaf0ec)
2003-05-10 11:49:51 +00:00
Jelmer Vernooij
7ed8b615b9 Reverse previous patch from Stefan and me after comments by Andrew Bartlett.
(This used to be commit d31509fe88)
2003-05-10 11:47:29 +00:00
Jelmer Vernooij
ec40d70b3b Patch from metze and me that adds dummy smb_register_*() functions
(This used to be commit 367a5cad1e)
2003-05-10 10:56:20 +00:00
Jelmer Vernooij
c507ebe567 Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
(This used to be commit 74d9ecfe2d)
2003-05-10 10:53:48 +00:00
Volker Lendecke
d1da999e0a This puts real netlogon connection caching to winbind. This becomes
important once we start doing schannel, as there would be a lot more
roundtrips for the second PIPE open and bind. With this patch logging
in to a member server is a matter of two (three if you count the
ack...) packets between us and the DC.

Volker
(This used to be commit 5b3cb7725a)
2003-05-08 08:02:52 +00:00
Tim Potter
9784320676 Merge:
> Perform lp_load() before popt to fix -W option.
(This used to be commit f8db590b07)
2003-04-28 07:05:50 +00:00
Tim Potter
d31cb1b468 Perform lp_load() before popt to fix -W option.
(This used to be commit d20f4bf5d8)
2003-04-28 07:03:08 +00:00
Tim Potter
507cdd1996 Merge:
>Patch from waider to set exit code of last executed command specified
>as an argument to -c.
(This used to be commit b1ad692688)
2003-04-28 05:54:37 +00:00
Tim Potter
ee007fc7b8 Merge from HEAD:
>Return NT_STATUS_UNSUCCESSFUL if the sourcedata and echodata rpcs
>return unexpected data.
>
>Closes bug #2.
(This used to be commit 2e5f75beaf)
2003-04-28 03:36:01 +00:00