1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

195 Commits

Author SHA1 Message Date
Günther Deschner
e9178af01d r24632: Fix build warnings.
Guenther
2007-10-10 12:30:12 -05:00
Michael Adam
4424a03032 r24630: Store Samba configuratin options only under the default name, not as aliases.
This prevents creation of problematic configurations from registry editors
like regedit or "net rpc registry".

I will refactor the code to be somewhat more concise,
but I wanted to have this in the tree, now I got it working... :-)

Michael
2007-10-10 12:30:12 -05:00
Günther Deschner
f7457c6173 r24418: Adding reg_deleteallvalues().
Guenther
2007-10-10 12:29:44 -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
Michael Adam
10014833da r23667: Prevent storing of forbidden parameter names in registry
configuration as values. I would really like to check whether
the valuename is a valid parameter name (with lp_parameter_is_valid)
here, but unfortunately, regedit cereates new values as
"New Value #1" (and so on) first, before dropping into the
rename box. So this is impossible here.

Michael
2007-10-10 12:23:44 -05:00
Jeremy Allison
ae239fec6f r23591: Fix bug #4725. Don't crash when no eventlogs specified. Needs
merging for 3.0.25b.
Jeremy.
2007-10-10 12:23:33 -05:00
Michael Adam
fb4ade3b4d r23584: Use a while loop instead of a for loop without increment... :-)
Michael
2007-10-10 12:23:32 -05:00
Michael Adam
41c3ff6e27 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
2007-10-10 12:23:32 -05:00
Michael Adam
aa702e53a7 r23581: Move regkey_open_onelevel from reg_frontend to reg_api,
where it actually belongs, and make it static.

Michael
2007-10-10 12:23:32 -05:00
Michael Adam
0c9cb69b45 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
2007-10-10 12:23:32 -05:00
Jeremy Allison
7885b68bb5 r23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
2007-10-10 12:23:23 -05:00
Michael Adam
24b0cbcb37 r23509: This activates the global options from the registry in loadparm.
The global options are stored as values in the subkey "global"
of the SMBCONF registry key.

The activation is accomplished in smb.conf though a new special
semantic of the "include" parameter: "include = registry" triggers
the processing of the registry global options exactly at the
position of the include statement. Options read from the registry
take the same precedence as parameters loaded from a file via
include. Need to reload the registry globals is detected by
watching the tdb sequence number.

Registry shares are automatically activated when the registry
globals are processed.

So a "registry only" configuration can be realized by an
smb.conf that looks as follows:

================================
[global]
include = registry
================================

The global options and registry shares can be conveniently
edited with the "net conf" utility.

Caveat:

A possible pitfall consists in using "include = registry"
together with the "lock directory" directive in the registry.
This problem will be addressed in the next time.

Note on the code:

Processing of the registry options is accomplished by a function
process_registry_globals() in loadparm.c The current version is
only an interim solution: It is handcoded instead of using the
infrastructure of reg_api.c. The reason for this is that using
reg_api still has too large linker dependencies, bloating virtually
all targets by PASSDB_OBJ, SMBLDAP_OBJ, GROUPDB_OBJ and LDB stuff.
A version of process_registry_globals that uses reg_api is
included but commented out. The goal is to eventually refactor
and restructure the registry code so that one can use the reg_api
to access only the registry tdb and not link all the dynamic
backends with all their linking implications.
2007-10-10 12:23:23 -05:00
Michael Adam
6fd7114049 r23507: Split one general function normalize_dbkey from reg_db.c into util_reg.c
(To be used in other place in subsequent commit.)

Michael
2007-10-10 12:23:22 -05:00
Michael Adam
31d64767fc r23504: Use tdb_wrap_open (instead of usual tdb_open) in reg_db.
This eliminates the need of maintaining reg_db's own
reference counter for the tdb. Maybe as a next step...

Michael
2007-10-10 12:23:22 -05:00
Michael Adam
ebe2ea8f22 r23468: Open registry.tdb with sequence number.
Add a function to retrieve the registry db sequence number.

This is in preparation of loadparm integration of registry global
smb.conf options: this will allow to detect changes in order to trigger reload.

Michael
2007-10-10 12:23:18 -05:00
Michael Adam
dfc4217870 r23465: There was this diff between reg_printing in 3_0 and 3_0_26:
before writing to secdesc_buf->sd,
3_0 checked secdesc_buf->sd while 3_0_26 checked secdesc_buf->sd_size.

This patch makes both revisions check _both_ befor writing.

