summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_prs.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r24993: Apply some constVolker Lendecke1-3/+3
(This used to be commit 613b9fcd18bcc29bf5313e2287b53b8de430d17e)
2007-10-10r24759: Comment out the _nonnull calls for 3.2.x, as agreed with tridge.Jeremy Allison1-1/+1
Leaving the commented out code for now, in case I need to re-test some stuff. Jeremy (This used to be commit 343be0464342aac14a9592fd73a71b7589ba34d5)
2007-10-10r24410: - I got tricked by function naming. Contrary to what seemed obvious ↵Derrell Lipman1-0/+4
to me, prs_mem_free() is not the function to be called to free memory allocated by prs_alloc_mem(). I've added a comment so others may not get bitten too. - Remove incorrect memory free calls added yesterday to replace SAFE_FREE. The memory is actually now on a talloc context, so gets freed by the caller when that context is freed. We don't need to free it iternally. Derrell (This used to be commit 2fde343150c17959fc970b18e1eb4efde800b4db)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23342: Stop Coverity from getting confused.Jeremy Allison1-0/+3
Jeremy. (This used to be commit 34144c63ad0d776c0b01f6bd3ce378921f2d31cd)
2007-10-10r23080: Fix bug #4637 - we hads missed some cases whereJeremy Allison1-15/+33
we were calling PRS_ALLOC_MEM with zero count. Jeremy. (This used to be commit 9a10736e6fa276ca4b0726fbb7baf0daafbdc46d)
2007-10-10r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branchesGerald Carter1-1/+1
(This used to be commit f65214be68c1a59d9598bfb9f3b19e71cc3fa07b)
2007-10-10r22564: Move the _strict -> _zeronull functions into lib/util.cJeremy Allison1-1/+1
and out of talloc at tridge's request. Jeremy. (This used to be commit da78488b86c464b6861d36398cca7524ad5906fe)
2007-10-10r22542: Move over to using the _strict varients of the tallocJeremy Allison1-3/+3
calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
2007-10-10r22163: Pure reformatting. I hate 4 space tabstops :-).Jeremy Allison1-15/+15
Jeremy. (This used to be commit 99abe96b2b8e41e4c7536d35cc169f7e6c3eba1c)
2007-10-10r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher1-2/+2
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
2007-10-10r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher1-8/+8
which matches what samba4 has. also fix all the callers to prevent compiler warnings metze (This used to be commit fa322f0cc9c26a9537ba3f0a7d4e4a25941317e7)
2007-10-10r21987: split tdb_prs_*() functions in version which take a keystr and a ↵Stefan Metzmacher1-8/+16
TDB_DATA key metze (This used to be commit 724c6fa337bb535e1b97d0452c2489f58339a3bf)
2007-10-10r19288: tdb_prs_store is right now used to store printer and share securityVolker Lendecke1-1/+1
descriptors. Both databases are long-lived and not frequently written, so I think storing it deserves a tdb transaction. Volker (This used to be commit 2d4b5f5727104f87b8282fc0e94675b0dc4cd9d8)
2007-10-10r18393: get the data size and not offset when initializing a data blob from ↵Gerald Carter1-1/+4
a prs structure (This used to be commit 878fd68dfcb237f5332efcf48a3891abcc9ad53c)
2007-10-10r18029: More C++ stuffVolker Lendecke1-1/+1
(This used to be commit 089b51e28cc5e3674e4edf5464c7a15673c5ec0f)
2007-10-10r17316: More C++ warnings -- 456 leftVolker Lendecke1-6/+7
(This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-1/+31
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16365: Fix Klocwork #895, #898, #899, #915, #932, #938 and aJeremy Allison1-1/+2
few other problems Klocwork missed. Jeremy. (This used to be commit fe05769a1a85f924c67be7e5dcee4871a86948d7)
2007-10-10r14643: Merge dcerpc_errstr from Samba 4.Günther Deschner1-0/+31
Might need to rework prs_dcerpc_status(). Guenther (This used to be commit 38b18f428ba941f4d9a14fa2de45cb0cd793a754)
2007-10-10r14146: Just some typos.Günther Deschner1-2/+2
Guenther (This used to be commit ade86cc787e266850fee982b008a9caf2c8ed7e7)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-19/+20
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 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13585: Sorry Gunther, had to revert this. It's got a bufferJeremy Allison1-43/+0
overrun. Spoke to Jerry about the correct fix. Will add this after. Jeremy. (This used to be commit 33e13aabd3825c59d15dc897536e2ccf8c8f6d5e)
2007-10-10r13581: Correctly parse a non-null terminated, little-endian UCS2 string in theGünther Deschner1-0/+43
PAC_LOGON_NAME structure. This was broken on big-endian machines (Solaris SPARC and ppc). Fixes Bug #3330. Jerry, this should be in 3.0.21c. Guenther (This used to be commit 9732490811f8f02ee547ddc6e2694e1122a3a518)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-0/+29
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r12043: It's amazing the warnings you find when compiling on a 64-bitJeremy Allison1-0/+29
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. (This used to be commit c65b752604f8f58abc4e7ae8514dc2c7f086271c)
2007-10-10r11446: Remove unused fn. Remove unneeded strncpy use.Jeremy Allison1-26/+0
Jeremy. (This used to be commit d202aae3c821f3d78ff063d867bac1f84dca3548)
2007-10-10r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison1-1/+1
x86_64 box. Jeremy. (This used to be commit d720867a788c735e56d53d63265255830ec21208)
2007-10-10r10720: Add helper function that does prs alignment on a specified number of ↵Jelmer Vernooij1-0/+18
bytes. (This used to be commit 4576e6843b67c5919823307a196b1582b78fdeaf)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-66/+80
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r9935: Make it easier to find overruns.Jeremy Allison1-2/+4
Jeremy. (This used to be commit e68872d1473ea0557fac1072055a6ed21e5b3d82)
2007-10-10r7415: * big change -- volker's new async winbindd from trunkGerald Carter1-0/+26
(This used to be commit a0ac9a8ffd4af31a0ebc423b4acbb2f043d865b8)
2007-10-10r6595: This is Volkers new-talloc patch. Just got the go-ahead fromJeremy Allison1-5/+1
Volker to commit. Woo Hoo ! Jeremy. (This used to be commit 316df944a456f150944761dab34add5e8c4ab699)
2007-10-10r6014: rather large change set....Gerald Carter1-39/+42
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). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
2007-10-10r5805: merging spoolss parsing changes from trunk and cleaning up resulting ↵Gerald Carter1-0/+28
segvs (This used to be commit 25121547caaaed0d60f4db7458570c14e7d21b2a)
2007-10-10r4601: Removed any use of the MAX_XXX_STR style definitions. A little largerJeremy Allison1-24/+33
change than I'd hoped for due to formating changes to tidy up code. Jeremy. (This used to be commit a348f9221a9fe719dc6f0db6eb295575c2f95e1e)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-15/+22
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r1492: Rework our random number generation system.Andrew Bartlett1-1/+1
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork(). For other systems, we now only re-seed after a fork, and on startup. No need to do it per-operation. This removes the 'need_reseed' parameter from generate_random_buffer(). Andrew Bartlett (This used to be commit 36741d3cf53a7bd17d361251f2bb50851cdb035f)
2007-10-10r1202: This hopefully fixes our memory use when unmarshalling strings. The ↵Volker Lendecke1-1/+4
test case was 'rpcclient -c "enumprinters 2"' with 4000 printers. At some point this completely exploded in memory usage. For every string we talloc'ed memory up to the end of the buffer. -> O(n^2). This survives valgrind with this number of printers. It might also have influence on winbind with a large number of users. All those who dare to look at samba3 rpc code, could you please take a look? I know this is a burden, but I would like comments ;-))) Volker (This used to be commit af251f4ea63c584604972e1c8add83e65046de80)
2004-01-14source/rpc_parse/parse_prs.c ZERO_STRUCTP(ps) not needed as it is doneHerb Lewis1-1/+0
in prs_init now testsuite/printing/psec.c cannot do a prs_mem_free() when tdb_prs_fetch fails as the prs structure has not been initialized (This used to be commit a363e5d8c549861329506bd87c11d82ace5520e5)
2004-01-09fix some warnings from the Sun compilerGerald Carter1-4/+4
(This used to be commit ebabf72a78f0165521268b73e0fcabe1ea7834fd)
2003-11-03Fix some uninitialised variable warnings.Tim Potter1-2/+2
(This used to be commit 68945027b5dc6b5e1aee13e4df4d11a34e42a3a9)
2003-10-01commit sign only patch from Andrew; bug 167; tested using 2k & XP ↵Gerald Carter1-60/+87
clientspreviously joined to the Samba domain (This used to be commit 3802f5895ee18507c6f467bd11db0b1147a6fdfd)
2003-08-15get rid of more compiler warningsHerb Lewis1-7/+7
(This used to be commit 398bd14fc6e2f8ab2f34211270e179b8928a6669)
2003-08-12Fix commentAndrew Bartlett1-1/+1
(This used to be commit 024d32f79390210bee6da8e75c228a4aaa7fe6b0)
2003-07-25More printf portability fixes. Got caught out by some gcc'isms lastTim Potter1-2/+2
time. )-: (This used to be commit 59dae1da66a5eb7e128263bd578f167d8746e9f0)
2003-07-24More printf fixes - size_t is long on some architectures.Tim Potter1-2/+2
(This used to be commit ba4d334b822248d8ab929c9568533431603d967e)
2003-07-14Jeremy requested that I get my NTLMSSP patch into CVS. He didn't requestAndrew Bartlett1-95/+175
the schannel code, but I've included that anyway. :-) This patch revives the client-side NTLMSSP support for RPC named pipes in Samba, and cleans up the client and server schannel code. The use of the new code is enabled by the 'sign', 'seal' and 'schannel' commands in rpcclient. The aim was to prove that our separate NTLMSSP client library actually implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation, in the hope that knowing this will assist us in correctly implementing NTLMSSP signing for SMB packets. (Still not yet functional) This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with calls to libsmb/ntlmssp.c. In the process, we have gained the ability to use the more secure NT password, and the ability to sign-only, instead of having to seal the pipe connection. (Previously we were limited to sealing, and could only use the LM-password derived key). Our new client-side NTLMSSP code also needed alteration to cope with our comparatively simple server-side implementation. A future step is to replace it with calls to the same NTLMSSP library. Also included in this patch is the schannel 'sign only' patch I submitted to the team earlier. While not enabled (and not functional, at this stage) the work in this patch makes the code paths *much* easier to follow. I have also included similar hooks in rpccleint to allow the use of schannel on *any* pipe. rpcclient now defaults to not using schannel (or any other extra per-pipe authenticiation) for any connection. The 'schannel' command enables schannel for all pipes until disabled. This code is also much more secure than the previous code, as changes to our cli_pipe routines ensure that the authentication footer cannot be removed by an attacker, and more error states are correctly handled. (The same needs to be done to our server) Andrew Bartlett (This used to be commit 5472ddc9eaf4e79c5b2e1c8ee8c7f190dc285f19)
2003-05-26This fixes net rpc vampire when talking to win2k (<sp3). win2k sendsTim Potter1-4/+4
back a different sized blob of encrypted password data then we were expecting. There's an extra 32 bytes of unknown stuff. (This used to be commit 285952fd626b02362fb6732f90c5a3ce0d2d5ae0)