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

421 Commits

Author SHA1 Message Date
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
2007-12-07 17:32:32 -08:00
Günther Deschner
b05ffb5065 Fix _reg_perfcount_get_instance_info()
Guenther
(This used to be commit 20c1ba23f2e2902ef7c2237c63addfef2ae75eac)
2007-11-30 02:16:46 +01:00
Jeremy Allison
0bc4ff7b28 Remove pstring from srv_spoolss_nt.c. All gone from rpc_server/*.c
Jeremy.
(This used to be commit b5a2a1e3f82a0d319fc9a1d76f5166150680f4d4)
2007-11-27 19:05:08 -08:00
Günther Deschner
9d42af0d24 Unless talloc has some new magic there is a ctx missing here.
Guenther
(This used to be commit 172f7ce96dc12cfc7d2209d8ed56aeebefd6207b)
2007-11-27 18:01:56 +01:00
Jeremy Allison
80c2446321 Remove pstrings from nsswitch/ and registry/
Jeremy.
(This used to be commit 331c0d6216e1a1607a49ed7eb4078e10138ec16a)
2007-11-26 17:24:56 -08:00
Jeremy Allison
d40e47db4b Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
(This used to be commit 2a0173743d2cf615d52278f3dd87cc804abe2d16)
2007-11-08 17:25:45 -08: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 d140d68537225b6a6a99be3d9b09354e3f6ad8c9)
2007-11-06 00:50:47 +01:00
Gerald (Jerry) Carter
88ee61625a Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875bb2653e831d314726c3240beb0a96b)
2007-11-01 15:53:44 -04: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 f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-18 17:40:25 -07:00
Alexander Bokovoy
d76717fe15 Correctly free memory in regfio paths
(This used to be commit 97f9a90b823887e808cca96eca7a041f121e6111)
2007-10-15 17:41:09 -05:00
Volker Lendecke
58a0a60bd1 Remove bogus comment
(This used to be commit 142b80bf1542f212dff66a3661c13f3f6845067f)
2007-10-11 15:36:32 +02:00
Volker Lendecke
0ebab65706 r25534: Apply some const
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
(This used to be commit 0141e64ad4972232de867137064d0dae62da22ee)
2007-10-10 12:31:12 -05:00
Volker Lendecke
3cc2fb5e33 r25528: Only do transactions on registry.tdb if anything changes
I got annoyed by the fsync calls clobbering my harddrive when smbd started up
for debugging.

... things you do on a plane without internet
(This used to be commit e0927a7cbf4b806bcc93ad4af9552bc91292e78b)
2007-10-10 12:31:12 -05:00
Günther Deschner
6334c7cc5f r25417: Use DBGC_REGISTRY class.
Guenther
(This used to be commit 43ca04918a5a1b2379083dc624b346ceb8476a38)
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 e9922cd8aeb70aebb162ad598fda76ad69226b94)
2007-10-10 12:31:01 -05:00
Günther Deschner
3d4af73f50 r25362: Add "NT Authority\System" with Full Access to the default registry security
descriptor.

Guenther
(This used to be commit ddc6d051115577b27529c46ff98267517218fe59)
2007-10-10 12:31:00 -05:00
Michael Adam
5b00e7c389 r25162: Refactor further: add mapping functions between
REGISTRY_VALUE and struct registry_value formats for
registry values. Lacking better naming, I called them
regval_hilvl_to_lolvl and regval_lolvl_to_hilvl for a
start. The might be useful elsewhere, so might be put
into another place later on.

Michael
(This used to be commit 883fd7906165ca10413e4745b3beed59516adf34)
2007-10-10 12:30:47 -05:00
Michael Adam
f157c9abb7 r25160: Refactor out and slightly clean up canonicalization of the registry value
from smbconf_store_values().

Michael
(This used to be commit 7761f9b3ccf0d9ae9ffe830b04c3be8451ce2112)
2007-10-10 12:30:46 -05:00
Michael Adam
34991bbd0c r25140: Less red bars to hurt my eyes...
(This used to be commit f935d21200294c8d29ce527300f605e721cb3620)
2007-10-10 12:30:44 -05:00
Michael Adam
aaa0afaa26 r25139: Avoid code duplication: let regval_ctr_copyvalue() call regval_ctr_addvalue().
This also corrects regval_ctr_copyvalue() in that it cannot create (invalid)
regval containers with dupliacte entries...

Michael
(This used to be commit 2daaaaa835078c543fa12cd1819e8a3d86cf6e5e)
2007-10-10 12:30:44 -05:00
Michael Adam
c5d8fd3772 r25002: Refactor out code duplication created by the previous
unification of r24998.

Michael
(This used to be commit 6026d132537f2fb2a963fa54377a926fa99eeb35)
2007-10-10 12:30:32 -05:00
Michael Adam
30ee281cae r24999: Use the new regval_compose() function in regval_ctr_addvalue().
Michael
(This used to be commit dab9ffe602eaca478a73f3b882f543629ce3001e)
2007-10-10 12:30:32 -05:00
Michael Adam
cc7bc29757 r24998: Add a function regval_compose() to compose a REGISTRY_VALUE from
input data. Use this function in a first step to refactor
the canonicalization code of smbconf_store_values().

Michael
(This used to be commit f4caa2d7d412e2b9bb2a1ce71514551569ccf373)
2007-10-10 12:30:32 -05:00
Michael Adam
628e4d9009 r24996: Eliminate more trailing spaces...
(This used to be commit 1ee1b75113c7035c8882fe53981dba7cfc3aa187)
2007-10-10 12:30:32 -05:00
Michael Adam
b3fbff6eb5 r24970: Polish some comments and add my (C).
Michael
(This used to be commit aa043bb446ec8ab90a8e61c590be8d33b6a2d42d)
2007-10-10 12:30:30 -05:00
Volker Lendecke
ff0947fbed r24949: Remove some static buffers
(This used to be commit df648d47ff3c4e24f439fda839653bda98323100)
2007-10-10 12:30:29 -05:00
Günther Deschner
7a30cb15da r24632: Fix build warnings.
Guenther
(This used to be commit e9178af01d68b7cbe91157d1d196f2148eeef7ca)
2007-10-10 12:30:12 -05:00
Michael Adam
92ec897627 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
(This used to be commit 4424a030324ab646a025b50fcb89e1b5cdfcbbe8)
2007-10-10 12:30:12 -05:00
Günther Deschner
873bc06d95 r24418: Adding reg_deleteallvalues().
Guenther
(This used to be commit f7457c6173107f1730ae2e31c5377df3dbd2454e)
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 87c91e4362c51819032bfbebbb273c52e203b227)
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 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10 12:28:20 -05:00
Michael Adam
ba2dc0530f 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
(This used to be commit 10014833da868289ae28db2e7c1edfd353ca7b2b)
2007-10-10 12:23:44 -05:00
Jeremy Allison
d1d2157153 r23591: Fix bug #4725. Don't crash when no eventlogs specified. Needs
merging for 3.0.25b.
Jeremy.
(This used to be commit ae239fec6faa79018c818506b391b829ccd685f8)
2007-10-10 12:23:33 -05:00
Michael Adam
3618a07708 r23584: Use a while loop instead of a for loop without increment... :-)
Michael
(This used to be commit fb4ade3b4d203eead7798b8d98938cff2abb9c29)
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 41c3ff6e277601a9c7ac29009fd89ff9c961ca46)
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 aa702e53a7416b5599ed114089327aef8a4e35b8)
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 0c9cb69b45e8c51b8c3fa0b0d034a6cad2374055)
2007-10-10 12:23:32 -05:00
Jeremy Allison
72099d8f66 r23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
(This used to be commit 7885b68bb5df0ebe290feca0e74b4a20ef59e718)
2007-10-10 12:23:23 -05:00
Michael Adam
aa4110e6f2 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.
(This used to be commit 24b0cbcb3741dd14b04728448a85cc04a057e7d0)
2007-10-10 12:23:23 -05:00
Michael Adam
43d59b7d42 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
(This used to be commit 6fd71140499e30b8fd0f083301512db7b8c2f236)
2007-10-10 12:23:22 -05:00
Michael Adam
9bb19474d7 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
(This used to be commit 31d64767fc8a73be1f6b81e2712d687897f812a0)
2007-10-10 12:23:22 -05:00
Michael Adam
a2762cfcaa 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
(This used to be commit ebe2ea8f22bfe0855beee087af771c690db443c1)
2007-10-10 12:23:18 -05:00
Michael Adam
46906b2c75 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
(This used to be commit dfc42178708144ef0b9273438ee15451078d3f4e)
2007-10-10 12:23:18 -05:00
Michael Adam
6f28dc588c r23460: Re-add whitespace to reduce diff between branches.
Sorry for the noise...

Michael
(This used to be commit c7d004dec4822c0d8e5c7fd6519850f906c7bb1a)
2007-10-10 12:23:17 -05:00
Michael Adam
00323dc738 r23459: Remove one superfluous cast.
(This used to be commit beed87550786052891969f6014088c17a5d77157)
2007-10-10 12:23:17 -05:00
Michael Adam
cb7f45560f r23458: Cosmetic fix in debug output.
(This used to be commit 03dbdb561a16a6e3dbd99ee29aac598457873002)
2007-10-10 12:23:17 -05:00
Michael Adam
774ceeea50 r23379: Whitespace cosmetics, to reduce irritating diffs...
Michael
(This used to be commit df30f8d5c2999590aabe1e87f92fbdbafa7052aa)
2007-10-10 12:23:11 -05:00
Jeremy Allison
71ee55f98d r23080: Fix bug #4637 - we hads missed some cases where
we were calling PRS_ALLOC_MEM with zero count.
Jeremy.
(This used to be commit 9a10736e6fa276ca4b0726fbb7baf0daafbdc46d)
2007-10-10 12:22:43 -05:00
Jeremy Allison
56a5d05b8b r22590: Make TALLOC_ARRAY consistent across all uses.
That should be it....
Jeremy.
(This used to be commit 603233a98bbf65467c8b4f04719d771c70b3b4c9)
2007-10-10 12:19:49 -05:00
Jeremy Allison
be8b0685a5 r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
(This used to be commit 8968808c3b5b0208cbad9ac92eaf948f2c546dd9)
2007-10-10 12:19:49 -05:00