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

87 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
f7c28db475 s4:WINREG RPC server - add another "talloc_unlink" in "DeleteKey"
Also here we waste memory - therefore free the pointless handle after the delete.
2009-11-27 23:23:32 +01:00
Matthias Dieter Wallnöfer
6f7cfb0e10 s4:WINREG RPC server - Reintroduce the free operation on "CloseKey"
Better use "talloc_unlink" here Since we could have more than one reference.
2009-11-27 23:23:31 +01:00
Matthias Dieter Wallnöfer
bda1c701f4 s4:WINREG RPC server - Cosmetic 2009-11-21 11:38:20 +01:00
Matthias Dieter Wallnöfer
a31838eb3c s4:WINREG RPC server - remove a "talloc_free"
I assume that this "talloc_free" isn't necessary since the DCERPC server frees
the handle itself (we got always warnings about this).
2009-11-17 19:56:14 +01:00
Andrew Tridgell
1261d694f0 more include minimisation 2009-09-19 14:12:01 -07:00
Stefan Metzmacher
5bca70a0c2 s4:rpc_server: s/private/private_data
metze
2009-02-02 13:08:49 +01:00
Jelmer Vernooij
19aec78aec Fix the build. 2008-10-21 15:47:34 +02:00
Jelmer Vernooij
5209a846a9 Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts:
	source4/lib/registry/ldb.c
	source4/rpc_server/winreg/rpc_winreg.c
2008-10-21 14:51:13 +02:00
Matthias Dieter Wallnöfer
80af62652b Registry RPC server: Reintroduce the "key" variable for better readability
The "key" variable points to our working key in the hive (h->data).
2008-10-21 14:40:42 +02:00
Matthias Dieter Wallnöfer
f10227958b Registry server: Fixes up the patch with "type" != NULL (used in "EnumValue" and "QueryValue")
This prevents the server to segfault if the input data type is NULL.
2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
f9d7af8569 Revert "Registry server: Enhances commit "type" != NULL (when getting values)"
This reverts commit 32d00f5e2c5a67dac806ee07f030f3ac2ad108f9.
This patch hasn't been right. Repost it in the right way.
2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
254eb51c4c Registry server: Enhances commit "type" != NULL (when getting values) 2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
083785c091 Registry server "reg_ldb_unpack_value": Tests demonstrate that also "type" doesn't has to be NULL 2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
5f2ab665bd Registry server: Cosmetic corrections 2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
ac4808c11f Cleanups of server files
Cosmetic corrections
2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
e23e997644 Registry server: More work to be compatible
Some fixup's and assure, that we send only initialized values.
2008-10-21 14:40:41 +02:00
Matthias Dieter Wallnöfer
d7be73eea2 Fixes for the WINREG RPC server
This changes the WINREG RPC server through some corrections into the Windows-like behaviour.
Compared with Windows 2000 and tested through Windows 2000 Registry Editor.
2008-10-21 14:40:40 +02:00
Jelmer Vernooij
ada0e343b2 Sync parameter names with samba 3. 2008-10-15 17:38:51 +02:00
Jelmer Vernooij
fed4658c1b winreg.idl: Sync ref change from Samba 3. 2008-10-15 17:34:55 +02:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Andrew Bartlett
9a1bec0801 More kludge ACLs!
Rather than killing off the nasty 'kludge ACLs' stuff, this patch
extends it, to ensure that LSA secrets and the registry are also
protected.

Andrew Bartlett
(This used to be commit 2f2b110fb8)
2008-03-20 12:12:10 +11:00
Jelmer Vernooij
47f6bbf8cf r26689: registry: Return max_subkeynamelen, max_valnamelen and max_valbufsize in getkeyinfo().
(This used to be commit b06896d237)
2008-01-07 08:18:07 -06:00
Jelmer Vernooij
7d5f0e0893 r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange.
(This used to be commit 2f29f80e07)
2008-01-01 16:12:15 -06:00
Jelmer Vernooij
57f20ccd24 r26296: Store loadparm context in DCE/RPC server context.
(This used to be commit fc1f4d2d65)
2007-12-21 05:48:13 +01:00
Jelmer Vernooij
51d8da8ae3 r26239: Fix registry argument order.
(This used to be commit 0b3de2a63a)
2007-12-21 05:47:21 +01:00
Jelmer Vernooij
6c999cd123 r26236: Remove more uses of global_loadparm or specify loadparm_context explicitly.
(This used to be commit 5b29ef7c03)
2007-12-21 05:47:15 +01:00
Stefan Metzmacher
529763a9aa r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
(This used to be commit 6223c7fddc)
2007-12-21 05:45:02 +01:00
Günther Deschner
b591596c0e r25539: Also correct indent for winreg server.
Guenther
(This used to be commit 3f6cc36a1b)
2007-10-10 15:07:50 -05:00
Jelmer Vernooij
e89be1bf44 r24817: Don't REG_NONE for all value types. Patch from
Andrew Kroeger <andrew@sprocks.gotdns.com>
(This used to be commit ff81ea3f5a)
2007-10-10 15:03:15 -05:00
Jelmer Vernooij
f8c373fd6a r24727: Initialize variable.
(This used to be commit 925fcc3366)
2007-10-10 15:02:58 -05:00
Jelmer Vernooij
5d518417f8 r24726: Add tests for getting/setting security descriptors (still failing at the moment)
(This used to be commit ecdfaf56c0)
2007-10-10 15:02:57 -05:00
Jelmer Vernooij
b409d4120f r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have
been working on for at least half a year now. Contains the following
improvements:

 * proper layering (finally!) for the registry library. Distinction is
   now made between 'real' backends (local, remote, wine, etc) and
   the low-level hive backends (regf, creg, ldb, ...) that are only used
   by the local registry backend
 * tests for all important hive and registry operations
 * re-enable RPC-WINREG tests (still needs more work though, as
							   some return values aren't checked yet)
 * write support for REGF files
 * dir backend now supports setting/reading values, creating keys
 * support for storing security descriptors
 * remove CREG backend as it was incomplete, didn't match the data model
   and wasn't used at all anyway
 * support for parsing ADM files as used by the policy editor (see lib/policy)
 * support for parsing PREG files (format used by .POL files)
 * new streaming interface for registry diffs (improves speed and memory usage
	for regdiff/regpatch significantly)

   ... and fixes a large number of bugs in the registry code
(This used to be commit 7a1eec6358)
2007-10-10 15:02:34 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Jelmer Vernooij
64e88a8ccf r20850: Prefix all server calls with dcesrv_
(This used to be commit 76c78b0339)
2007-10-10 14:43:39 -05:00
Andrew Tridgell
443a22b7f7 r18860: fixed some code that bitrotted while we didn't have the safety check
with NTSTATUS, WERROR etc.
(This used to be commit fddb85bfa8)
2007-10-10 14:20:16 -05:00
Andrew Tridgell
655b710204 r18584: found one of the fd leaks. The registry backend was using a
talloc(NULL, xxx) to allocate the registry context. That had two
consequences

1) it was a massive memory leak, as all winreg operations leaked their
   entire context (including an open ldb database) every time

