1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-21 03:17:08 +03:00

154 Commits

Author SHA1 Message Date
Günther Deschner
c396f45e7d Move policy_handle_is_valid out of parse_lsa.c
Guenther
2008-02-17 03:10:21 +01:00
Jeremy Allison
f9c8d62389 Make strhex_to_str clear on string limits. Remove pstring from web/*.c
Jeremy.
2007-12-03 17:17:05 -08:00
Jeremy Allison
04aecde5cf Make init_unistr2_from_unistr take an explicit talloc context.
Make init_unistr() re-use rpcstr_push_talloc().
Jeremy.
2007-11-27 17:48:44 -08:00
Jeremy Allison
f35a266b3c 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.
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Volker Lendecke
6585ea2cb7 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
2007-10-10 12:30:24 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Volker Lendecke
123290d094 r23091: Add rpccli_netlogon_sam_network_logon_ex, fix its parsing. This does not
use the credential chain and only works over netlogon, but it would
allow multiple outstanding auth requests for a single workstation
account.
2007-10-10 12:22:44 -05:00
Jeremy Allison
c73963a60a r22676: Fix zero alloc with create_rpc_blob().
Jeremy.
2007-10-10 12:19:54 -05:00
Jeremy Allison
c622fb8536 r22585: Get us into a consistent state with TALLOC_ZERO_ARRAY also.
Jeremy.
2007-10-10 12:19:47 -05:00
Jeremy Allison
f6fa3080fe r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
2007-10-10 12:19:44 -05:00
Jelmer Vernooij
ef10672399 r18802: Use the pidl-generated code for the srvsvc interface, both client and server code.
This has had some basic testing. I'll do more during the next couple of days and hopefully also
make RPC-SRVSVC from Samba4 pass against it.
2007-10-10 12:00:59 -05:00
Jelmer Vernooij
5de76767e8 r18654: Rename "struct uuid" => "struct GUID" for consistency. 2007-10-10 11:52:19 -05:00
Volker Lendecke
2ab0ab3262 r18598: Add marshalling support to smb_io_time.
Volker
2007-10-10 11:51:59 -05:00
Gerald Carter
2b37079af2 r18404: * swap from POLICY_HND to the struct policy_handle from ndr/misc.h
* move OUR_HANDLE macro to include/rpc_misc.h
2007-10-10 11:51:22 -05:00
Jelmer Vernooij
1115745cae r18188: merge 3.0-libndr branch 2007-10-10 11:43:56 -05:00
Volker Lendecke
1e4ee728df r17316: More C++ warnings -- 456 left 2007-10-10 11:38:25 -05:00
Volker Lendecke
e35f901067 r16362: That's the best way to fix a Klocwork bug: Remove the (unused...;-) code
altogether. This was essentially a second implementation if string_to_sid.

Klocwork ID 1038

Volker
2007-10-10 11:18:49 -05:00
Jeremy Allison
ee77dde9b6 r16299: Fix another "dereferencing type-punned pointer will break
strict-aliasing rules" gcc4 warning.
Jeremy.
2007-10-10 11:17:32 -05:00
Jeremy Allison
4c126ef65d r14770: Fix coverity bug #257. Possible null deref.
Jeremy.
2007-10-10 11:15:47 -05:00
Jeremy Allison
f65d7afe19 r14387: Try and fix the coverity issues (#53, #54) with negative
sink by ensuring all uses of rpcstr_push are consistent
with a size_t dest size arg.
Jeremy.
2007-10-10 11:15:27 -05:00
Jeremy Allison
666d427c6e r14219: Fix coverity #135. Don't deref a ptr if it can be NULL.
Jeremy.
2007-10-10 11:15:17 -05:00
Jeremy Allison
fb1a607332 r14045: Coverity fix #14. Ensure if len is set buf != NULL.
Jeremy.
2007-10-10 11:11:07 -05:00
Jeremy Allison
305a774d28 r13802: I *knew* ASU on sparc had to be good for *something* ! :-).
Fix incorrect size understanding of sid name type (yes it's
already correct in the Samba4 IDL :-).
Jeremy.
2007-10-10 11:10:54 -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
Jeremy Allison
2274709587 r13455: Prepare to add lookupnames2.
Jeremy.
2007-10-10 11:10:04 -05:00
Jeremy Allison
9437ffc84f r13439: Fix NET_SAM_LOGON_EX.
Jeremy.
2007-10-10 11:10:02 -05:00
Gerald Carter
f10aa9fb84 r10781: merging eventlog and svcctl code from trunk 2007-10-10 11:04:53 -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
Jeremy Allison
99937d99b6 r8553: Another compile warning fix from jason@ncac.gwu.edu.
Jeremy.
2007-10-10 11:00:08 -05:00
Gerald Carter
560ce111ce r7563: svcctl patches from Marcin; have cleaned up formating and am checking the code in to snapshot it before I start changing more things 2007-10-10 10:57:14 -05:00
Gerald Carter
81ffb0dbbb r6942: * merging the registry changes back to the 3.0 tree
* removing the testprns tool
2007-10-10 10:56:57 -05:00
Gerald Carter
28d433351c r6232: more cleanups; remove BUFFER3; rename BUFFER4 -> RPC_DATA_BLOB; rename REG_CREATE_VALE -> REG_SET_VALUE 2007-10-10 10:56:30 -05:00
Gerald Carter
efb3ac4c69 r6228: remove BUFHDR2 and clean up LsaEnumTrustedDomains()
Tested client and server code.
2007-10-10 10:56:30 -05:00
Gerald Carter
0e29dc8aa3 r6071: * clean up UNISTR2_ARRAY ( really just an array of UNISTR4 + count )
* add some backwards compatibility to 'net rpc rights list'
* verify privilege name in 'net rpc rights privileges <name>' in order
  to give back better error messages.
2007-10-10 10:56:20 -05:00
Gerald Carter
4e0ac63c36 r6014: rather large change set....
pulling back all recent rpc changes from trunk into
3.0.  I've tested a compile and so don't think I've missed
any files.  But if so, just mail me and I'll clean backup
in a couple of hours.

Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.

I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
2007-10-10 10:56:15 -05:00
Gerald Carter
25121547ca r5805: merging spoolss parsing changes from trunk and cleaning up resulting segvs 2007-10-10 10:56:01 -05:00
Gerald Carter
9a29bef056 r4668: allow the caller to invoke init_unistr2() with a NULL buffer to match previous behavior; more checks to come tomorrow 2007-10-10 10:53:51 -05:00
Jeremy Allison
a348f9221a r4601: Removed any use of the MAX_XXX_STR style definitions. A little larger
change than I'd hoped for due to formating changes to tidy up code.
Jeremy.
2007-10-10 10:53:49 -05:00
Günther Deschner
721bf50d74 r4287: Vampire SAM_DELTA_DOMAIN_INFO.
Based on samba4-idl. The decoding of account-lockout-string is somewhat
experimental though.

Guenther
2007-10-10 10:53:41 -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
b926480d05 r4005: Fix for bug #2071 reported by Jason Mader <jason@ncac.gwu.edu>.
Use correct enum type for comparisons.
Jeremy.
2007-10-10 10:53:27 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Andrew Bartlett
fcdc5efb1e Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
-
Gerald Carter
c6594e3557 Fix UNISTR2 length bug in LsaQueryInfo(3) that cause SID resolution to fail on local files on on domain members; bug 875 -
Jeremy Allison
703b1b76e2 Fix from Andrew Bartlett to fix up the munged-dial problem.
Jeremy.
-
Gerald Carter
ccd5665a65 fix crash bug due to empyrt munged dial string; patch from metze -
Jeremy Allison
e591854eda Handle munged dial string. Patch from Aur?lien Degr?mont <adegremont@idealx.com>with memory leak fixes by me.
Jeremy.
-