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

2965 Commits

Author SHA1 Message Date
Günther Deschner
314cb03db1 r25396: Very obvious fix from Martin Zielinski.
Guenther
(This used to be commit 1f0d05807b)
2007-10-10 12:31:02 -05:00
Günther Deschner
f0653fd572 r25326: Free the context from the talloc_stackframe.
Guenther
(This used to be commit 0719835c4d)
2007-10-10 12:31:00 -05:00
Volker Lendecke
33fd077575 r25323: Fix the build
(This used to be commit e55b30ab84)
2007-10-10 12:30:59 -05:00
Jeremy Allison
3f2939cc16 r25277: Belt-and-braces approach to Volker's fix for RPC-SAMBA3-GETUSERNAME.
If we promise dest is null terminated, ensure we do it even on
fast path exits.
Jeremy.
(This used to be commit 32626e2b97)
2007-10-10 12:30:57 -05:00
Volker Lendecke
7cbcb5f8c5 r25274: Attempt to fix RPC-SAMBA3-GETUSERNAME
(This used to be commit f6f64cf0b5)
2007-10-10 12:30:56 -05:00
Michael Adam
2bb7ebdcb7 r25258: Fix a panic message and remove superfluous return after the call to smb_panic().
Michael
(This used to be commit 8b5c34b7d1)
2007-10-10 12:30:55 -05:00
Günther Deschner
c6fab06902 r25257: When dumping eventlist, display full timestring.
Guenther
(This used to be commit 38eca60913)
2007-10-10 12:30:55 -05:00
Stefan Metzmacher
cdf9068269 r25252: move macro defines to the end of replace.h
and move the include location sys/param.h
before we redefine missing macros

metze
(This used to be commit 862046028c)
2007-10-10 12:30:55 -05:00
Jeremy Allison
934b92f5d0 r25238: Make the error returns from the string functions
always consistent. Return -1 on error, and ensure
we check for this. In cases where the dest is already
specified and we've been asked to terminate with a
null, ensure we always do so even on error.
Jeremy.
(This used to be commit abedd96786)
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
68edc3a5c5 r25232: sync lib/replace with SAMBA_4_0
metze
(This used to be commit 828d2ca061)
2007-10-10 12:30:52 -05:00
Stefan Metzmacher
10cb1b87ed r25230: sync lib/talloc with SAMBA_4_0
metze
(This used to be commit 84ebb6cac2)
2007-10-10 12:30:52 -05:00
Jeremy Allison
3d5f029ead r25222: Fix last assumptions that (size_t)-1 can be used
as a special dest_len of sizeof(pstring).
Jeremy.
(This used to be commit 9fc14c83cc)
2007-10-10 12:30:51 -05:00
Jeremy Allison
38ffbd2893 r25199: Remove pstring from strdup_upper - make it the
same as talloc_strdup_upper.
Jeremy.
(This used to be commit db1b629377)
2007-10-10 12:30:51 -05:00
Jeremy Allison
4f051e735b r25195: Fix issue with calling pull_uc2_*alloc with
str_len == 0. We should just return 0 in this
case.
Jeremy.
(This used to be commit 8bb85f3f14)
2007-10-10 12:30:50 -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
2548e43164 r25172: Remove commented out code we will never enable.
Jeremy.
(This used to be commit 6032fbc358)
2007-10-10 12:30:48 -05:00
Jeremy Allison
db31df8186 r25171: More pstring removal.
Jeremy.
(This used to be commit 4748d26397)
2007-10-10 12:30:48 -05:00
Jeremy Allison
3aaca8028e r25170: Remove pstring limits from ms_fnmatch and module load.
Jeremy.
(This used to be commit 764574ee05)
2007-10-10 12:30:48 -05:00
Jeremy Allison
47107b2cde r25164: Add talloc_asprintf_append_buffer() and the docs for it.
Jeremy.
(This used to be commit 2243a73d65)
2007-10-10 12:30:47 -05:00
Stefan Metzmacher
b6514d02ec r25150: don't recursivly call call dump_core()
as currently seen in 'make test' localy and in the farm

