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

42 Commits

Author SHA1 Message Date
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Michael Adam
282c9ff8ae registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree.
Michael
(This used to be commit c2d9baa29e)
2008-04-13 15:45:33 +02:00
Michael Adam
413c2e9b0a registry: remove the REGISTRY_HOOKS layer from the reghook cache.
There is no need to save the keyname again, we only need to
get the REGISTRY_OPS out of the pathtree.

Furthermore, this makes life easier, since we can now pass
in keynames as temporarily allocated strings.

Michael
(This used to be commit 2f9ee2f782)
2008-04-13 01:43:42 +02:00
Michael Adam
0bf8ba9f26 registry: reg_deletevalue should return error, when the value does not exist.
Michael
(This used to be commit 04b48984bb)
2008-03-31 17:22:02 +02:00
Michael Adam
bb0bf5c902 Remove (now) unused function make_default_reg_sd().
Michael
(This used to be commit 2c66413de2)
2008-02-18 17:41:21 +01:00
Michael Adam
7ba906634b Grab secdesc for key from registry for reg_savekey()
instead of construction another default secdesc.

Michael
(This used to be commit 194e00822c)
2008-02-18 17:41:21 +01:00
Michael Adam
abdedc7940 Reformat copied reg_savekey/reg_restorekey code.
Sticking to coding rules.

Michael
(This used to be commit 2c54ef2d07)
2008-02-15 17:32:32 +01:00
Michael Adam
355faf2e3d 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
(This used to be commit 2222acbac9)
2008-02-15 16:23:10 +01:00
Michael Adam
c720a0e228 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
(This used to be commit bf6340d00d)
2008-02-15 16:23:10 +01:00
Michael Adam
8fffca2e95 Adapt a comment to current circumstances.
Michael
(This used to be commit 84ec89ab9f)
2008-02-15 16:23:10 +01:00
Volker Lendecke
33f3eeaa00 Fix some "set but never used" warnings
(This used to be commit 4a6dadc517)
2008-01-20 17:44:40 +01:00
Michael Adam
1ea809383e Fix typo in debug message.
Michael
(This used to be commit d7a8d7ffbd)
2008-01-18 09:40:57 +01:00
Michael Adam
32a8e74078 Add a reg_getversion() function to reg_api and use it in srv_winreg_nt.c.
Michael
(This used to be commit 903223b160)
2008-01-17 16:25:11 +01:00
Michael Adam
7f8e4bc68e Add my (C) to reg_api.c - Michael
(This used to be commit 81d6a1fbed)
2008-01-17 16:25:11 +01:00
Michael Adam
138f7ec451 Add a comment header comparing winreg.idl and reg_api.c.
Michael
(This used to be commit 15163926a8)
2008-01-17 16:25:11 +01:00
Michael Adam
da4ecfc0fa Add reg_api functions reg_getkeysecurity() and reg_setkeysecurity().
These are wrappers around the lower level functions regkey_get_secdesc()
and regkey_set_secdesc(). Next step towards hiding reg_frontend from
the surface.

Michael
(This used to be commit 7251a24b48)
2008-01-17 16:25:11 +01:00
Michael Adam
fcb47f5ea9 Comment out unused reg_create_path() and reg_delete_path().
These functions are unused. Comment them out for now.

Michael
(This used to be commit 0cb8399d7c)
2008-01-17 16:25:11 +01:00
Michael Adam
99b195a6aa Move reg_create_path() and reg_delete_path() to reg_api.c
Michael
(This used to be commit 4d82cc586c)
2008-01-17 16:25:11 +01:00
Michael Adam
b6eaf05479 Add some sectioning comments to reg_api.c
Michael
(This used to be commit d3c9c27374)
2008-01-17 16:25:11 +01:00
Michael Adam
1a15320dcd Make utility function reg_deletekey_recursive_internal() static.
Michael
(This used to be commit 3e66127322)
2008-01-17 16:25:11 +01:00
Michael Adam
982c71fcd2 Use the proper boolean functions.
Michael
(This used to be commit beaa83f32b)
2008-01-15 14:56:00 +01:00
Michael Adam
8a01076334 Remove some trailing spaces.
Michael
(This used to be commit 1941c365b5)
2008-01-15 14:55:04 +01:00
Michael Adam
d35bda0ffd Add detection for need of update to the registry db.
This only detects if the tdb sequence number has changed
since the data has last been read.

