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

48 Commits

Author SHA1 Message Date
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
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
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
Volker Lendecke
77e556f4a3 r20210: registry_fetch_values is not needed anymore, fix typo 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
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
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
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
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
969eb9cda6 r19828: Add a helper function to pull *and* unparse local registry values 2007-10-10 12:16:00 -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
b57e446789 r19779: Fail properly on talloc_strdup failure 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
Gerald Carter
59c00924b6 r11579: syncing up perf counter code cfrom trunk 2007-10-10 11:05:21 -05:00
Gerald Carter
6c6bf6ca5f r10819: merging a couple of fixes from trunk
* only keep the registry,tdb file open when we have an open key handle
* tpot's setup.py fix
* removing files that no longer exist in trunk and copying some
  that were missing in 3.0
2007-10-10 11:04:54 -05:00
Gerald Carter
f10aa9fb84 r10781: merging eventlog and svcctl code from trunk 2007-10-10 11:04:53 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Gerald Carter
ef721333ab r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to use
the new talloc() features:

 Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d
 since the methods use the object pointer as the talloc context for
 internal private data.

 There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
 pair of functions.  Simply TALLOC_ZERO_P() and TALLOC_FREE() the
 object.

Also had to convert the printer_info_2->NT_PRINTER_DATA field
to be talloc()'d as well.  This is just a stop on the road to
cleaning up the printer memory management.
2007-10-10 11:03:25 -05:00
Gerald Carter
0d6352da48 r7995: * privileges are local except when they're *not*
printmig.exe assumes that the LUID of the SeBackupPrivlege
  on the target server matches the LUID of the privilege
  on the local client.  Even though an LUID is never guaranteed
  to be the same across reboots.  How *awful*!  My cat could
  write better code! (more on my cat later....)

* Set the privelege LUID in the global PRIVS[] array

* Rename RegCreateKey() to RegCreateKeyEx() to better match MSDN

* Rename the unknown field in RegCreateKeyEx() to disposition
  (guess according to MSDN)

* Add the capability to define REG_TDB_ONLY for using the reg_db.c
  functions and stress the RegXXX() rpc functions.
2007-10-10 10:58:07 -05:00
Gerald Carter
63b81ad3cb r7938: * move the hardcoded registry value names from _reg_query_value()
to a thin layer in fetch_reg_values().  Not entirely efficient
  seeing as the the dynamic value paths are stored in an unsorted
  array but it is one strequal() per path.  If this was really big
  it should be worked into the reghook_cache().
2007-10-10 10:58:03 -05:00
Gerald Carter
3d837e58db r7908: * change REGISTRY_HOOK api to use const (fix compiler warning
in init_registry_data()
* Add means of storing registry values in registry.tdb
* add builtin_registry_values[] array for REG_DWORD and REG_SZ
  values needed during startup
* Finish up RegDeleteValue() and RegSetValue()
* Finish up regdb_store_reg_values() and regdb_fetch_reg_values()

I can now create and retrieve values using regedit.exe on Win2k.

bin/net -S rain -U% rpc registry enumerate 'hklm\software\samba'
Valuename  = Version
Type       = REG_SZ
Data       = 3.0.20

Next is to do the virtual writes in reg_printing.c and I'll be
done with Print Migrator (yeah!  finally)
2007-10-10 10:58:03 -05:00
Gerald Carter
e188fdbef8 r7691: * add .gdbinit to the svn:ignore files
* start adding write support to the Samba registry
  Flesh out the server implementations of
  RegCreateKey(), RegSetValue(), RegDeleteKey() and RegDeleteValue()

I can create a new key using regedit.exe now but the 'New Key #1'
key cannot be deleted yet.
2007-10-10 10:57:19 -05:00
Gerald Carter
2f08a904ee r7664: add access check hooks to _reg_open_entry which are passed off
to the reg_XXX backend.  If the backend does not define
a regkey_access_check() function, we default to using the
standard registry_access_check()
2007-10-10 10:57:19 -05:00
Gerald Carter
867fd3052b r7648: adding REGISTRY_HOOK->reg_access_check() for authprization checks on RegOpenKey(); passing it off to the backend code for a given path 2007-10-10 10:57:18 -05:00
Gerald Carter
81ffb0dbbb r6942: * merging the registry changes back to the 3.0 tree
* removing the testprns tool
2007-10-10 10:56:57 -05:00
Gerald Carter
4e0ac63c36 r6014: rather large change set....
pulling back all recent rpc changes from trunk into
3.0.  I've tested a compile and so don't think I've missed
any files.  But if so, just mail me and I'll clean backup
in a couple of hours.

Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.

I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
2007-10-10 10:56:15 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Gerald Carter
7ba7c04c0e Fairly large change to printing code.
* removed support for PHANTOM_DEVMODE printer data

* s/NT_PRINTER_PARAM/REGISTRY_VALUE/g - This was a good bit
  of work.  Everything seems stable, but is not complete.

* support for printer data keys other than PrinterDriverData
  in the store and fetch routines.  Still needs to be plugged
  into the XxxPrinterDataEx() calls.

Tested against NT4.0 & 2k.  Like I said, it's not done, but doesn't
crash so it shouldn't upset anyone (unless you're trying to build
a Samba printer server off of HEAD).  More work to come.  Should
settle by Monday.


jerry
-
Gerald Carter
2a30c243ec done! printer_info_2, devicemode, sec_desc, & printer data all enumerate
and display correctly in regedit.exe.

Not sure about REG_SZ values in PrinterDriverData.  If we store these
in UNICODE, I'll have to fix up a few things.

REG_BINARY & REG_DWORD are fine.
-
Gerald Carter
419d7208e8 several changes in this checkin
* 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....
-
Gerald Carter
998eb9c731 * changed structure of REG_R_ENUM_VALUE structure since the BUFFER2
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
-
Gerald Carter
8e94f68a80 fix seg fault due to memory allocation goof. -
Gerald Carter
e62ae94823 another intermediate checkin on the way to enumerating forms
via the registry.  There is a seg fault here which shouldn't
bother anyone until I can get it fixed.  I just need
a check point in case I need to roll back to this version later on.
-
Gerald Carter
c5768538f6 enumeration of printers keys ( no data yet ) via the registry
functions now works :-)
-
Gerald Carter
2050859f03 fixed a logic error in the sorted_tree_find_child() routine
that caused a valid search to fail.  The printing registry
view now works again.
-
Gerald Carter
432b9f8d7c fixed seg fault in registry frontend caused by trying to
use a destroyed TALLOC_CTX*
-
Tim Potter
bc0f1c1ec2 Fixed a compiler warning. -
Gerald Carter
e7b55e8f01 * refactored registry operations some. subkey lists and
registry values are now passed around in containers
  (REGSUBKEY_CTR & REGVAL_CTR) which each possess a TALLOC_CTX.

* removed subkey_specific_fn() from REGISTRY_OPS.  Is implemented
  in the form of a wrapper

* temporarily broke the printing registry ops.

* implemented inheritence for the data_p of nodes in a SORTED_TREE

* All REGISTRY_KEY instances now store a valid REGISTRY_HOOK since
  the default REGOSTRY_OPS structure is stored in the root of the
  cache_tree.

* Probably some other change I forgot....  T
-
Gerald Carter
a43d9788fa virtual registry framework with initial printing hooks. -
Gerald Carter
9772acd9ad splitting off storage/retrieval routines for abstracting the
registry view front end.  Now to plug in the various hooks.
-