1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

162 Commits

Author SHA1 Message Date
Gerald Carter
91b81a23b8 r7698: * clean upserver frontend for RegDeleteKey()
* implement RegDeleteKey() for reg_db backend
2007-10-10 10:57:19 -05:00
Gerald Carter
a091b37d59 r7692: start versioning the registry.tdb file since it can be modified now 2007-10-10 10:57:19 -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
21e7baa5bc r7470: fix block size caculation error when request size > 4096 bytes 2007-10-10 10:57:10 -05:00
Gerald Carter
a112c5570a r7440: * merge registry server changes from trunk (so far) for more
printmig.exe work
* merge the sys_select_signal(char c) change from trunk
  in order to keeo the winbind code in sync
2007-10-10 10:57:09 -05:00
Gerald Carter
a0ac9a8ffd r7415: * big change -- volker's new async winbindd from trunk 2007-10-10 10:57:08 -05:00
Gerald Carter
3a91b20e4b r7020: fixing printer ace values and getting rid of false compiler warning about unitialized variable 2007-10-10 10:57:00 -05:00
Gerald Carter
f35e0a0a8d r6995: * fixing segfault when writing out registry values of zero length
* add RegSaveKey() client function
* add 'net rpc registry save' subcommand
2007-10-10 10:57:00 -05:00
Volker Lendecke
4f36e4f434 r6953: Many compilers in the build farm don't like static variables initialized with
strlen(..). Jerry, I think this needs another fix. I just want to make the
build farm happy.

Not merging to trunk, this needs further looking at.

Volker
2007-10-10 10:56:58 -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
a71e104af8 r6680: event log patches from Marcin 2007-10-10 10:56:51 -05:00
Volker Lendecke
61d40ac60d r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes?

Volker
2007-10-10 10:56:41 -05:00
Gerald Carter
28d433351c r6232: more cleanups; remove BUFFER3; rename BUFFER4 -> RPC_DATA_BLOB; rename REG_CREATE_VALE -> REG_SET_VALUE 2007-10-10 10:56:30 -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
Günther Deschner
3e04def033 r5541: Fix crash bug in the client-spoolss enumdataex-call.
With Windows2003 it's perfectly legal to receive no data when querying a
value-less subkey. Found while migrating printer settings.

Guenther
2007-10-10 10:55:46 -05:00
Gerald Carter
00738dca3b r5517: code cleanup; rename the sorted_tree to pathtree (used by registry code)
I was going to use this for tracking dfs mounts in smbclient
but found another way.  Still the cleanup is valid so commiting it.
should be minimally disruptive since it is not widely used.
2007-10-10 10:55:43 -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
Günther Deschner
cc5892f041 r2821: Adding "Windows x64" as architecture string and driverdir "x64" for the
64bit AMD platform.

(This used to be "Windows AMD64" and "AMD64" in one of the release
candidates of SP2 for Windows XP. AMD64 is obviously still supported but
not documented.)

Guenther
2007-10-10 10:52:53 -05:00
Gerald Carter
a7e2730ec4 r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
2007-10-10 10:51:05 -05:00
Jeremy Allison
f82c273a42 Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
-
Gerald Carter
66359531b8 i guess i'm the only one this ever annyoed...
fix the confusion when we tdb_lock_bystring() but
we retrieve an entry using tdb_fetch_by_string.
It's now always tdb.*bystring()
-
Tim Potter
a17622103b Fix broken regexp in cvsignore for *.po{,32} files. -
Martin Pool
00b1478822 Add the correct file :-( to ignore .po and .po32 files. -
Martin Pool
a3f90cc6ab Remove this .po file from the repository. I meant to add a cvsignore
file that ignored it, but I slipped.
-
Martin Pool
9a8d50d45c Ignore .po and .po32 files. -
Jeremy Allison
7b945e10a6 More const fixes.
Jeremy.
-
Gerald Carter
33c7b75225 Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
-
Andrew Tridgell
e3d00fa47d reverted this patch till I sort out the craziness with UNIHDR -
Andrew Tridgell
b9eff31b14 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
-
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Jim McDonough
1426a5ca4f Add some const -
Jim McDonough
1bf36d3fc6 Don't segfault when trying to delete a key when none exist. -
Gerald Carter
ec37633548 fix up print portion of registry. Merge from APP_HEAD. -
Gerald Carter
fd140aadd7 break out REGISTRY_VALUE & REGVAL_CR objects into separate file for
cleaning linking....
-
Gerald Carter
8d510abe12 fix registry editor API for printing backend after I changed
the NT_PRINTER_PARAM to a REGISTRY_VALUE
-
Tim Potter
e84f47a234 Fix compile warnings. -
Gerald Carter
8799d4f7cc fix GetPrinterDataEx() to work with registry subkeys using a depth > 1 -
Gerald Carter
32a7083843 fix to allow EnumPrinterKey() to enumerate multiple levels of subkeys.
Works on the top level.  Needs more testing for levels > 1.
-
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
-
Tim Potter
f8072d964f Merge of case fixes from APPLIANCE_HEAD. -
Andrew Bartlett
17136a88c3 Back out idra's change (at his request) - the values in the tdb *should* be
upper cased already.

However, if you created your registry tdb in the very early versions of jerry's
patch, you could find that usrmgr doesn't function.  Simply delete the
registry.tdb, it will be recreated on startup.

Andrew Bartlett
-
Simo Sorce
2ad0e81c8d commented out strupper before key check against internal db, it's no good
to check for uppercased strings when we store them not uppercased.

jerry, this fix is needed to make usrmgr.exe work again.
meanwhile we found out that NT_STATUS code may not be appropriate there.
In particular it seem that an NT PDC will send back 02 as error
(ERRbadfile) not 0xc000000f (NT_STATUS_NO_SUCH_FILE NT)

I think further investigation is need to understand which are aprropriate
return codes here.
-
Gerald Carter
efbfb8ca54 hardcode printprocessor name since it is everywhere else -
Gerald Carter
5640e6cdb2 3 things:
* normalize all registry key strings before storing or looking
  up paths in the registry tdb
* return the current buffer size for REG_INFO even when not returning
  actual data
* fix a segfault report by metze on #samba-technical so that the
  user/group object picker works again (was the "ProductType" key
  lookup that was failing).
-
Gerald Carter
915ee5c0ec * fix return code so we don't let a client just open any key it wants
(even nonexistent ones).  This gets rid of the Scheduling Agent icon.

* fix NT_STATUS return code for bad registry path (NT_STATUS_NO_SUCH_FILE)
-
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....
-