Michael
(This used to be commit 3f081ebead)
2008-01-14 19:38:01 +01:00
Michael Adam
feb4d82724 Fix a permissions error in reg_deletekey_recursive().
Michael
(This used to be commit 4a56d3d707)
2007-12-31 03:25:54 +01:00
Volker Lendecke
7cbdb48475 Remove tiny code duplication
ndr_size_security_descriptor does the same as sec_desc_size
(This used to be commit bc3bd7a8e7)
2007-12-29 23:13:26 +01:00
Günther Deschner
99d9993fdb When deleting a key from the registry make sure the non-default
security descriptor gets deleted as well.

Guenther
(This used to be commit d140d68537)
2007-11-06 00:50:47 +01:00
Jeremy Allison
30191d1a57 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.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Günther Deschner
6334c7cc5f r25417: Use DBGC_REGISTRY class.
Guenther
(This used to be commit 43ca04918a)
2007-10-10 12:31:04 -05:00
Günther Deschner
4d7a1c3bcf r25370: Allow to delete registry keys recursively without deleting the final key.
Guenther
(This used to be commit e9922cd8ae)
2007-10-10 12:31:01 -05:00
Günther Deschner
873bc06d95 r24418: Adding reg_deleteallvalues().
Guenther
(This used to be commit f7457c6173)
2007-10-10 12:29:44 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Michael Adam
3618a07708 r23584: Use a while loop instead of a for loop without increment... :-)
Michael
(This used to be commit fb4ade3b4d)
2007-10-10 12:23:32 -05:00
Michael Adam
394291281a r23583: Add a utility function to recursively delete a Registry
key with all its subkeys. (reg_deletekey will refuse to
delete a key with subkeys with WERR_ACCESS_DENIED).

Michael
(This used to be commit 41c3ff6e27)
2007-10-10 12:23:32 -05:00
Michael Adam
7fd8a16d23 r23581: Move regkey_open_onelevel from reg_frontend to reg_api,
where it actually belongs, and make it static.

Michael
(This used to be commit aa702e53a7)
2007-10-10 12:23:32 -05:00
Michael Adam
f7de0933f3 r23578: When calling DeleteKey for a key that has subkey(s), Windows
returns WERR_ACCESS_DENIED. This adapts reg_deletekey to behave
the same way.

Michael
(This used to be commit 0c9cb69b45)
2007-10-10 12:23:32 -05:00
Michael Adam
b93f78025d r22496: reg_enumvalue should return WERR_NO_MORE_ITEMS instead of
WERR_BAD_FILE when all items have been successfully enumerated.
Besides seeming the reasonable code to return,
this is what I have seen from w2k3, w2k, wxp.
(This used to be commit e09e0d642d)
2007-10-10 12:19:39 -05:00
Volker Lendecke
a40df6f92d r22135: Check in most of Michael Adam's net conf utility. A good share of this patch
is moving functions around to fix some linker dependencies for the registry.

Michael, I've renamed your auth_utils2.c to token_utils.c.

Thanks!

Volker
(This used to be commit 9de16f25c1)
2007-10-10 12:19:16 -05:00
Volker Lendecke
5b1f85a832 r20037: Reduce code size slightly by shuffling stuff around
(This used to be commit 0742faaacd)
2007-10-10 12:16:22 -05:00
Volker Lendecke
b0a6049391 r20018: Fix a memleak in reg_createkey
(This used to be commit 281640823b)
2007-10-10 12:16:21 -05:00
Volker Lendecke
1a66ed34cd r20004: Remove a const, "name" is allocated anyway
(This used to be commit dc0300ec70)
2007-10-10 12:16:19 -05:00
Volker Lendecke
ecf90c495e 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
(This used to be commit fea52801de)
2007-10-10 12:16:18 -05:00