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

3667 Commits

Author SHA1 Message Date
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
cb5436bcc3 Add const to the get_peer_addr() and get_socket_addr()
calls. Use the IPv6 varient for get_peer_addr().
Jeremy.
(This used to be commit baf1f52e34)
2007-10-11 15:36:13 -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
Jeremy Allison
39d30c5499 Fix valgrind-found memory overwrite.
(This used to be commit 183df4754b)
2007-10-10 17:24:44 -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
Volker Lendecke
0ebab65706 r25534: Apply some const
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
(This used to be commit 0141e64ad4)
2007-10-10 12:31:12 -05:00
Volker Lendecke
4b21570812 r25502: Fix bug 5006
Thanks to Joerg.Bernau at web.de
(This used to be commit 492977016f)
2007-10-10 12:31:10 -05:00
Jelmer Vernooij
bb9f1e5146 r25498: Remove checks that are always true.
(This used to be commit 2f2bdfa0df)
2007-10-10 12:31:10 -05:00
Jeremy Allison
0d87820380 r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal with
the ripple effects this causes. utmp has to change etc. Remove some
global varables and store address/port in the unexpected db.
Jeremy.
(This used to be commit 18c6a2211d)
2007-10-10 12:31:09 -05:00
Jeremy Allison
152a1f4a7d r25391: Fix bug #4978 : Store DOS Attributes fails when copying folders.
Jeremy.
(This used to be commit 713277391a)
2007-10-10 12:31:01 -05:00
Volker Lendecke
aea0d4b9a0 r25327: Normalize the path we return for 'msdfs proxy'
We now accept both \\server\tmp and \server\tmp. There are other places
where this might be necessary, but at least the functionality is a bit
easier now.
(This used to be commit 25cc27df97)
2007-10-10 12:31:00 -05:00
Volker Lendecke
e0402fa870 r25324: Fix "msdfs proxy"
Jeremy, please check!
(This used to be commit d4eddf88d2)
2007-10-10 12:30:59 -05:00
Volker Lendecke
fb7ee0804c r25311: Patch from Heinrich Mislik <Heinrich.Mislik@univie.ac.at> to fix AIX
quotas.

Heinrich, I trust you on that, I don't even have compiled this :-)

Volker
(This used to be commit a8312a1d7b)
2007-10-10 12:30:58 -05:00
Jeremy Allison
e6228e2541 r25309: Volker's fix for bug #4984 - samba4 torture test
to follow. Ensure we don't prepend "./" as a root
directory - this is an invalid pathname for unix_convert().
Jeremy.
(This used to be commit f70ac2e258)
2007-10-10 12:30:58 -05:00
Michael Adam
30fc640057 r25286: Fix one more caller of unistr2_to_ascii() that passed
in -1 for maxlen.

Michael
(This used to be commit cd3d652d0d)
2007-10-10 12:30:57 -05:00
Volker Lendecke
ad97bcf813 r25184: Fix some C++ warnings and an uninitialized variable
(This used to be commit b64df8a3c5)
2007-10-10 12:30:49 -05:00
Jeremy Allison
bb4773e30f r25173: Use the append_buffer version in a loop.
Jeremy.
(This used to be commit 37cf2c2727)
2007-10-10 12:30:48 -05:00
Jeremy Allison
b91b785306 r25167: Fix breakage from mangling rewrite. Use the
new name if unmangling succeeded, not if it
failed. Jerry - please re-test, this should
fix your bug.
Jeremy.
(This used to be commit c215d6e849)
2007-10-10 12:30:47 -05:00
Jeremy Allison
539635cd94 r25163: Fix wrong ctx passed to talloc_asprintf_append().
Found by Metze's code review (thanks Metze !).
Jeremy.
(This used to be commit a7370eea6b)
2007-10-10 12:30:47 -05:00
James Peach
8b6366b301 r25161: Don't panic if setgroups fails in non-root mode.
(This used to be commit ea226c5ed9)
2007-10-10 12:30:46 -05:00
James Peach
45a2713b47 r25142: Panic if setting the group list fails while switching security
contexts. Patch from Tim Prouty <tim.prouty@isilon.com>.
(This used to be commit a136de663f)
2007-10-10 12:30:45 -05:00
Jeremy Allison
dd16ae2506 r25141: More pstring removal.
Jeremy.
(This used to be commit cfcf7cf03e)
2007-10-10 12:30:45 -05:00
Jeremy Allison
eacd314057 r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert().
Jeremy.
(This used to be commit 39c211a702)
2007-10-10 12:30:44 -05:00
Günther Deschner
1a292def31 r25135: Remove one END_PROFILE(SMBntcreateX) from call_nt_transact_create() which
appears to be a leftover. Should fix the build with profiling enabled.

Jeremy, please check.

