1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

366 Commits

Author SHA1 Message Date
Tim Potter
12659ae749 Merge from 3.0:
>Apply some NULL pointer paranoia to previous wins hook fix.

>Fix broken wins hook functionality.  A i18n fixe caused the name type
>to be appended to the netbios name between angle brackets.  This interfered
>the 'sh -c' used to implement smbrun().  Closes bug #528.
-
Gerald Carter
c17a7dc9a1 sync 3.0 into HEAD for the last time -
Simo Sorce
3101c236b8 port latest changes from SAMBA_3_0 tree -
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
-
Tim Potter
79a654bbe5 Merge from 3.0: remove bogus static initialisers. -
Jelmer Vernooij
d31509fe88 Reverse previous patch from Stefan and me after comments by Andrew Bartlett. -
Jelmer Vernooij
367a5cad1e Patch from metze and me that adds dummy smb_register_*() functions -
Gerald Carter
26824f572d fix bug #47; revert registration of workgroup<1b> to 2.2 behavior -
Jeremy Allison
c5b1654c28 We used to use the name "*",0x0 here, but some Windows
servers don't answer that name. However we *know* they
have the name workgroup#1b (as we just looked it up).
So do the node status request on this name instead.
Found at LBL labs.
Jeremy.
-
Volker Lendecke
a1cae680f9 Typo in error message
Volker
-
Volker Lendecke
5e305e4255 As nobody really objected to this patch, I opted to create facts :-)
This uses 'socket address' as the source address for nmbd. This way we
can again synchronize with the DMB if we have 'bind interfaces only'
to a virtual interface.

I'd love to see this in 2.2.9, but that is up to jerry or jra.

Volker
-
Tim Potter
af6ecafcbb Remove duplicate "tallocdump" message from tdb messaging system. The
same functionality exists as "pool-usage".

Move initialisation of this and dmalloc messages inside message_init().
-
Gerald Carter
6a17c23a54 update copyright notice since it we are now almost 4 months into 2003 -
Jelmer Vernooij
8df30059ef Don't use old usage() function, but the one from popt.
Remove some useless arguments
-
Jelmer Vernooij
d5f9b0275c Revoke some of the popt patch from metze I applied earlier today. It added
some double options and broke some parameters.
-
Jelmer Vernooij
2ddfed298d Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes -
Jelmer Vernooij
e56ab71f12 Add nicer --help headers -
Jim McDonough
9387caf3ce use pstrcpy_base() -
Jim McDonough
c6eb950b68 replace pstrcpy -
Andrew Bartlett
4d00626b6e Fix nmbd under -DDEVELOPER (pstrcpy on not-pstring).
Make a new macro to help in this situation, and add memcpy() parinoia

Andrew Bartlett
-
Andrew Bartlett
31f4827acc String handling parinoia fixes.
This patch enables the compile-time checking of strings assable by means of
sizeof().  (Original code had the configure check reversed).

This is extended to all safe_strcpy() users, push_string and pull_string,
as well as the cli and srv derivitives.  There is an attempt to cap strings
at the end of the cli buffer, and clobber_region() of the speified length
(when not -1 :-).

Becouse of the way they are declared, the 'overmalloc a string' users of
safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips
some of the checks).

This whole ball of mud worked fine, until I pulled out my 'fix' for our
statcache.  When jeremy fixes that, we should be able to get back to testing
this stuff.

This patch also includes a 'marker' of the last caller to clobber_region (ie,
the function that called pstrcpy() that called clobber_region) to assist in
debugging problems that may have smashed the stack.  This is printed at
smb_panic() time.  (Original idea and patch by metze).

It also removes some unsused functions, and #if 0's some others that are
unused but probably should be used in the near future.

For now, this patch gives us some confidence on one class of trivial parsing
error in our code.

