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

106 Commits

Author SHA1 Message Date
Björn Jacke
8833adb04f s3/nmbd: tidy up debug message: ttl isn't a hex value 2010-09-07 20:29:13 +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
Craig Miskell
f2cbc9fbb1 Fix bug #7191 - WINS doesn't respond after > 86 #1c registrations. 2010-03-15 16:20:44 -07:00
Michael Adam
26e5e4f6fd s3:nmbd: don't leak state_path() to talloc_tos() in wins_write_database()
Michael
2009-01-16 01:02:21 +01:00
Steven Danneman
4a578ec50b Covert several persistant tdb files to use state_path() instead of lock_path() 2009-01-12 17:46:15 -08:00
Steven Danneman
7b02e05eb6 Audit usage of get_dyn_STATEDIR() and replace with state_path()
The state directory is now run-time configurable through loadparm, so all
references to it should be done through state_path() or lp_statedir().
2009-01-12 17:46:14 -08:00
Jelmer Vernooij
fe36fe8c3e Use common net utility code (address and sockaddr manipulation). 2008-10-23 20:41:15 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Volker Lendecke
0cdcd255a5 Fix two incompatible pointer warnings
Jeremy, please check
(This used to be commit 60500fac30)
2007-12-08 09:39:20 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
9a41314ce8 Remove pstring from nmbd.
Jeremy.
(This used to be commit a317f70c22)
2007-11-19 15:15:09 -08:00
Jeremy Allison
51a0354d75 Remove more static data from lib/util_sock.c and
callers.
Jeremy.
(This used to be commit 35aaa36f82)
2007-11-03 22:34:46 -07:00
Gerald (Jerry) Carter
88ee61625a Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875)
2007-11-01 15:53:44 -04:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07: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
1deb049a02 r23556: Fix for error path from Atsushi Nakabayashi <nakabayashi@miraclelinux.com>.
Jeremy.
(This used to be commit 3f70c1b105)
2007-10-10 12:23:28 -05:00
Jeremy Allison
9ae6e51616 r23425: Volker noticed this obvious fix for the wins server
code :-). Thanks Volker !
Jeremy.
(This used to be commit e3f33a2a50)
2007-10-10 12:23:15 -05:00
Volker Lendecke
4d5f58c2b9 r23015: Make message_(de)register static to messages.c
(This used to be commit a8082a3c7c)
2007-10-10 12:22:15 -05:00
Volker Lendecke
e6383f4762 r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
(This used to be commit 0ad4b1226c)
2007-10-10 12:21:52 -05:00
Stefan Metzmacher
bc2b6436d0 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
(This used to be commit 3a28443079)
2007-10-10 12:19:00 -05:00
Volker Lendecke
caf8c6a76b r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
(This used to be commit c8ae60ed65)
2007-10-10 12:17:32 -05:00
Volker Lendecke
f852fdbe06 r17626: Some C++ Warnings
(This used to be commit 09e7c010f0)
2007-10-10 11:38:44 -05:00
Jeremy Allison
d88926f6b4 r16665: Fix a couple of bugs I discovered now I've looked
closer at the wins server code. Firstly, it needs
to do the searches on the SELF_NAMES correctly,
secondly it needs to flush the in-memory cache
out before returning the 1b names - else it might
get duplicates returned if many 1b queries are
done in quick succession. Jerry, I hate to say
this but you might want to consider this for 3.0.23....
Jeremy.
(This used to be commit b36b9befbb)
2007-10-10 11:19:07 -05:00
Jeremy Allison
79eaa709a0 r16642: Fix show-stopper bug #3876. Double-free in wins
server code. Jerry please merge for 3.0.23.
Jeremy.
(This used to be commit d354b430ff)
2007-10-10 11:19:05 -05:00
Jeremy Allison
a1e0a0e928 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
(This used to be commit 6c61dc8ed6)
2007-10-10 11:17:26 -05:00
Jeremy Allison
9bb215fe68 r13882: Fix coverity CID bug #96. Missing free on error
exit path.
Jeremy.
(This used to be commit 95ef857c89)
2007-10-10 11:10:58 -05:00
Jeremy Allison
0a516662ab r13873: I think this is the longstanding wins server crash bug, not
part of the changes I made but something that's been there
a while.... Coverity bugid #41.
Jeremy.
(This used to be commit 2f6cf810ea)
2007-10-10 11:10:57 -05:00
Gerald Carter
fbe02a6021 r13510: plug memory leak in WINS server code.
(This used to be commit 381c327a65)
2007-10-10 11:10:08 -05:00
Gerald Carter
e95e6044b0 r13081: correct fix for the segv in nmbd caused by a double free on namerec.
(This used to be commit c908dbc4b2)
2007-10-10 11:06:12 -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
6d5757395a r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
(This used to be commit 414303bc02)
2007-10-10 11:05:19 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -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
7310ba1b18 r1299: Don't "break" - "continue" ! Otherwise we only expire the first name !
Doh !
Jeremy.
(This used to be commit 451d289f69)
2007-10-10 10:52:05 -05:00
Jeremy Allison
e8a1292d91 r1290: Ensure we remove DNS and DNSFAIL records immediately on timeout.
Fix for #607.
Jeremy.
(This used to be commit e6ff6d95d2)
2007-10-10 10:52:04 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b)
2007-10-10 10:51:13 -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
Tim Potter
ecd8cc4ef2 Apply some NULL pointer paranoia to previous wins hook fix.
(This used to be commit 0281c5b764)
2003-09-29 04:57:20 +00:00
Tim Potter
1148875a15 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.
(This used to be commit 92b37b3ef0)
2003-09-29 04:41:45 +00:00
Gerald Carter
4561b811df fix segfault on empty wins server name registration reply
(This used to be commit 743560284c)
2003-08-27 15:07:46 +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
5dfeda0002 Use correct size (17 not 16) when doing a push_ascii(). Ensure that
wins hook is called with unix charset.
Jeremy.
(This used to be commit ecb8057387)
2003-08-22 21:41:50 +00:00
Jeremy Allison
647a048ad0 Ensure nmb_namestr() converts back from CH_DOS to CH_UNIX.
Jeremy.
(This used to be commit eb79272743)
2003-08-22 00:26:37 +00:00
Volker Lendecke
53f0ebc82b This puts back wins.dat into nmbd for easy editing. It leaves most of
the other infrastructure with name owners etc in place. If anybody is
really going to tackle winsrepld, it will probably not be hard to put
the additional info back.

Volker
(This used to be commit eb82daa84a)
2003-05-08 07:33:39 +00:00
Volker Lendecke
8be1c3a0e4 Fix a confusing error message
Volker
(This used to be commit 69df898afb)
2003-04-28 12:27:18 +00:00