summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_reg.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-17reverted this patch till I sort out the craziness with UNIHDRAndrew Tridgell1-9/+9
(This used to be commit e3d00fa47d38cd214f5e350e1d6b30d90ed8a52c)
2003-01-17This removes the 3rd argument from init_unistr2(). There were 240Andrew Tridgell1-9/+9
calls to init_unistr2() in the code and every one of them got the 3rd argument incorrect, so I thought it best just to remove the argument. The incorrect usage was caused by callers using strlen() to determine the length of the string. The 3rd argument to init_unistr2() was supposed to be the character length, not the byte length of the string, so for non-english this could come out wrong. I also removed the bogus 'always allocate at least 256 bytes' hack. There may be some code that relies on this, but if there is then the code is broken and needs fixing. (This used to be commit b9eff31b1433c81fbff733e194914a40f25e3bda)
2003-01-13Fix typo, and the build.Andrew Bartlett1-1/+1
(This used to be commit d7452e73b511ceaebfaed66c18e7c61cbe0289d2)
2003-01-13Make sure that those cleanups actually went in.Richard Sharpe1-2/+2
(This used to be commit 9a38e378115a1c36d0cd7c41f4c5767c23b4eb3f)
2003-01-02BIG patch...Andrew Bartlett1-40/+40
This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2002-12-30the shutdown call does not have a 16 bit flags, but 2 byte representing booleansSimo Sorce1-4/+8
this commit change the structure and code to reflect this some test revelead I'm right. some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation (This used to be commit c5892b656dedd0367adc33d9606311d1dde99a58)
2002-08-31Avoid writing unitialised bytes to the wire (and consequent valgrind warnings)Andrew Bartlett1-1/+5
by zeroing them out if they don't have meaning. Andrew Bartlett (This used to be commit 52db44b5c01e16923393b0ec9a8d0f530be7bb2d)
2002-08-30fix up print portion of registry. Merge from APP_HEAD.Gerald Carter1-72/+2
(This used to be commit ec37633548ed329c05b93499f75883d987b78f1e)
2002-08-30merge of phant0m key fix from APP_HEADGerald Carter1-2/+6
(This used to be commit cb13d334a53f27713665570d85607d57eb407f9f)
2002-08-05Spelling fix.Tim Potter1-1/+1
(This used to be commit 28ba237a9e02e284fb541562270db758612e425a)
2002-07-29add another registry rpc (opnum 0x14). Have no idea what it's real nameGerald Carter1-4/+56
is. I'm calling it REG_SAVE_KEY, because 2k preps a regedt32.exe Registry->Save Key with this call. Done in the process of tracking down a PrinterDriverData issue. (This used to be commit 66104a361424f10cc986c597b91afa6f12b3cd8a)
2002-07-263 things:Gerald Carter1-1/+7
* normalize all registry key strings before storing or looking up paths in the registry tdb * return the current buffer size for REG_INFO even when not returning actual data * fix a segfault report by metze on #samba-technical so that the user/group object picker works again (was the "ProductType" key lookup that was failing). (This used to be commit 5640e6cdb213502d95fff33e06eaeed5ce3aeb76)
2002-07-24several changes in this checkinGerald Carter1-21/+153
* added REG_OPEN_HKCR for supporting regedit.exe * All data n a REGISTRY_VALUE is stored to a pointer now * fixed REG_INFO to correctly display data when double clicking on and entry in the registry editor * Will now enumerate installed driver_info_3 data * fixed numerous bugs related to pointer offsets, memory issues, etc.. in the registry routines * added a simple caching mechanism to fetch_reg_[keys|values]_specific() All that is left now is to enumerate PrinterData and I will have finished what I started out to do.... (This used to be commit 419d7208e8384e4ad2c4dd328ad5e630971bc76c)
2002-07-23* changed structure of REG_R_ENUM_VALUE structure since the BUFFER2Gerald Carter1-1/+34
is not and [in/out] buffer * registry value enumeration is working now for the Print\Forms key. The format of the binary data is not quite right yet but all installed forms are listed (This used to be commit 998eb9c7312c3c9a9ed1e9ec294593503c0304bf)
2002-07-04fixed the geyed out registry keys. Stupid typo on my part.Gerald Carter1-3/+3
Now on to plug in the printing tdbs to the registry view.... jerry (This used to be commit 2a68e4529ad884e8c3800f9006bb1c2b18cfada4)
2002-07-03first cut at implementing support for browsing printer and driver driverGerald Carter1-17/+40
via regedt32.exe. The regsitry.tdb is only a framework. It is not intended to store values, only key/subkey structure. The data will be retrieved from nt*tdb (for printers) creating a virtual view of the data. You can currently connect to a Samba box using regedt32.exe (haven't tried regedit.exe). Some basic keys are created in registry.tdb for use. There are two problems.... * something is getting freed in the winreg code that causes heap corruption later on. As long as you don't play with the winreg server functionality, I don't think you'll be bitten by this. * no access controls are currently implemented * I can't browse HKLM because regedt32 greys out the SYSTEM subkey. ok so that was three.... (This used to be commit 542d3c93a998083c07b2afa91a7c927c376caf54)
2002-07-02fixed our winreg parsing to handle a diifferent form given to us byAndrew Tridgell1-6/+8
WinXP. This fixes setting security decsriptors from XP Professional. (This used to be commit 80c3c68de20a686ced38356fd68f80a53e6f1626)
2002-06-18more debug classess activatedSimo Sorce1-0/+3
(This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-11-15Tidyups and things I discovered during the merge...Jeremy Allison1-4/+4
Jeremy. (This used to be commit 9c8439f25b90d80adcd7161bfed3664af6256940)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-5/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-04the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell1-19/+19
the client code still needs some work (This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
2001-08-27converted another bunch of stuff to NTSTATUSAndrew Tridgell1-3/+3
(This used to be commit 1d36250e338ae0ff9fbbf86019809205dd97d05e)
2001-08-10- avoid possible mem leaks in rpcclient/cmd_*.c (talloc_destroy not performed)Simo Sorce1-6/+211
- ported two rpc back from TNG (WINREG: shutdown and abort shutdown) - some optimizations and changed some DEBUG statement in loadparm.c - changed rpcclient a bit moved from non reentrant next_token_nr to next_token - in cmd_reg.c not sure if getopt will work ok on all platforms only setting optind=0 (This used to be commit fd54412ce9c3504a547e232602d6129e08dd9d4d)
2001-03-16Added Michael Sweet's CUPS patch to call directly into the CUPS backend.Jeremy Allison1-1/+1
Parameterises the printing functions so other backends can be plugged directly in (this is a good thing :-). Jeremy. (This used to be commit c0345bbaed5d1aac777f1a33ff84ad1899f2ed6d)
2000-05-15Added Shirish's reg changes to HEAD. Sync up with 2.2.0 backport.Jeremy Allison1-76/+81
Also added prs_xx error return checks to new code in rpc_parse/parse_reg.c Jeremy. (This used to be commit a148cb996297ed34342660f82ef0e66773d40500)
2000-03-22acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison1-26/+0
include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
2000-03-22added the following message to all dce/rpc client/server code, exceptLuke Leighton1-0/+26
the spoolss code (it's cut from TNG) and the smb-dce/rpc interface code that jeremy has been working up to TNG-functionality. i also want this message to go into SAMBA_2_0 and SAMBA_2_0_RELEASE, because it is intolerable that potentially good modifications be made to code that is going to be thrown away, and people waste their time fixing bugs and adding enhancements that have already been carried out already, up to two years ago in the TNG branch. /* * THIS CODE IS OUT-OF-DATE BY TWO YEARS, IS LEGACY DESIGN AND VERY, VERY, * INCOMPLETE. PLEASE DO NOT MAKE ANY FURTHER ENHANCEMENTS TO THIS CODE * UNLESS THEY ARE ALSO CARRIED OUT IN THE SAMBA_TNG BRANCH. * * PLEASE DO NOT TREAT THIS CODE AS AUTHORITATIVE IN *ANY* WAY. * * REPEAT, PLEASE DO NOT MAKE ANY MODIFICATIONS TO THIS CODE WITHOUT * FIRST CHECKING THE EQUIVALENT MODULE IN SAMBA_TNG, UPDATING THAT * FIRST, *THEN* CONSIDER MAKING THE SAME MODIFICATION IN THIS BRANCH * * YOU WILL, ALMOST GUARANTEED, FIND THAT THE BUG-FIX OR ENHANCEMENT THAT * YOU THINK IS NECESSARY, HAS ALREADY BEEN IMPLEMENTED IN SAMBA_TNG. * IF IT HAS NOT, YOUR BUG-FIX OR ENHANCEMENT *MUST* GO INTO SAMBA_TNG * AS THE SAMBA_TNG CODE WILL REPLACE THIS MODULE WITHOUT REFERENCE TO * ANYTHING IN IT, WITH THE POSSIBLE RISK THAT THE BUG-FIX OR ENHANCEMENT * MAY BE LOST. * * PLEASE OBSERVE AND RESPECT THIS SIMPLE REQUEST. * * THANK YOU. * * lkcl@samba.org */ (This used to be commit cfaea90529be222f8df0e20a7ca1289f99c29e09)
2000-01-14Added HP change.Jeremy Allison1-53/+54
Jeremy. (This used to be commit 4914d2f161b6a82789f3a9decccb636fb21264c5)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-648/+705
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-11-24registry API moved over to new format. reg_connect() is the top-levelLuke Leighton1-1/+1
function, which takes \\server_name. tested a _few_ functions. found that regcreatekey receives a Fault PDU. (This used to be commit 45e92258e7df84c21d23c0be7e1d85457ccac551)
1999-11-24rewrote policy handle code to be generic (it's needed for client-side too)Luke Leighton1-4/+4
attempted to fix regsetsec command (This used to be commit eaac0923e0e5e3f4c3d944272a71f3235ac2a741)
1999-11-18updating reg_value_info() parsing code to take BUFFER2 instead of justLuke Leighton1-16/+20
a char*. now copes with multiple types. (This used to be commit 3df7c903c5b70f336294a95ad864aedbacf544b0)
1999-11-18added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1-63/+60
reg_io_r_info() working properly. previously they weren't well understood (well, they were the first of the registry functions i did, back in december 97, ok??? :-) set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv. (This used to be commit 98ddeaf442cb30972cb281bf0489a6e5f7eb2883)
1999-10-29added HKEY_CLASSES_ROOT MSRPC open call. reg_open_hkcr etc. supportedLuke Leighton1-0/+58
in rpcclient, regenum HKEY_CLASSES_ROOT or regenum HKCR to test. (This used to be commit b0aa933ef4c0b58840430cf3b3cb3cbeb5c7f704)
1999-10-15renamed args due to global "class" variableLuke Leighton1-5/+5
(This used to be commit 7b3666f01c743ddf599d432a5bcae4408ca73865)
1999-10-15return results on prs_xxxxx() and all xxx_io_xxx() routines.Luke Leighton1-103/+214
the whole task is not complete, yet. xxx_io_xxx() routines that _call_ xxx_io_xxx() routines not done. prs_xxxx() covered by macros. considering doing xxx_io_xxxx in the same way. (This used to be commit 3b583f7be51434af98bc52b48dfa42c4602a3094)
1999-08-03changing debug output message reg_io_unknown_1 to reg_io_close.Luke Leighton1-2/+2
(This used to be commit c4901f595193f73b0c248d9315d3bbf547a5dafc)
1999-08-03reverted jeremy's c++-like security descriptor modifications as theLuke Leighton1-12/+18
simplest method to get rpcclient's reggetsec command working. the buffers passed as arguments in do_reg_get_key_sec() do need to be locally allocated not dynamically allocated, as two calls to reg_get_key_sec() are needed. on the first, the server fills in the size of the security descriptor buffer needed. on the second, the server fills in the security descriptor buffer. (This used to be commit b2d9cbef6f65bb696df8d8f49aa0c240e0bb1f50)
1999-04-08Mainly BDC-related changes.Matthew Chapman1-6/+3
* Added SEC_CHAN_BDC * Propagate sec_chan into the various functions which change trust account passwords, so they can be used for domain control and inter-domain trusts. * Fix for endianness problem reported by Edan Idzerda <edan@mtu.edu>. A BUFFER2 is really a "unibuf" in my terminology and we should treat it as such. * Added some more common NT structures (BIGINT, BUFHDR2, BUFFER4). * Added NET_SAM_SYNC (-> NetDatabaseSync2) RPC for account replication. Still experimental and incomplete, with a few too many NULL security descriptors lying around (must go look at Jeremy's SD code). Haven't worked out password encryption yet either. However, the XXX_INFO structures I've added to rpc_netlogon.h are quite nice as they give some insight into how these objects are stored in the SAM. (This used to be commit 7b830350eb54dc9d357c115e12ddf9a0633527ac)
1999-03-24removed 2 unnecessary args from make_uni_hdr.Luke Leighton1-10/+14
(This used to be commit f84dede27e16a5f02ee6d02fe2d16f2661c65470)
1999-03-23Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.Matthew Chapman1-3/+4
(This used to be commit 73730f6004c7eca1d852a569dede94095a396dca)
1999-02-23added jeremy's new c++-like code for parsing of security descriptors.Luke Leighton1-20/+13
(This used to be commit ec1b7000fd88c5a08e438c7033f60e49b9ec44a8)
1999-02-18problem been there for months: reg_r_info not aligning after string buffer.Luke Leighton1-0/+1
(This used to be commit 66e2787ab7db72fb654b995280b294738e77e50a)
1999-02-16rpcclient shutdown commandLuke Leighton1-0/+63
(This used to be commit 59f081069a58f6a070ed6016c06153d5e695da93)
1999-02-15Always null-terminate strings.Matthew Chapman1-1/+1
Also some string length and sizeof(pointer) corrections. (This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
1999-02-12UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1-4/+6
No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)
1999-02-11the UNICODE issue...Luke Leighton1-1/+1
(This used to be commit 73db80f34183324845407b00f58462ff2d7b47ea)
1999-02-08UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()Luke Leighton1-2/+2
(This used to be commit 9084b7e33dfe717bd8d5604ee71d137e3baef0f5)
1999-02-03cache unix groups so that two-level getgrent calls don't occur.Luke Leighton1-3/+2
(This used to be commit f7dfa55a2e191ae780d399026bce48f68cda4bf0)