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

481 Commits

Author SHA1 Message Date
Jeremy Allison
426d722029 r17668: Fix the miscalculations in pushing announces. Fixes
problems Kukks reported.
Jeremy.
2007-10-10 11:38:45 -05:00
Volker Lendecke
09e7c010f0 r17626: Some C++ Warnings 2007-10-10 11:38:44 -05:00
Volker Lendecke
94817a8ef5 r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker
2007-10-10 11:38:39 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Jeremy Allison
b36b9befbb 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.
2007-10-10 11:19:07 -05:00
Jeremy Allison
d354b430ff r16642: Fix show-stopper bug #3876. Double-free in wins
server code. Jerry please merge for 3.0.23.
Jeremy.
2007-10-10 11:19:05 -05:00
Jeremy Allison
6967fd4cef r16581: Fix Klocwork #2017. Possible null deref.
Jeremy.
2007-10-10 11:19:01 -05:00
Jeremy Allison
f6d5bae4a1 r16579: Fix Klocwork #2016. Possible null deref.
Jeremy.
2007-10-10 11:19:01 -05:00
Jeremy Allison
9cbfaf62a3 r16576: Fix Klocwork #2015. Possible null deref.
Jeremy.
2007-10-10 11:19:01 -05:00
Jeremy Allison
22a345deed r16313: Not a problem - but ensure Klocwork is quiet (#872).
Jeremy.
2007-10-10 11:17:33 -05:00
Jeremy Allison
6c61dc8ed6 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
2007-10-10 11:17:26 -05:00
Jeremy Allison
c2f0ea2ff2 r16213: Fix Klocwork #852. iface_n_ip can potentially
return NULL. Ensure we don't deref.
Jeremy.
2007-10-10 11:17:26 -05:00
Jeremy Allison
4b9cf399a6 r16019: This should not be a level zero message - it's harmless
and can happen though misconfiguration.
Jeremy.
2007-10-10 11:17:18 -05:00
Jeremy Allison
e5787cf75b r15700: Make nmbd udp sockets non-blocking to prevent problem
with select returning true but no data being available.
Fix for bug #3779.
Jeremy.
2007-10-10 11:17:08 -05:00
Volker Lendecke
7729799be9 r15483: Fix 'declaration after code' warnings.
Volker
2007-10-10 11:16:54 -05:00
James Peach
ee75049881 r15450: Change profiling data macros to use stack variables rather than
globals. This catches mismatched start/end calls and removes
the need for special nested profiling calls.
2007-10-10 11:16:47 -05:00
Jeremy Allison
b1bbe56831 r15012: Fix bug #2715. Fix suggested by ISHIKAWA Tomonori <toishika@fsi.co.jp>
No need to null terminate early, pull_ascii_fstring will do this.
Jeremy.
2007-10-10 11:15:56 -05:00
James Peach
56bc02d644 r14898: This change is an attempt to improve the quality of the information that
is produced when a process exits abnormally.

First, we coalesce the core dumping code so that we greatly improve our
odds of being able to produce a core file, even in the case of a memory
fault. I've removed duplicates of dump_core() and split it in two to
reduce the amount of work needed to actually do the dump.

Second, we refactor the exit_server code path to always log an explanation
and a stack trace. My goal is to always produce enough log information
for us to be able to explain any server exit, though there is a risk
that this could produce too much log information on a flaky network.

Finally, smbcontrol has gained a smbd fault injection operation to test
the changes above. This is only enabled for developer builds.
2007-10-10 11:15:53 -05:00
Stefan Metzmacher
c3a9f30e2a r14618: add --no-process-group to all server programms
to make the following possible:

timelimit 20000 bin/nmbd -F -S --no-process-group
timelimit 20000 bin/smbd -F -S --no-process-group

this is needed to 'make test' working without losing child processes

metze
2007-10-10 11:15:39 -05:00
Jeremy Allison
ccb2a52e29 r14007: Coverity bug CID #197. Don't compare against 0, we
mean the ttl instead.
Jeremy.
2007-10-10 11:11:04 -05:00
Jeremy Allison
d6d7a5ac62 r13892: Doh ! My bugfix had a bug :-). Spotted by Willi Mann <willi@wm1.at>,
if rrec can be null make sure we *never* deref it.
Jeremy.
2007-10-10 11:10:58 -05:00
Jeremy Allison
dd47e0ef11 r13887: Fix coverity bug CID #94. mem leak on error codepath.
Jeremy.
2007-10-10 11:10:58 -05:00
Jeremy Allison
f4bf550b57 r13884: Fix coverity CID #95. Resource leak on error path.
Jeremy.
2007-10-10 11:10:58 -05:00
Jeremy Allison
95ef857c89 r13882: Fix coverity CID bug #96. Missing free on error
exit path.
Jeremy.
2007-10-10 11:10:58 -05:00
Jeremy Allison
0dc37dd2d8 r13880: Fix coverity bug CID #97, mem leak on error path.
Jeremy.
2007-10-10 11:10:58 -05:00
Jeremy Allison
0f1dffb2f2 r13875: Fix coverity bug #148. Deref of rrec before NULL check.
Jeremy.
2007-10-10 11:10:57 -05:00
Jeremy Allison
2f6cf810ea 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.
2007-10-10 11:10:57 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Gerald Carter
381c327a65 r13510: plug memory leak in WINS server code. 2007-10-10 11:10:08 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
2007-10-10 11:06:18 -05:00
Gerald Carter
c908dbc4b2 r13081: correct fix for the segv in nmbd caused by a double free on namerec. 2007-10-10 11:06:12 -05:00
Gerald Carter
14160c4961 r12967: BUG 1061: don't corrupt the file name when reading an lmhosts file (-H) in nmbd. Patch from Andrew Esh <Andrew_Esh@adaptec.com> 2007-10-10 11:06:09 -05:00
Gerald Carter
c11372f4ec r12946: fix a segfault in nmbd when 'wins support = yes' caused by double free 2007-10-10 11:06:08 -05:00
Jeremy Allison
addb509529 r12564: Ensure load_case_tables is always done first.
Jeremy.
2007-10-10 11:05:59 -05:00
Jeremy Allison
7c545e1e77 r12214: Fix compile if SYNC_DNS is set.
Jeremy.
2007-10-10 11:05:49 -05:00
Jeremy Allison
a342681792 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.
2007-10-10 11:05:45 -05:00
Jeremy Allison
c65b752604 r12043: It's amazing the warnings you find when compiling on a 64-bit
box with gcc4 and -O6...
Fix a bunch of C99 dereferencing type-punned pointer will break
strict-aliasing rules errors. Also added prs_int32 (not uint32...)
as it's needed in one place. Find places where prs_uint32 was being
used to marshall/unmarshall a time_t (a big no no on 64-bits).
More warning fixes to come.
Thanks to Volker for nudging me to compile like this.
Jeremy.
2007-10-10 11:05:42 -05:00
Jeremy Allison
d398a1aeb4 r11566: From metze. Use "interpret_addr(lp_socket_address())" for port 138.
Jeremy.
2007-10-10 11:05:20 -05:00
Jeremy Allison
414303bc02 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.
2007-10-10 11:05:19 -05:00
Gerald Carter
ef3845366b r10822: updating copyright info 2007-10-10 11:04:55 -05:00
Gerald Carter
939c3cb5d7 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)
2007-10-10 11:04:48 -05:00
Gerald Carter
9c78f3b0d6 r9790: remove 'set but not used' variables (reported by Jason Mader) 2007-10-10 11:03:26 -05:00
Tim Potter
dcc7437138 r8946: Some casts to fix warnings when time_t is an unsigned type. Fixes
bugzilla #1888 and #1894.
2007-10-10 11:00:22 -05:00
Gerald Carter
a112c5570a r7440: * merge registry server changes from trunk (so far) for more
printmig.exe work
* merge the sys_select_signal(char c) change from trunk
  in order to keeo the winbind code in sync