2) event_context_find() never found the exsting event context, so we
   used a new event context each time, which called epoll_create()
   each time, which caused a fd to be allocated
(This used to be commit 1c0a3de398)
2007-10-10 14:18:52 -05:00
Andrew Tridgell
6adb5717f5 r18566: fixed the winreg pipe and winreg tests
Jerry, there is a big difference on the wire between these two:

  [out] uint32 x;
and
  [out] uint32 *x;

if you change from

  [out] uint32 x;

then you need to change to:

  [out,ref] uint32 *x;

otherwise it changes the format on the wire, which means we are no
longer compatible with MS servers.

but be aware that even if you change to a ref ptr, you also need to
change all the client code to set all the return variables in the out
part of the structure. That's why I don't like the MIDL restriction of
forcing the use of ref pointers for output variables - it makes life
much harder when writing client code, and makes the code much more
error prone (just look at all the extra code needed to make this work
again).

I know we could auto-allocate these variables in the generated client
side NDR code, but if we did that then we would have no way of doing a
_real_ ref out pointer, which we really wanted to set to some already
allocated variable.

So please hold off on changing our idl to use the MIDL convention for
output variables until Jelmer and I have had a good "chat" about this :-)
(This used to be commit 555aed43ba)
2007-10-10 14:18:47 -05:00
Gerald Carter
dce0c9e4fd r18561: Fix [out] pointers in winreg IDL
(This used to be commit 694677dafe)
2007-10-10 14:18:46 -05:00
Andrew Tridgell
f6d98fe853 r18330: don't mix pointer types in RPC replies
(This used to be commit cc86719f53)
2007-10-10 14:18:10 -05:00
Jelmer Vernooij
cf0f4ec073 r15358: Fix some compiler warnings / type safety. Found by tcc
(This used to be commit 12ba42de58)
2007-10-10 14:05:25 -05:00
Jelmer Vernooij
d64ccc0176 r14599: Pass ACLs down the registry layer.
(This used to be commit 6cdefd8945)
2007-10-10 13:58:59 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Tim Potter
9759d435ca r11261: Rename access_required field in winreg idl to access_mask so it matches
the other interfaces.
(This used to be commit 8eb582b578)
2007-10-10 13:45:09 -05:00
Jelmer Vernooij
ff7342a4ad r10026: Move registry header file to lib/registry
Add support for showing security descriptor in regshell
Add support for saving files in NT4 registry backend
(This used to be commit 47cecd4726)
2007-10-10 13:36:30 -05:00
Jelmer Vernooij
02b3abec25 r10007: Merge data_blk and data_len member of registry_value into a DATA_BLOB.
Fix handling of REG_DWORD in the LDB backend.
Fix a couple of warnings
(This used to be commit 709fdc7ebf)
2007-10-10 13:36:28 -05:00
Andrew Tridgell
649882d8d5 r9567: fixed the winreg IDL for CreateKey, including a security
descriptor. To keep it simple I just use normal IDL buffers for now,
avoiding the complex methods metze used in spoolss. We might change
that later

Also added decoding of the security_descriptor in
winreg_GetKeySecurity() in smbtorture
(This used to be commit 439f34a962)
2007-10-10 13:34:29 -05:00
Andrew Tridgell
d5edfef325 r9410: - a winreg_CloseKey() should return a zero key on success (zeroing the
callers key). This is the normal pattern with rpc handles.

- fixed reference to undefined error variable in winreg_DeleteKey()
(This used to be commit 6757d51a28)
2007-10-10 13:33:35 -05:00
Andrew Tridgell
71f34f401e r9388: we should fault bad handles given to winreg_GetVersion()
(This used to be commit 00e55be9ef)
2007-10-10 13:33:32 -05:00
Andrew Tridgell
0d425487da r9359: don't check for size overflow if value is NULL
this gets viewing the product options in smbd HKLM from w2k3 regedit
working
(This used to be commit 17f3250dd6)
2007-10-10 13:33:28 -05:00
Andrew Tridgell
a152245a99 r9358: - opening a winreg key of "" is the same as re-opening the hive. The
w2k3 regedit does this.

- w2k3 expects null termination is string lengths
(This used to be commit bcef9e592a)
2007-10-10 13:33:27 -05:00