1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

69 Commits

Author SHA1 Message Date
Gerald Carter
8ad147508a r2261: fix getdc mailslot checks; testing with Windows 98se, WinME, WinNT 4.0/200x/XP 2007-10-10 10:52:38 -05:00
Jeremy Allison
dd9b17abd6 r2224: Make nmbd more robust against bad netbios packets.
Jeremy.
2007-10-10 10:52:36 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Jeremy Allison
834d816caf Use "unix netbios name" type unstring - 64 bytes long to manipulate netbios
names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to
expand to utf8 size on read.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b4ea493599 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3a3e336030 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
4ca0ab7506 A Samba DC is nothing special these days - so every domain controller
location packet from the client is not a DEBUG(1) event anymore...

(Yes, we printed this for each of these UDP packets...)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
0519a7022b Final round of printf warnings fixes for the moment. 0001-01-01 00:00:00 +00:00
Jeremy Allison
ad06edd1bb Fixes to check for wraps which could cause coredumps.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
84ae44678a Fix the character set handling properly in nmbd. Also fix bug where
iconv wasn't re-initialised on reading of "charset" parameters. This
caused workgroup name to be set incorrectly if it contained an
extended character.
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
a2bd8f0bfa Update my copyrights according to my agreement with IBM 0001-01-01 00:00:00 +00:00
Jim McDonough
15d2bc4785 Fix copyright statements for various pieces of Anthony Liguori's work. 0001-01-01 00:00:00 +00:00
Jim McDonough
1e85a9ed8d Fix bug #98: DNS compression is required for proper building of the
netlogon for ads packet.  repeated DNS components will not be properly
encoded otherwise.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
fbb46da79c Merge from HEAD:
- NTLMSSP over SPENGO (sesssion-setup-and-x) cleanup and code refactor.
  - also consequential changes to the NTLMSSP and SPNEGO parsing functions
  - and the client code that uses the same functions
 - Add ntlm_auth, a NTLMSSP authentication interface for use by applications
   like Squid and Apache.
  - also consquential changes to use common code for base64 encode/decode.
 - Winbind changes to support ntlm_auth (I don't want this program to need
   to read smb.conf, instead getting all it's details over the pipe).
 - nmbd changes for fstrcat() instead of fstrcpy().

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jim McDonough
e707e2cc7c Stop using hacks for dns host/domain names. 0001-01-01 00:00:00 +00:00
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
3928578b52 sync 3.0 branch with head 0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Martin Pool
22e510ea0d Add an output parameter to message_send_all that says how many
messages were sent, so you know how many replies to expect.

Const and doc religion.
0001-01-01 00:00:00 +00:00
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
Volker Lendecke
69a3277fc5 How often did I read the CVS commit message
"Always compile before commit" :-((

Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
50ea73426f From 2.2.
Volker
0001-01-01 00:00:00 +00:00
Simo Sorce
1446a1562b move to SAFE_FREE() 0001-01-01 00:00:00 +00:00
Andrew Tridgell
c26e0d3f27 got rid of USE_TDB_MMAP_FLAG as its not needed any more 0001-01-01 00:00:00 +00:00
Tim Potter
b7cf14bf84 Send a MSG_SMB_SAM_REPL when a UAS/SAM change netlogon message is
received.
0001-01-01 00:00:00 +00:00
Tim Potter
efcbcfaa48 Process the SAM/UAS change notification message. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
0001-01-01 00:00:00 +00:00
Jeremy Allison
28a0bc5f57 AS/U on a sparc now joins and authenticates against a Samba PDC !
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
158d9cada8 Fixed wild pointer diff found by insure.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ab0ecc39d6 This is a *big* checkin that may break some things, but implements the
new open mechanism Andrew & I discussed.

config.sub:
configure: Included the QNX patch.

include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).

Note that we will also need locking calls in the vfs (to be added).

lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
                          Also fix for sidsize DOS bug.

locking/locking.c: Check value of ret before using it for memdup.

printing/printing.c: Convert print_fsp_open to return an allocated fsp.

rpc_server/srv_lsa.c: Fix for NT domain logons.

I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.

smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.

smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
               open_file_stat to return an fsp from the call.

smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
             open_file_stat to return an fsp from the call.

In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.

The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.

This code will need extensive testing but seems to initially work.

Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
36fb5bc72f updates from the TNG branch 0001-01-01 00:00:00 +00:00
Luke Leighton
5086e6425f logic for domainsidsize is if size is zero, there's no sid, so don't
advance over it and 4-byte align.

this _used_ to be "regardless of domainsidsize, advance by domainsidsize+3"
which is wrong.
0001-01-01 00:00:00 +00:00
Jeremy Allison
491eea8a20 include/byteorder.h: ALIGN4/ALIGN2 macros.
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
                   Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
0da440c8fe add a comment 0001-01-01 00:00:00 +00:00
Andrew Tridgell
1682faa1b0 some updates to the process logon code to reflect lukes latest
research plus some cleanups
0001-01-01 00:00:00 +00:00
Andrew Tridgell
1ac46c4011 damn, the test was the wrong way around for short_resuest 0001-01-01 00:00:00 +00:00
Andrew Tridgell
426c904333 changed the definition of dos_PutUniCode
the previous definition could result is us overflowing a buffer. The
null termination was always added yet the size returned did not
include the null termination.

the new function takes a BOOL null_terminate, and always returns the
total number of bytes consumed by the string.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f6b56ae93e the final part of the nmbd merge between head and tng - this gets the
GETDC stuff sorted out
0001-01-01 00:00:00 +00:00
Jeremy Allison
9f879ec396 lib/system.c: Fixed gcc warnings.
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
27ef178926 richard got the short request for GETDC right (hooray!) win9x _and_ nt
now work.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
Luke Leighton
4aea261cb0 responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, the
request name.

modified createuser rpcclient command to examine name being added.  if it
ends in a $, assume that a workstation trust account is being added.
0001-01-01 00:00:00 +00:00
Luke Leighton
98ddeaf442 added regqueryval command (experimental) to get reg_io_q_info() and
reg_io_r_info() working properly.  previously they weren't well
understood (well, they were the first of the registry functions i did,
back in december 97, ok??? :-)

set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
0001-01-01 00:00:00 +00:00
Luke Leighton
25c70e3c98 - added DCE/RPC "fault" PDU support.
- disabled (AGAIN) the GETDC "if (MAILSLOT\NTLOGON)" code that will get
NT5rc2 to work but WILL break win95 (AGAIN).  this needs _not_ to be
re-enabled but to be replaced with a better mechanism.

- added SMBwrite support (note: SMBwriteX already existed) as NT5rc2 is
sending DCE/RPC over SMBwrite not SMBwriteX.
0001-01-01 00:00:00 +00:00
Matthew Chapman
8a603a8793 Fix for Win95 not being able to find PDC (for User/Server Manager, and
password change requests), from Michael Stockman <pgmtekn@algonet.se>.
GETDC on \MAILSLOT\NET\NETLOGON necessarily returns less information
than the NTLOGON version.
0001-01-01 00:00:00 +00:00
Luke Leighton
baf55934dc SAMLOGON query - alignment issue is beginning to get to me. 0001-01-01 00:00:00 +00:00
Luke Leighton
9d01e9d86a alignment issue for UDP SAMLOGON response. 0001-01-01 00:00:00 +00:00
Luke Leighton
de290627f0 alignment issue in UDP SAMLOGON response. 0001-01-01 00:00:00 +00:00