Andrew Bartlett
-
Gerald Carter
6fca29ddcd check a pointer before dereferencing it; not sure why userdata == NULL though -
Andrew Bartlett
afe5a3832f Make sure that the 'remote' machine name can only be set once. For some weird
reason, during a Win2003 installation, when you select 'domain join' it sends
one machine name in the name exchange, and litraly 'machinename' during the
NTLMSSP login.

Also fix up winbindd's logfile handling, so that it matches smbd and nmbd.

(This helps me, by seperating the logs by pid).

Andrew Bartlett
-
Andrew Bartlett
762d61b37d A couple more fixes for fstrcpy() into a malloced region. In this case it's
all perfectly legit - the region is an fstring in length, but might not
always be, and it is the last peice of code to fail my automated test.

Andrew Bartlett
-
Andrew Bartlett
a058960c15 Make this an fstrcat(), as this seems to fix some weird issue with the server
name being truncated...  (either way, it's the correct thing to do).

Andrew Bartlett
-
Andrew Bartlett
b328b67fd8 The last of the fstring/pstring mixups, and an extra 'static'. -
Gerald Carter
4c48c475a2 patch to include support for daemontools from Michael Handler -
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Jeremy Allison
65d5bf65c4 Protect nmbd against malformed reply packets. Some reports on the lists showing
these.
Jeremy.
-
Jim McDonough
1d0086aadb Stop using hacks for dns host/domain names. -
Andrew Bartlett
13b9af53bf Remove extra headers, and ensure that we correctly bail out of winbindd if we
can't create the socket.

Andrew Bartlett
-
Jeremy Allison
19f86f1f72 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
-
Jeremy Allison
507ff510e7 Fix from "Stefan (metze) Metzmacher" <metze@metzemix.de> for nmbd 1c group
release.
Jeremy.
-
Jeremy Allison
82b8f749a3 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.
-
Andrew Bartlett
81633064dd Compleatly remove support for logfile truncation. All logs are opened for
append writes.

(blessed by jra)

Andrew Bartlett
-
Jelmer Vernooij
aeb94bb0d7 Make IRIX happy -
Jelmer Vernooij
1602d58949 Add more options to popt_common and use them. Current ones are:
-V Version information
 -n Set netbios name
 -l Set directory to store log files in
 -d Set debuglevel
 -s Load specified configuration file
 -O Set socket options
-
Jelmer Vernooij
9ea7440ac4 Convert to popt -
Jeremy Allison
ca6146c2d3 Ensure we register the 1c name on the unicast subnet.
Jeremy.
-
Andrew Tridgell
ec6a098c2e fixed 3 bugs in the wins server code related to precedence of ! and &
in C

please note that:
 if (! a & b)
is not the same as:
 if (! (a & b))
-
Jeremy Allison
a9112a1e4b Patch from Andy Levine andyl@epicrealm.com who discovered that W2K DMB's
return empty NetServerEnum2 on port 445, but not on port 139.
Jeremy.
-
Herb Lewis
51e0a4adc7 fix for difference in strsep and strtok semantics -
Herb Lewis
a5c59b2cd1 fix irix compile errors - cannot initialize array in declaration statement
with non-const values - strsep not defined
-
Tim Potter
a8c4febdb7 The unused variable was actually needed. The correct fix is to move
it inside an #ifdef HAVE_ADS to avoid the warning and breaking the
build.  (-:
-
Tim Potter
23f1b839e6 Removed unused variable. -
Andrew Bartlett
f393de2310 Make 'remote_machine' private to lib/substitute.c, and fix all the user to use
the new accessor functions.

Andrew Bartlett
-
Jim McDonough
059a352ebb Add AD version of samlogon replies for getdc. ATM it will only function
if you have an ADS DC.
-
Jim McDonough
8e906a9481 Fix length on mailslots. Looks like it should have been 0x17, not decimal 17. -
Andrew Tridgell
434e5124db this is an interim fix for nmbd not registering DOMAIN#1b with WINS
when a PDC. The fix does not iterate over all WINS tags, which it
should do, but after having looked at doing that it gets *very* messy
to do with our current code base.
-