Guenther
(This used to be commit 98f2e10e3f)
2007-10-10 12:30:43 -05:00
Jeremy Allison
d5c9d87946 r25118: More pstring elimination.
Jeremy.
(This used to be commit 7632f8fb40)
2007-10-10 12:30:41 -05:00
Jeremy Allison
12f61e09d9 r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
(This used to be commit 7f0db75fb0)
2007-10-10 12:30:41 -05:00
Jeremy Allison
3a9d382164 r25111: Move to talloced pathnames on most code paths.
There are now ony 17 pstrings left in reply.c,
and these will be easy to remove (and I'll be
doing that shortly). Had to fix an interesting
bug in pull_ucs2_base_talloc() when a source
string is not null terminated :-).
Jeremy.
(This used to be commit 0c9a8c4dff)
2007-10-10 12:30:41 -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
Jeremy Allison
351eb37a25 r25102: Rewrite msdfs code to use talloced filenames. Passes make test
and make valgrindtest. Final step will be to change srvstr_get_path()
to return talloced memory in the major codepaths.
Jeremy.
(This used to be commit cf6b6f9c3a)
2007-10-10 12:30:40 -05:00
Volker Lendecke
4ee8b2937d r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9a)
2007-10-10 12:30:36 -05:00
Jeremy Allison
62e3caf0fe r25011: We don't use mangle_map any more.
Jeremy.
(This used to be commit 2e0999c1df)
2007-10-10 12:30:33 -05:00
Jeremy Allison
132ee3990a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
(This used to be commit dee8beba7a)
2007-10-10 12:30:32 -05:00
Volker Lendecke
ff0947fbed r24949: Remove some static buffers
(This used to be commit df648d47ff)
2007-10-10 12:30:29 -05:00
Jeremy Allison
dacdde6e5c r24813: Reformat to 80 columns.
Jeremy.
(This used to be commit c6c8f5a897)
2007-10-10 12:30:25 -05:00
Jeremy Allison
3b0422ee01 r24811: Simple reformatting to fit the 80 columns rule.
Jeremy.
(This used to be commit 0cdf046dae)
2007-10-10 12:30:24 -05:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Jeremy Allison
d76e724b10 r24791: Fix logic error in timeout of blocking lock processing found by
Ronnie. If a lock timeout expires, we must check we can get the
lock before responding with failure. Volker is writing a torture test.
Jeremy.
(This used to be commit 45380f356b)
2007-10-10 12:30:22 -05:00
Volker Lendecke
b578db69e9 r24702: Remove the old API pointers
(This used to be commit 17df313db4)
2007-10-10 12:30:14 -05:00
Volker Lendecke
3aed02989f r24699: Actually write 24 zeros instead of zero 24's...
Jeremy, please check ;-)
(This used to be commit 85b64bde7d)
2007-10-10 12:30:14 -05:00
Volker Lendecke
7bd8ad3c92 r24661: Fix some obvious diffs between 3_2 and 3_2_0
Jeremy, there are two remaining diffs in sesssetup.c which I don't really
know which one is right. Can you take a look?

Thanks,

Volker
(This used to be commit d82f354487)
2007-10-10 12:30:13 -05:00
Volker Lendecke
5993ddf240 r24659: Some formatting changes helping to minimize the 3_2_0 diff
(This used to be commit c5caea43af)
2007-10-10 12:30:13 -05:00
Jeremy Allison
f1041f98ce r24639: Add parameter "directory name cache size" - parameterize
use of directory name cache, 100 by default. Will be needed
to turn this off for *BSD systems.
Jeremy.
(This used to be commit bea8e9840f)
2007-10-10 12:30:13 -05:00
Jeremy Allison
a689f6082b r24638: Remove redundent setting of vuid.
Jeremy
(This used to be commit fd682c3f39)
2007-10-10 12:30:12 -05:00
Stefan Metzmacher
8dd00920ef r24621: - deferr calling build_options();exit(0);
- use poptPrintUsage() to give the user more info

metze
(This used to be commit a95d9d1ef9)
2007-10-10 12:30:11 -05:00
Simo Sorce
281931ea77 r24603: In case of error we need to free prefix_cache otherwise on re-init the first
statement will return positively but prefix_cache_hashes would be NULL
(This used to be commit fdc20894a0)
2007-10-10 12:30:10 -05:00
Stefan Metzmacher
2e498b48bb r24599: patch from Karolin Seeger <ks@sernet.de>:
smbd, nmbd and winbindd can be started with invalid options currently.
The first patch attached would be a possible solution.
It contains an exit if an invalid option has been used. The main problem
is, that existing setups with wrong options or missing arguments in start
scripts will break (which is the right behaviour from my point of view).

metze
(This used to be commit 8532e3182a)
2007-10-10 12:30:09 -05:00
Volker Lendecke
a9184f49d3 r24595: Fix Coverity ID 393
In this error case we would have used "start" not having it initialized
(This used to be commit 751834fff9)
2007-10-10 12:30:08 -05:00
Jeremy Allison
644b43d993 r24590: Reformatting to coding standards. Added my (C) in places it already should
have been :-).
Jeremy.
(This used to be commit 41611a22ed)
2007-10-10 12:30:08 -05:00
Jeremy Allison
57e2718e09 r24589: Refactor our vuid code so that we keep the same
vuid that was allocated whilst the connection is
being constructed and after the connection has been set up.
This is what Windows does and at least one client
(and HP printer) depends on this behaviour. As it
depends on the req struct not yet ported to SAMBA_3_2_0
(Volker, hint hint.... :-) I am not yet adding this
to that branch, but will investigate that tomorrow.
Jeremy.
(This used to be commit a54f2805df)
2007-10-10 12:30:08 -05:00
Volker Lendecke
f5ab9ddd76 r24549: Fix unix_convert to return the already converted part
This API will change anyway when moving away from pstrings.

It took so long to fix, because that rename bug I just fixed gave make
test failures that had nothing to do with this one.

I have samba4 tests for both bugs, will check them in when the build
farm has caught up
(This used to be commit d4f442ed9b)
2007-10-10 12:29:56 -05:00