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

37 Commits

Author SHA1 Message Date
Richard Sharpe
b79aed8592 Convert all uses of uint8/16/32 to _t in nmbd and the include file.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-01 19:15:10 +02:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Günther Deschner
c217790918 s3-nmbd: move nmbd proto out of main proto.h
Guenther
2010-08-26 00:20:28 +02:00
Andrew Tridgell
c804102d0f s3-nmbd: note TODO item for qsort
This uses another char* cast hack. Left alone for now.
2010-02-14 18:44:21 +11:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Jeremy Allison
817e0d899d Ensure we don't take address of one past buffer.
Jeremy.
(This used to be commit 318cbcfae5)
2008-01-09 14:35:00 -08:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
8e54530b52 Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
(This used to be commit 3f6bd0e1ec)
2007-10-10 18:25:16 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
83b987befd r12107: Move to a tdb-based wins database. At the moment we still
use it as though it were an in-memory db and dump out to
a flat file every 2 mins, but that can now change.
Jeremy.
(This used to be commit a342681792)
2007-10-10 11:05:45 -05:00
Jeremy Allison
acf9d61421 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.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
ce0c99312c 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.
(This used to be commit 834d816caf)
2004-03-15 21:45:45 +00:00
Jeremy Allison
6b9dbbcd24 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.
(This used to be commit b4ea493599)
2004-03-13 02:16:21 +00:00
Jeremy Allison
9fdc1363be 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.
(This used to be commit 84ae44678a)
2003-08-27 01:25:01 +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
Jeremy Allison
2f194322d4 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.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
1f312492ec move to SAFE_FREE()
(This used to be commit 1446a1562b)
2001-09-17 04:35:51 +00:00
Andrew Tridgell
84f65e6be6 don't qsort a list less than 2 entries
(This used to be commit 6faa3c23ae)
2000-04-25 00:45:42 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Jeremy Allison
24ca89bfb0 Removed acconfig.h configure configure.in include/config.h.in: Made smbwrapper not made
by default.
nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include
	   file problem...sigh.
Jeremy.
(This used to be commit 9ee8f39aed)
1998-11-14 01:04:13 +00:00
Andrew Tridgell
179e8c66f1 changed the way that name query records are sorted in replies. They
are now sorted by the number of common leading bits in the IP address
with the address of the querying host.
(This used to be commit 4460a1bc6a)
1998-08-30 08:45:23 +00:00
Andrew Tridgell
1778debff1 added some defensive programming to nmbd. This mostly means zeroing
areas of memory before freeing them.

While doing this I also found a couple of real bugs. In two places we
were freeing some memory that came from the stack, which leads to
a certain core dump on many sytems.
(This used to be commit c5e5c25c85)
1998-08-30 04:27:26 +00:00
Andrew Tridgell
c077bce5c0 nmbd would core dump if a large number of netbios aliases is set. The
problem was a buffer overflow in process_node_status_request().

this really points out a general problem is allocating MAX_DGRAM_SIZE
packets on the stack in nmbd. There must be a better way.
(This used to be commit 7db45f169c)
1998-08-28 14:35:24 +00:00
Jeremy Allison
59d07445b6 loadparm.c:
With apologies to Charlton Heston and Pierre Boule.

    "You damn fools, you finally did it".

    Changed default security mode to be security=user.
    Yes this is a big (although small in code) change.
    It's something we've been discussing for a while, to
    finally wean people off the legacy security=share mode
    which is *never* what you want.

    Jeremy.

nmbd_incomingrequests.c: Bug fix for nmbd core dumps caused by overrun.
                         Found by <samuel@public.szonline.net>.
nttrans.c: More NT smb stuff.
reply.c: Unlink will overwrite an existing file. Well you learn
         something new about POSIX every day. :-).
server.c: Tidyup unreadable code.
smbpasswd.c: Code to allow -U remote_username to allow ordinary
             users to change remote passwords if their NT username
             is different from their UNIX username.
             Patch from <torbjorn.lindh@allgon.se>.

Jeremy.
(This used to be commit 4eccb47cfb)
1998-07-14 21:23:59 +00:00
Christopher R. Hertel
d4366df039 I've replaced the linked list used to manage the subnet namelists with a
splay tree.  For short lists, this will have no noticable effect.  As
lists (eg. the WINS database) grow longer, the speed improvements should
be quite dramatic.  This change is an incremental step toward replacing
the in-memory namelists with a back-end database.

This change is going into the 1.9.19pre-alpha code because...well...it's
pre-alpha.  Please let me know if there are any problems.

(Oh, as a side-effect, the wins.dat will be in sorted order.  :)

Chris -)-----
(This used to be commit 7806c453df)
1998-06-10 19:51:58 +00:00
Christopher R. Hertel
96bc404277 This is a first step toward moving long namelists into a database. I
split the name_record structure into pieces.  The goal is that the key
(the name) be separate from the data associated with the key.  Databases
such as gdbm store information in [key,content] pairs.

There is no functional change in with this update.  It's just a step in
the direction that Jeremy and I have been discussing.

Chris -)-----
(This used to be commit e420a4bd7d)
1998-06-09 01:56:18 +00:00
Jeremy Allison
f888868f46 This is a security audit change of the main source.
It removed all ocurrences of the following functions :

sprintf
strcpy
strcat

The replacements are slprintf, safe_strcpy and safe_strcat.

It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.

Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.

Jeremy.
(This used to be commit 2d77445400)
1998-05-12 00:55:32 +00:00
Jeremy Allison
e7ac86607c This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.

This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).

Jeremy.
(This used to be commit 866406bfe3)
1998-04-25 01:12:08 +00:00
Jeremy Allison
64095b2486 Code to work around a bug in FTP OnNet software NBT implementation.
They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e>
names and *don't set the group bit*.

Jeremy.
(This used to be commit 1feb54e1ba)
1998-02-26 19:26:18 +00:00
Jeremy Allison
55f400bd84 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c1697723)
1998-01-22 13:27:43 +00:00
Jeremy Allison
5d4345b66d nmbd_incomingdgrams.c: Fix bug with Syntax 5.1 servers reported by SGI where
they do host announcements to LOCAL_MASTER_BROWSER_NAME<00> rather than
WORKGROUP<1d>.
nmbd_incomingrequests.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
nmbd_serverlistdb.c: Stopped writing "Unknown" for local master browsers
we don't know.
nmbd_winsproxy.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
Jeremy.
(This used to be commit 5adfff94c9)
1997-12-16 07:30:25 +00:00
Jeremy Allison
64f0348a3f This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
(This used to be commit d80b0cb645)
1997-12-13 14:16:07 +00:00