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

116 Commits

Author SHA1 Message Date
Volker Lendecke
31f157a04b Move 128 bytes from the data to the text segment 2008-12-14 13:13:37 +01:00
Volker Lendecke
8637dd1232 change CHECK_READ to use smb_request instead of inbuf 2008-11-08 10:42:28 +01:00
Volker Lendecke
af7cf4f992 Remove some direct inbuf references by adding smbreq_bufrem 2008-11-02 09:22:40 +01:00
Jelmer Vernooij
4b74b22c4d Remove IS_DOT and IS_DOTDOT macros, already provided by libreplace or
the system.
2008-11-01 20:46:04 +01:00
Jelmer Vernooij
e5081d6dad Move ABS() to libutil. 2008-11-01 20:44:12 +01:00
Jelmer Vernooij
9de80e7abc Samba3: Include util.h header file rather than having custom prototypes. 2008-11-01 03:14:43 +01:00
Volker Lendecke
be63f86ce7 Remove unused CHECK_FSP macro 2008-10-08 13:01:22 +02:00
Volker Lendecke
52664f62ba Remove current_user references from trans2.c
This involved replacing the CHECK_NTQUOTA_HANDLE_OK macro by a function.
(This used to be commit 5595cdf837)
2008-06-19 18:51:38 +02:00
Günther Deschner
6c6c89cde0 IDL: build generated nbt code.
Guenther
(This used to be commit 554dcfdab0)
2008-04-17 14:55:15 +02:00
Karolin Seeger
e1b32594c7 Remove smbmount.
Karolin
(This used to be commit 5fbd98f706)
2008-02-28 15:53:43 +01:00
Jeremy Allison
980ac09849 Fixup hot paths - add macro for toupper (c < 0x80).
This now matches 3.0.x on my micro-tests.
Jeremy.
(This used to be commit 329b924cba)
2008-01-09 17:32:26 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Jeremy Allison
329365684b Change the client library to write directly out of
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
(This used to be commit 81ca5853b2)
2007-11-02 12:21:34 -07: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
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Jeremy Allison
327ca9167e r25103: Ensure we don't return unwritten memory (valgrind caught).
Jeremy.
(This used to be commit b3f0d39d11)
2007-10-10 12:30:40 -05:00
Volker Lendecke
941a783f1a r24803: For some funny reason us4/gcc seems to fall over the '
(This used to be commit 08e309e955)
2007-10-10 12:30:22 -05:00
Jeremy Allison
d17f87e283 r24762: Fix the build, missed TALLOC_SIZE -> talloc_named_const.
Jeremy.
(This used to be commit e2d924248e)
2007-10-10 12:30:18 -05:00
Jeremy Allison
7b24eb65a0 r24759: Comment out the _nonnull calls for 3.2.x, as agreed with tridge.
Leaving the commented out code for now, in case I need to re-test
some stuff.
Jeremy
(This used to be commit 343be04643)
2007-10-10 12:30:18 -05:00
Jeremy Allison
3dd3c4cd01 r24464: Now Volker removed the readbmpx we don't need cached errors any more.
Jeremy.
(This used to be commit 9256ec0a20)
2007-10-10 12:29:50 -05:00
Stefan Metzmacher
a5f412f305 r24311: add a reply_force_nterror() macro
metze
(This used to be commit b9ae00f498)
2007-10-10 12:29:27 -05:00
Volker Lendecke
4392d47b34 r24078: Add reply_unixerror
(This used to be commit 10ac991750)
2007-10-10 12:29:02 -05:00
Volker Lendecke
cc6a41017c r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
The complete history of this patch can be found under
http://www.samba.org/~vlendec/inbuf-checkin/.

Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only
checking into 3_2 at the moment, as it currently will slow down operations for
all non-converted (i.e. all at this moment) operations, as it will copy the
talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort
to convert everything necessary for the normal operations an XP box does.

I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More
to come, but I would appreciate some help here.