metze
(This used to be commit f41efe01b5)
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
Jeremy Allison
d0de93ca76 r25136: When tallocing a string to uppercase remember the terminating
'\0' in size calculations.
Jeremy.
(This used to be commit 54c658867d)
2007-10-10 12:30:43 -05:00
Jeremy Allison
af3de3fa71 r25121: Remove pstring limits from much of our string handling function.
Still a few left (mainly the substitute ones).
Jeremy.
(This used to be commit 6552e52979)
2007-10-10 12:30:42 -05:00
Jeremy Allison
6716382ec9 r25120: One more warning.
Jeremy.
(This used to be commit 9cc70e3ccf)
2007-10-10 12:30:42 -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
4754b0ec65 r25116: Fix talloc_asprintf_append to do the right thing with
truncated strings.
Jeremy.
(This used to be commit 93c42fd9b5)
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
Volker Lendecke
bbbac99ecb r25061: Pro-actively shut up Coverity :-)
(This used to be commit f2ce4a803c)
2007-10-10 12:30:37 -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
Volker Lendecke
54d3c7f61d r25040: Add "net sam rights"
Not strictly in the SAM, but close enough. This command acts directly on
the local tdb, no running smbd required

This also changes the root-only check to a warning
(This used to be commit 0c5657b5ef)
2007-10-10 12:30:36 -05:00
Volker Lendecke
de708c344a r25025: Remove an unused function
(This used to be commit 858f7b7d78)
2007-10-10 12:30:35 -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
8401971a87 r24993: Apply some const
(This used to be commit 613b9fcd18)
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
Volker Lendecke
3bcf187a0d r24903: One more tick in #if 0 code
(This used to be commit e0b4fb55e3)
2007-10-10 12:30:29 -05:00
Volker Lendecke
2800362e3f r24902: DEBUG might use talloc_tos() itself...
(This used to be commit 1b39374a17)
2007-10-10 12:30:28 -05:00
Michael Adam
60abd094fa r24877: Don't panic in tdb validation code when the fork or waitpid fails.
Return error instead.

Michael
(This used to be commit 9b25355dd6)
2007-10-10 12:30:28 -05:00
Michael Adam
57ac659fb6 r24848: Make tdb_validate() take an open tdb handle instead of a file name.
A new wrapper tdb_validate_open() takes a filename an opens and closes
the tdb before and after calling tdb_validate() respectively.

winbindd_validata_cache_nobackup() now dynamically calls one of
the above functions depending on whether the cache tdb has already
been opened or not.

Michael
(This used to be commit dc0b08e659)
2007-10-10 12:30:27 -05:00
Michael Adam
f02f8563a2 r24847: Change standard failure return code of tdb_validate from "-1" to "1".
(This is more safely used with casts from int to uint8, e.g.)

Michael
(This used to be commit cb3583b392)
2007-10-10 12:30:27 -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
Volker Lendecke
a116d7c7d9 r24773: Fix a ctdb connection lockup
The lockup could happen when packet_read_sync() gets two packets in a row, the
first one being an async message, and the second one being the response to a
ctdb request.

Also add some debug msg to ctdb_conn.c, and cut off the "locking key" messages
to only dump 20 hex chars at debug level 10. >10 will dump everything.
(This used to be commit 0a55880a24)
2007-10-10 12:30:20 -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
Volker Lendecke
4b6713e7cc r24744: Increase length by what we got from recv, not from ioctl
(This used to be commit 23c8f4f74b)
2007-10-10 12:30:17 -05:00
Günther Deschner
068d95cde1 r24743: Fix build warning.
Guenther
(This used to be commit 579fb55b75)
2007-10-10 12:30:17 -05:00
Günther Deschner
84bce05e71 r24742: Add experimental DsGetDcName() call (will be used by krb5 locator for fine
grained KDC DNS queries).

Guenther
(This used to be commit 3263cd680f)
2007-10-10 12:30:16 -05:00
Michael Adam
c7489a5d96 r24738: Fix one more use of pwrite in tdb code in the spirit of r23972 and r23977.
Michael
(This used to be commit a3506f291a)
2007-10-10 12:30:16 -05:00
Günther Deschner
2af9637925 r24733: Add support for storing DATA_BLOBs in gencache.tdb (including torturetest).
Mimir, please have a look. DATA_BLOBs will now just show up as "DATA_BLOB"
values with "net cache list".

Guenther
(This used to be commit b8ad546d04)
2007-10-10 12:30:15 -05:00
Stefan Metzmacher
3b29c9cbed r24627: merge from SAMBA_4_0:
as TALLOC_ABORT() is defined to abort() by default
wrap it into a function so that the function name
in the backtrace shows what happens.

metze
(This used to be commit ddbe971030)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
faab8dba02 r24618: move printing out the version string and exit()
into the popt _POST processing.

Now 'smbd -V --bla' complains about an unknown option

metze
(This used to be commit c115de4bea)
2007-10-10 12:30:11 -05:00
Michael Adam
f71a4fa3af r24610: Add a debug message that the workaround has been activated...
(This used to be commit a12f3bf6e9)
2007-10-10 12:30:10 -05:00