Jerry / Jeremy : please check if this is correct!

Michael
2007-10-10 12:23:18 -05:00
Michael Adam
c7d004dec4 r23460: Re-add whitespace to reduce diff between branches.
Sorry for the noise...

Michael
2007-10-10 12:23:17 -05:00
Michael Adam
beed875507 r23459: Remove one superfluous cast. 2007-10-10 12:23:17 -05:00
Michael Adam
03dbdb561a r23458: Cosmetic fix in debug output. 2007-10-10 12:23:17 -05:00
Michael Adam
df30f8d5c2 r23379: Whitespace cosmetics, to reduce irritating diffs...
Michael
2007-10-10 12:23:11 -05:00
Jeremy Allison
9a10736e6f r23080: Fix bug #4637 - we hads missed some cases where
we were calling PRS_ALLOC_MEM with zero count.
Jeremy.
2007-10-10 12:22:43 -05:00
Jeremy Allison
603233a98b r22590: Make TALLOC_ARRAY consistent across all uses.
That should be it....
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
8968808c3b r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
8ad13718af r22588: Make all uses of TALLOC_MEMDUP consistent.
Jeremy.
2007-10-10 12:19:48 -05:00
Michael Adam
e09e0d642d 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.
2007-10-10 12:19:39 -05:00
Volker Lendecke
9de16f25c1 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
2007-10-10 12:19:16 -05:00
Stefan Metzmacher
3a28443079 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
fa322f0cc9 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
2007-10-10 12:18:59 -05:00
Stefan Metzmacher
29b42ea89c r21979: make use of string_tdb_data()
to avoid creating the TDB_DATA struct from strings "by hand"

note: we can't use the tdb_*_bystring functions here, as the key isn't
null-terminated here...

metze
2007-10-10 12:18:55 -05:00
Stefan Metzmacher
1a0599d7aa r21978: make use of tdb_*_bystring()
to avoid creating the TDB_DATA struct from strings "by hand"

metze
2007-10-10 12:18:55 -05:00
Stefan Metzmacher
71c3880e89 r21977: little cosmetic change to remove a local var that's not really needed
metze
2007-10-10 12:18:54 -05:00
Jeremy Allison
6df32b4a6a r21225: Couple of fixes from Martin Zielinski mz@seh.de,
one typo, one to make sure that time initialization
is done before modules that depend on it (printer
initialization).
Jeremy.
2007-10-10 12:17:48 -05:00
Volker Lendecke
92fdb1193d r21219: Speed up the initial startup time of smbd on systems with loaded disk
subsystems. See the comment in the diff.

Volker
2007-10-10 12:17:48 -05:00
Volker Lendecke
9d0a789e32 r20626: Fix a memleak found by the IBM checker -- not on 3.0.24 2007-10-10 12:16:59 -05:00
Herb Lewis
41be182f78 r20269: merge -r20264:20267 from SAMBA_3_0_24
more no previous prototype warnings
2007-10-10 12:16:38 -05:00
Volker Lendecke
77e556f4a3 r20210: registry_fetch_values is not needed anymore, fix typo 2007-10-10 12:16:32 -05:00
Volker Lendecke
92bc870768 r20209: Fix two memleaks 2007-10-10 12:16:32 -05:00
Volker Lendecke
0742faaacd r20037: Reduce code size slightly by shuffling stuff around 2007-10-10 12:16:22 -05:00
Volker Lendecke
ad1e00430b r20020: Arglll... eventlogadm links against reg_db but not the rest of the registry
stuff. Revert the last change.

This needs better fixing.

Volker
2007-10-10 12:16:21 -05:00
Volker Lendecke
cab5ccbbe4 r20019: Replace one set of tricky code by calls to another set of tricky code:
Initializing the reg_db now uses reg_createkey and reg_setvalue.

Volker
2007-10-10 12:16:21 -05:00
Volker Lendecke
281640823b r20018: Fix a memleak in reg_createkey 2007-10-10 12:16:21 -05:00
Volker Lendecke
ad22a46718 r20016: Add two utility functions for easy opening/creating registry keys 2007-10-10 12:16:20 -05:00
Volker Lendecke
a6039eb46c r20005: reg_open_path should become the replacement for regkey_open_internal. 2007-10-10 12:16:19 -05:00
Volker Lendecke
dc0300ec70 r20004: Remove a const, "name" is allocated anyway 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
8b3d860f27 r19990: Fix comment 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
fd429c8c06 r19948: Fix a memleak 2007-10-10 12:16:15 -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