1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

845 Commits

Author SHA1 Message Date
Tim Potter
68945027b5 Fix some uninitialised variable warnings. -
Jim McDonough
4e86243ea1 Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534
-
cvs2svn Import User
e569418861 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
Jim McDonough
532fab74c1 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
-
Jim McDonough
00e0aba2cf Be sure referent ID is updated for incoming structures, too. -
Jim McDonough
26956cdef9 Fix typo -
Jim McDonough
9d0f322a85 Update structures after ethereal showed some marshalling/unmarshalling
errors.
-
Jim McDonough
71dcdf54e6 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)
-
Jim McDonough
2f84c6c9a1 Fix tower length calculations and add some const -
Jim McDonough
e9fc15d58c uuid itself might not be aligned (as is the case in epm map requests), so
it needs to be aligned outside the smb_io_rpc_uuid() call if a specific
rpc or struct needs it that way.
-
Jim McDonough
041c17bd66 Add epmapper pipe -
Jim McDonough
bdd5158d9a Add (un)marshalling code for endpoint mapper map operation -
Tim Potter
2aaafa5007 Merge from 3.0:
>Remove duplicate function (now in rpc_parse/parse_prs.c) and fix a RPC debug
>(I renamed the element of the structure).
>
>Andrew Bartlett
-
Jeremy Allison
cdba166e31 Max warnings with gcc.
Jeremy.
-
Jeremy Allison
3ebbd67dec Tut tut - always run with max warnings on gcc...
Jeremy.
-
Simo Sorce
c78f2d0bd1 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
couldn't compile to test these due to some kerberos problems wirh 3.0,
but on HEAD they're working well, so I suppose it's ok to commit
-
Simo Sorce
66074d3b09 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
-
Jeremy Allison
dfbde4be71 Grrr. compile patches before you apply !
Jeremy.
-
Gerald Carter
6cbdbdf9e1 abstract UUID parsing code to an individual function; patch from Anthony -
Gerald Carter
9365c619d6 abstract UUID parsing code to an individual function; patch from Anthony -
Andrew Bartlett
641652cad9 Remove duplicate function (now in rpc_parse/parse_prs.c) and fix a RPC debug
(I renamed the element of the structure).

Andrew Bartlett
-
Gerald Carter
9d2e585e5e commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain -
Gerald Carter
3802f5895e commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain -
Tim Potter
e2ab9e54cd 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.
-
Jeremy Allison
f82c273a42 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.
-
Jeremy Allison
546b2271c0 Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying
the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on
auto inherited checks.
Jeremy.
-
Jeremy Allison
28b315a750 Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying
the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on
auto inherited checks.
Jeremy.
-
Jeremy Allison
71ecd10181 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.
-
Jeremy Allison
cd7bd8c2da 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.
-
Gerald Carter
c17a7dc9a1 sync 3.0 into HEAD for the last time -
Tim Potter
695aa39c5d Fix for bug #334. We don't unmarshall the trusted domain or secrets
info delta correctly and thus crash when doing a net rpc samdump.

The easiest thing at the moment it to comment out these functions as
they seriously don't correspond with reality (netmon/ethereal) and the
data in the containers aren't used anyway.
-
Gerald Carter
dd2cf4897e Fix bug #252. Implement missing SAMR_REMOVE_USER_FOREIGN_DOMAIN
call.
-
Herb Lewis
398bd14fc6 get rid of more compiler warnings -
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX -
Andrew Bartlett
024d32f793 Fix comment -
Simo Sorce
3101c236b8 port latest changes from SAMBA_3_0 tree -
Jim McDonough
a2bd8f0bfa Update my copyrights according to my agreement with IBM -
Jim McDonough
15d2bc4785 Fix copyright statements for various pieces of Anthony Liguori's work. -
Gerald Carter
0ab00ccaed working on transtive trusts issue:
* use DsEnumerateDomainTrusts() instead of LDAP search.
    wbinfo -m now lists all trusted downlevel domains and
    all domains in the forest.

Thnigs to do:

  o Look at Krb5 connection trusted domains
  o make sure to initial the trusted domain cache as soon
    as possible
-
Gerald Carter
c691c7f7d9 add support for DsEnumerateDomainTrusted for enumerating all the
trusted domains in a forest.
-
Tim Potter
59dae1da66 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
-
Tim Potter
ba4d334b82 More printf fixes - size_t is long on some architectures. -
Gerald Carter
e66541d0e1 fix the build. Ifdef out some code -
Gerald Carter
adb98e7b7c trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
-
Andrew Bartlett
5472ddc9ea 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
-
Tim Potter
7f363fa32d Don't bomb out when trying to unmarshall a zero length printerdata value.
Fixes remote printer publishing of shared printers from a Samba server.
-
Jeremy Allison
9d0692a54f Get rid of DISP_USER_INFO/DISP_GROUP_INFO as they serve no useful
purpose. Replace with an array of SAM_ACCOUNT/DOMAIN_GRP entries.
ZERO struct's in smbd/uid.c stops core dumps when sid_to_XX
functions fail. Getting ready to add caching.
Jeremy.
-
Jeremy Allison
ff222716a0 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.
-
Andrew Bartlett
85f88191b9 This patch takes the work the jerry did for beta2, and generalises it:
- The 'not implmented' checks are now done by all auth modules
 - the ntdomain/trustdomain/winbind modules are more presise as to
   what domain names they can and cannot handle
 - The become_root() calls are now around the winbind pipe opening only,
   not the entire auth call
 - The unix username is kept seperate from the NT username, removing the
   need for 'clean off the domain\' in parse_net.c
 - All sid->uid translations are now validated with getpwuid() to put a very
   basic stop to logins with 'half deleted' accounts.

Andrew Bartlett
-
Gerald Carter
62e36e6ede well this was easy...
When winbindd is running on a PDC the SAM_ACCOUNT for a trusted user
has a username of DOMAIN\user.  Make sure to trim the domain part
from the username when filling in the net_sam_logon reply.
This fixes the browsing issues i was seen across domain trusts.
-