1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

55 Commits

Author SHA1 Message Date
Michael Adam
2222acbac9 Move the implementation of _winreg_RestoreKey to reg_api.c
This removes the internals of reg_api from srv_winreg_nt.c entirely,
only reg_api is used there, now. This enlarges the dependencies of
reg_api somewhat now since it adds regfio. But this can be separated
out later. The current goal is to achieve a complete use of reg_api.

Michael
2008-02-15 16:23:10 +01:00
Michael Adam
bf6340d00d Move implementation of _winreg_SaveKey() from srv_winreg_nt.c to reg_api.c
This gives a new function reg_savekey() and hides a piece of
the backend code from srv_winreg_nt.c. One step towards using
reg_api throughout samba code.

Michael
2008-02-15 16:23:10 +01:00
Michael Adam
903223b160 Add a reg_getversion() function to reg_api and use it in srv_winreg_nt.c.
Michael
2008-01-17 16:25:11 +01:00
Michael Adam
f986a708be Use reg_[gs]etkeysecurity() instead of regkey_[gs]et_secdes().
Rationale: Use reg_api instead of backend functions.

Michael
2008-01-17 16:25:11 +01:00
Volker Lendecke
5c392c4c6e Some C++ fixes 2007-12-21 09:58:21 +01:00
Volker Lendecke
5ab82d4f57 Some C++ warnings 2007-12-21 09:58:20 +01:00
Jeremy Allison
9755c53114 Fixed obvious typo.
Jeremy.
2007-11-27 23:00:11 -08:00
Jeremy Allison
55b4f9d003 Remove pstring from everything in rpc_server except
srv_spoolss_nt.c and srv_srvsvc_nt.c.
They're next :-).
Jeremy.
2007-11-27 11:22:58 -08:00
Jeremy Allison
1ea3ac8014 More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to
remain until I've removed all pstrings from the client code.
Jeremy.
2007-11-15 14:19:52 -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
Volker Lendecke
0141e64ad4 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...."
2007-10-10 12:31:12 -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
Gerald Carter
21dc46a2ba r23633: Fix a couple of crash bugs pointed out by Volker caused by an old
change from a pstring to a char* and still trying use pstrcpy().
2007-10-10 12:23:39 -05:00
Michael Adam
c9f38fa30e r23434: Coorect a comment. 2007-10-10 12:23:16 -05:00
Michael Adam
b8269f4543 r23433: remove superfluous semicolon. 2007-10-10 12:23:16 -05:00
Michael Adam
4025cbc202 r23432: Remove superfluous comment.
(A relict from regkey_open_internal days.)