2007-10-10 10:57:09 -05:00
Gerald Carter
a0ac9a8ffd r7415: * big change -- volker's new async winbindd from trunk 2007-10-10 10:57:08 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Gerald Carter
fa7eb56933 r5717: BUG 2215: horrible code in nmbd_winsproxy.c; gcc folks at redhat claim its in violation of the C spec. It's so horrible I believe them 2007-10-10 10:55:56 -05:00
Jeremy Allison
422fb43dda r5082: Don't blindly copy question rr_type and class, set correctly as required
by rfc1002.
Jeremy.
2007-10-10 10:55:14 -05:00
Jeremy Allison
86c5548d27 r5077: Use correct type for rr record on negative name query reply.
Jeremy.
2007-10-10 10:55:14 -05:00
Jeremy Allison
ab8c924004 r5076: Ensure that WINS negative name query responses and WACK packets
use the correct RR type of 0xA instead of reflecting back what
the query RR type was (0x20). See rfc1002 sections 4.2.14 and
4.2.16.
Jeremy.
2007-10-10 10:55:13 -05:00
Jeremy Allison
620f2e608f 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.
2007-10-10 10:53:32 -05:00
Jeremy Allison
65fc39fc38 r3877: Final (I hope :-) fix for #2050 from Lars Müller for select maxfd's.
Jeremy.
2007-10-10 10:53:23 -05:00
Jeremy Allison
e3ca22b80d r3864: Fix from Lars Müller <lmuelle@suse.de> for bug #2050.
Make nmbd use maxfd+1 in select also.
Jeremy.
2007-10-10 10:53:22 -05:00
Volker Lendecke
8a28475a0b r2470: Fix bug 1797: winbind and nmbd ignored "-l" option.
Thanks to Igor Zhbanov bsg@uniyar.ac.ru.