Volker
(This used to be commit 5594af2b20)
2007-10-10 12:28:53 -05: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
James Peach
b1ce226af8 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2)
2007-10-10 12:23:23 -05:00
Jeremy Allison
32106b2395 r22920: Add in the UNIX capability for 24-bit readX, as discussed
with the Apple guys and Linux kernel guys. Still looking
at how to do writeX as there's no recvfile().
Jeremy.
(This used to be commit a53268fb20)
2007-10-10 12:22:08 -05:00
Gerald Carter
d34f6bb969 r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branches
(This used to be commit f65214be68)
2007-10-10 12:22:02 -05:00
Jeremy Allison
4ab6a8ebb7 r22564: Move the _strict -> _zeronull functions into lib/util.c
and out of talloc at tridge's request.
Jeremy.
(This used to be commit da78488b86)
2007-10-10 12:19:45 -05:00
Jeremy Allison
0fbbf8440a r22543: Fix bad call to talloc_strict (too few args).
Should fix build farm breakage.
Jeremy.
(This used to be commit efb43432b0)
2007-10-10 12:19:44 -05:00
Jeremy Allison
12ba88574b r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
(This used to be commit f6fa3080fe)
2007-10-10 12:19:44 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Stefan Metzmacher
a8c6250274 r22298: move ZERO_*, ARRAY_SIZE and PTR_DIFF macros into libreplace
metze
(This used to be commit 8a7d2e633b)
2007-10-10 12:19:24 -05:00
Stefan Metzmacher
e9623ecb24 r22277: __location__ is defined in libreplace now
metze
(This used to be commit 9b45075a26)
2007-10-10 12:19:24 -05:00
Gerald Carter
56c1d7e507 r21525: Go ahead and checkin the mlock() & memalign() fixes so
others don't get stuck with the winbindd hang.
Still waiting on additional confirmation from Guenther
that this fixes thes issues he was observing as well.
But it's been running in my local tree for a day without
problems.
(This used to be commit 0d2b80c6c4)
2007-10-10 12:18:10 -05:00
Herb Lewis
791f48f167 r20124: clean up nested extern declaration warnings
(This used to be commit ac3eb7813e)
2007-10-10 12:16:26 -05:00
Volker Lendecke
e23781b3b3 r17316: More C++ warnings -- 456 left
(This used to be commit 1e4ee728df)
2007-10-10 11:38:25 -05:00
Jeremy Allison
fbdcf2663b 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.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
James Peach
40d0707827 r14668: Set the FILE_STATUS_OFFLINE bit by observing the events a DMAPI-based
HSM is interested in. Tested on both IRIX and SLES9.
(This used to be commit 514a767c57)
2007-10-10 11:15:42 -05:00
Jeremy Allison
71272fc441 r13975: Re-fix Coverity #156 - I had left the hidden arg. inconsistent
between Realloc and realloc_array.
Jeremy.
(This used to be commit 841c9b1847)
2007-10-10 11:11:02 -05:00
Jeremy Allison
894358a8f3 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
(This used to be commit 1d710d06a2)
2007-10-10 11:10:59 -05:00
Günther Deschner
513e81458f r9945: fix typos.
Guenther
(This used to be commit 12029e9022)
2007-10-10 11:03:28 -05:00
Gerald Carter
44707ad2e0 r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to use
the new talloc() features:

 Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d
 since the methods use the object pointer as the talloc context for
 internal private data.

 There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
 pair of functions.  Simply TALLOC_ZERO_P() and TALLOC_FREE() the
 object.

Also had to convert the printer_info_2->NT_PRINTER_DATA field
to be talloc()'d as well.  This is just a stop on the road to
cleaning up the printer memory management.
(This used to be commit ef721333ab)
2007-10-10 11:03:25 -05:00
Jeremy Allison
af8a691db1 r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
(This used to be commit c7fe18761e)
2007-10-10 10:58:18 -05:00
Jeremy Allison
ed5e7ff9f1 r7200: Don't use memset, use SET_STAT_INVALID (has the same effect).
Jeremy.
(This used to be commit 0b6f87d5e1)
2007-10-10 10:57:05 -05:00
Gerald Carter
f24d88cf9d r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241)
2007-10-10 10:57:02 -05:00
Jeremy Allison
526351bed9 r6613: Merge back fix for PARANOID_MALLOC checker.
Jeremy.
(This used to be commit 9c8d0efbfd)
2007-10-10 10:56:46 -05:00
Jeremy Allison
7b9d6ac23e r6595: This is Volkers new-talloc patch. Just got the go-ahead from
Volker to commit. Woo Hoo !
Jeremy.
(This used to be commit 316df944a4)
2007-10-10 10:56:46 -05:00
Jeremy Allison
431a28a315 r6548: Fix bug #2622 - remove DPTR_MASK as it makes no sense.
Jeremy.
(This used to be commit 927681c8c4)
2007-10-10 10:56:44 -05:00