Michael
2007-10-10 12:23:16 -05:00
Jelmer Vernooij
e73a418b5b r21462: Fix EnumValue (?) 2007-10-10 12:18:06 -05:00
Jelmer Vernooij
b84370513f r21385: Regenerate IDL after pidl changes, sync winreg.idl from samba4. 2007-10-10 12:18:00 -05:00
Jelmer Vernooij
0596badb41 r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments.
This makes it a bit more similar to the Samba4 code.
2007-10-10 12:17:16 -05:00
Jelmer Vernooij
580f2a7197 r20832: Remove extra pointers previously added to unique [out] pointers. Instead,
add [ref] pointers where necessary (top-level [ref] pointers,
by spec, don't appear on the wire).

This brings us closer to the DCE/RPC standard again.
2007-10-10 12:17:11 -05:00
Volker Lendecke
0afd696f88 r20015: We have to zero out handle on key_close, otherwise the NT4 regedit will re-use the handle 2007-10-10 12:16:20 -05:00
Volker Lendecke
3da37287ca r20007: Fix a const warning just introduced 2007-10-10 12:16:19 -05:00
Volker Lendecke
fea52801de r19991: Sorry for this 2000-liner...
The main thing here is a rewrite of srv_winreg_nt.c. The core functionality
has moved to registry/reg_api.c which is then usable by the rest of Samba as
well.

On that way it fixes creating keys with more than one element in the
path. This did not work before.

Two things that sneaked in (sorry :-) is the change of some routines from
NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal.

Volker
2007-10-10 12:16:18 -05:00
Volker Lendecke
6cab254c49 r19963: Add 'registry shares = yes' and registry key security descriptors. 2007-10-10 12:16:16 -05:00
Volker Lendecke
a177bbb2d5 r19947: Change regkey_open_internal to take the parent key and a talloc_ctx as
arguments. This also replaces regkey_close_internal by TALLOC_FREE.

Volker
2007-10-10 12:16:14 -05:00
Volker Lendecke
978a6196bf r19930: Revert the winreg idl changes. At least enumkey does not work anymore today.
With more than 5 different trees I can't swear that I did test this properly
yesterday. Sorry for the noise.

Volker
2007-10-10 12:16:10 -05:00
Volker Lendecke
2369ad0852 r19929: Fix indentation 2007-10-10 12:16:10 -05:00
Volker Lendecke
b714b51884 r19919: Convert winreg_EnumKey to use ref ** instead of a unique *.
Volker
2007-10-10 12:16:10 -05:00
Volker Lendecke
1b460d6cdf r19918: Convert winreg_CreateKey to use a ref ** instead of a unique *. W2k3 can still
create keys on Samba and vice versa.

Jelmer, please check.

Thanks,

Volker
2007-10-10 12:16:09 -05:00
Volker Lendecke
f1266475da r19915: Fix two type-punned warnings 2007-10-10 12:16:09 -05:00
Volker Lendecke
b148cde7f3 r19914: The "default" value with the name "" need different 0-length treatment as the
other StringBufs, otherwise clicking on a key with this value being set leads
to regedit.exe on w2k3 chew all memory.
2007-10-10 12:16:09 -05:00
Volker Lendecke
01a53590a6 r19912: Move the subkey cache to srv_winreg_nt.c 2007-10-10 12:16:08 -05:00
Volker Lendecke
81bd816fa2 r19872: Move the value cache to srv_winreg_nt.c. Fix some minor issues found while
playing with regedit.exe.

Volker
2007-10-10 12:16:03 -05:00
Volker Lendecke
0ed3a21fcc r19867: Introduce struct regkey_info in srv_winreg_nt.c to be able to re-add the
QueryValue and later the QueryKey cache independent of the backend.

Volker
2007-10-10 12:16:03 -05:00
Volker Lendecke
c8c81f0e86 r19860: Streamline _winreg_QueryValue a bit. We've been pushing around memory
considerably here.

This temporarily removes a cache for the tdb based registry, I'll re-add that
in srv_winreg_nt.c in the next step.

This fixes creating/renaming values from the windows regedit.exe, as "New
Value #1" was not entering the cache after being created.

Volker
2007-10-10 12:16:03 -05:00
Volker Lendecke
cd14b7f052 r19824: Fix the max value calculation in QueryInfoKey 2007-10-10 12:16:00 -05:00
Volker Lendecke
c1083216c8 r19819: Windows returns an empty string instead of NULL here 2007-10-10 12:15:59 -05:00
Volker Lendecke
8df6544fa8 r19803: Fix problem reported by Chetan S: QueryInfoKey needs to report the max name
length in *bytes* for UTF-16, not the string length. This got lost during the
conversion.

This took a while to figure out :-)

Thanks to Chetan!

Volker
2007-10-10 12:15:56 -05:00
Volker Lendecke
f808182346 r19780: Ok, regkey_open_internal needs a regkey_close_internal. Giving a talloc ctx is
misleading here. This needs fixing properly :-)

Volker
2007-10-10 12:15:55 -05:00
Volker Lendecke
cb7f4211b8 r19778: Make regkey_open_internal take a talloc ctx 2007-10-10 12:15:55 -05:00
Volker Lendecke
287d68daab r19689: Fix a NULL dereference found by coverity (the call to strlen).
Jerry, please check this. The way I understood alpha_strcpy the last arg needs
to be the size of the target, not of the source.

Thanks,

Volker
2007-10-10 12:15:47 -05:00
Volker Lendecke
d48ac0726a r19292: Avoid some potential segfaults: In winreg_EnumValue all pointers are unique
pointers and can thus be independently NULL.

Thanks,

Volker
2007-10-10 12:15:29 -05:00
Volker Lendecke
99e54a213a r19224: Add setting the rng_fault_state to the already converted pipes.
Convert the low-hanging fruit of the LSA server. This provides a sample how
the server calls can be converted one by one, see the "proxy_lsa_call"
function.

Volker
2007-10-10 12:15:23 -05:00
Gerald Carter
5381dcbde3 r18962: * Add IDL for SaveKey() and RestoreKey() and regenerated
* Tested RegSaveKey() using win32 app.  Apparently
  this code has been brokne for a really long time.
2007-10-10 12:14:51 -05:00
Gerald Carter
6e9e9f8fac r18954: Fix segv in QueryValue and Enumvalue. regedit.exe now
is happy again when creating keys and values
2007-10-10 12:14:50 -05:00
Gerald Carter
e7e3e35c1d r18940: Fix a few memory corruption bugs to make CreateKey() and DeleteKey() work 2007-10-10 12:14:49 -05:00
Gerald Carter
92f22f67ed r18934: fix a segv in CreateKey() 2007-10-10 12:14:48 -05:00
Gerald Carter
e11108024a r18932: In RegEnumvalue() and RegQueryValue(), the output buffer
size must match the real value of the data.
2007-10-10 12:14:48 -05:00
Gerald Carter
f520a9d0fb r18931: * Fix the IDL for QueryInfoKey. teh Classname in an
in,out ref pointer
* Clarify variable names in EnumValue IDL
* Fix server code for _winreg_EnumValue() and _winreg_QueryInfoKe()
2007-10-10 12:14:48 -05:00