Volker
2007-10-10 10:52:44 -05:00
Jeremy Allison
b2b6d6e890 r2363: Fix to make find_workgroup use the same truncation as
create_workgroup (refactor to a common function).
Patch from Paul Szabo - psz@maths.usyd.edu.au.
Jeremy.
2007-10-10 10:52:40 -05:00
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
Jeremy Allison
451d289f69 r1299: Don't "break" - "continue" ! Otherwise we only expire the first name !
Doh !
Jeremy.
2007-10-10 10:52:05 -05:00
Jeremy Allison
e6ff6d95d2 r1290: Ensure we remove DNS and DNSFAIL records immediately on timeout.
Fix for #607.
Jeremy.
2007-10-10 10:52:04 -05:00
Jeremy Allison
409eef2be7 r928: Ensure we're calling send_mailslot() with a UNIX charset
target name.
Jeremy.
2007-10-10 10:51:50 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Gerald Carter
a7e2730ec4 r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
2007-10-10 10:51:05 -05:00
Jeremy Allison
188e1daaff Avoid mb conversion overflow when sending an announcement.
Jeremy.
0001-01-01 00:00:00 +00: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
d7cf64b1e4 Ensure we don't truncate strcmps to nstring anymore...
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
Stefan Metzmacher
12d6bc3bd0 update copyright to -2004
metze
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
d085c94dac Fix for bug #771. Fix packet length for browse list reply.
Jeremy.
0001-01-01 00:00:00 +00:00
Volker Lendecke
a0e741aa68 This binds the nmbd sending socket to the 'socket address'.
Hmmm. This is correct in 2.2. Obviously I did not test my 3.0 checkin at that
time. Now it hit me at a customer's site...

Volker
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
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
0281c5b764 Apply some NULL pointer paranoia to previous wins hook fix. 0001-01-01 00:00:00 +00:00
Tim Potter
92b37b3ef0 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f35e9a8b90 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f1ec43fae4 Fix comment strings to 43 bytes as per spec.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
68d02ebbcd Add length warning on register name.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
35a0b3c035 Fixed off-by-one bugs in workgroup name comparisons. Complain when a
workgroup name is >15 characters.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
be534c8adf Ensure we use correct length nstrings for workgroup and browser names.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
743560284c fix segfault on empty wins server name registration reply 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
Jeremy Allison
236d6adadf Half-way though the big conversion of all nmbd access to wire elements being
converted to pull/push_ascii. This will not work right at the moment for non
English codepages, but compiles - I will finish the work over the weekend.
Then nmbd should be completely codepage correct.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ecb8057387 Use correct size (17 not 16) when doing a push_ascii(). Ensure that
wins hook is called with unix charset.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
eb79272743 Ensure nmb_namestr() converts back from CH_DOS to CH_UNIX.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
ae452e51b0 metze's autogenerate patch for version.h 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
Alexander Bokovoy
02c5e2fc6f Add support for MSG_SMB_CONF_UPDATED and MSG_SHUTDOWN to all daemons (smbd, nmbd, winbindd). Reviewed by jerry and tridge. 0001-01-01 00:00:00 +00:00
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.
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
Jelmer Vernooij
d817eaf0ec Reverse previous patch from Stefan and me after comments by Andrew Bartlett 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
74d9ecfe2d Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
0001-01-01 00:00:00 +00:00
Gerald Carter
016f6b4e19 fix bug #47; revert registration of workgroup<1b> to 2.2 behavior 0001-01-01 00:00:00 +00:00
Volker Lendecke
eb82daa84a 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
0001-01-01 00:00:00 +00:00
Jeremy Allison
41e3abe8b8 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.
0001-01-01 00:00:00 +00:00
Volker Lendecke
69df898afb Fix a confusing error message
Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
fe637c690b 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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
32fb801ddc Merge the 'safe' parts of my StrnCpy patch - many of the users really wanted
a pstrcpy/fstrcpy or at most a safe_strcpy().

These have the advantage of being compiler-verifiable.

Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server.  (This pushes around const string pointers, rather
than copied strings).

Andrew Bartlett
0001-01-01 00:00:00 +00:00