1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-04 08:23:50 +03:00
Commit Graph

850 Commits

Author SHA1 Message Date
Volker Lendecke
6c80362e29 Always set "registry shares = yes" for "include = registry"
This fixes the case where "include = registry" is set in the smb.conf text file
and *only* shares (no [global] settings) are present in the registry.

Michael, please check!

Thanks,

Volker
2008-06-03 21:36:56 +02:00
Björn Jacke
8e59a2fedc Add ldap connection timeout for OpenLDAP and Netscape LDAP libs. This can be controlled via the ldap connection timeout parameter. This fixes fallbacks to secondary LDAP servers in multi LDAP server setups like in #4544 2008-06-03 16:32:31 +02:00
Michael Adam
28d1972200 loadparm: fix process_registry_shares() when there is only [global] in registry.
This fixes testparm printing "Error loading services." when there is only
the global section in registry and no other service definition.

Michael
2008-05-27 11:00:30 +02:00
Michael Adam
5e2b925367 loadarm: fix testparm with "config backend = registry".
Set the iServiceIndex to "-1" for starup with either config
backend (originally only for text backend). Otherwise,
process_registry_shares() will fail.

Currently, the only user of lp_load_with_registry_shares() is testparm.

Michael
2008-05-26 12:00:13 +02:00
Michael Adam
b387c614ba loadparm: add funcion lp_load_with_registry_shares().
This is like lp_load(), except that it will load the
registry shares into the services aarray when registry
shares are activated.

Michael
2008-05-15 02:42:41 +02:00
Michael Adam
e1b76cd5d6 loadparm: add call to do_section() to process_registry_service().
Michael
2008-05-15 02:42:41 +02:00
Michael Adam
b3233ecefd loadparm: add parameter allow_registry_shares to lp_load_ex().
This allows for registry shares to be activated, i.e. loaded into
the services array at lp_load() time.

Michael
2008-05-15 02:42:41 +02:00
Michael Adam
b3a90b7251 loadparm: add a function process_registry_shares()
This loads the shares defined in registry into the services array.

Michael
2008-05-15 02:42:40 +02:00
Michael Adam
2986e5174e loadparm: refactor processing of service out of process_registry_globals()
into new function process_registry_service().

Michael
2008-05-15 02:42:40 +02:00
Michael Adam
83cd9f74d5 loadparm: refactor initalization of registry config out into lp_smbconf_ctx().
Michael
2008-05-15 02:42:40 +02:00
Michael Adam
c1f300c76e loadparm: Fix activation of registry globals in lp_load_*.
This completes bba04a8fba:
The reverted logic has to be put into the callers
lp_load() and lp_load_initial_only() of lp_load_ex(), too.
Silly bug.

Michael
2008-05-10 00:15:00 +02:00
Michael Adam
17415e2dc4 libsmbconf: rewrite API to use smbconf_service struct
instead of lists of strings and counters directly...

Michael
2008-04-23 01:43:31 +02:00
Michael Adam
3acc0d84dc loadparm: reformat - fix whitespace/tab
Michael
2008-04-21 00:21:23 +02:00
Michael Adam
bba04a8fba loadparm: rename bNoIncludes to bAllowIncludeRegistry (inverting logic)
This is what that variable controls now...

Michael
2008-04-21 00:21:23 +02:00
Michael Adam
1bb28bc1d8 loadparm: make lo_load_initial() only skip registry include.
This is only to be able to set everything properly for registry
before reading registry includes.

This fixes "make test" as non-root user in a directory, where
root-daemons have already created a messaging.tdb in the compiled
in lockdir...

Michael
2008-04-21 00:21:23 +02:00
Stefan Metzmacher
6b5c76bf1e loadparm: make it possible to just load the config without following "include =" statements
metze
2008-04-18 14:43:07 +02:00
Michael Adam
42c7fb4ddf loadparm: reactivate special semantics of "include = registry" for now.
This includes the configuration stored in HKLM/Software/Samba/smbconf .

Michael
2008-04-17 18:39:00 +02:00
Michael Adam
59b81bfd0a loadparm: remove pfunc parameter from process_registry_globals().
Use do_parameter() directly.

Michael
2008-04-15 22:45:38 +02:00
Michael Adam
78afb30f80 loadparm: use the new smbconf_init() dispatcher for loading registry config.
Michael
2008-04-13 20:04:44 +02:00
Björn Jacke
cbdb79b7a1 fix some extrasemi compile warnings 2008-04-10 08:55:57 +02:00
Michael Adam
fd43a4a1e0 loadparm: drop debug level in map_parameter from 0 to 1
we don't want to see this all the times in tests.

Michael
2008-04-10 01:29:02 +02:00
Michael Adam
31b31171bd loadparm: add userdata parameter to do_section() and do_parameter().
The userdata is currently unused. It can be used in the future for
passing a context like in samba4 code.

Michael
2008-03-26 14:55:05 +01:00
Michael Adam
96434d9dc7 libsmbconf: add a "path" variable to the conf context.
This is passed to the module init routines.
In case of the registry, this is the path of the
basekey in registry, that is to be used, defaulting
to KEY_SMBCONF (HKLM\software\samba\smbconf), when
NULL is given. This is the only case currently used.

In order to support other keys, registry initialization
for smbconf has to be changed to support different keys.

Michael
2008-03-21 18:19:24 +01:00
Michael Adam
b3f6920ccb libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
d7bd9bb8aa libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
304dba6cb2 libsmbconf: change the API to always take the smbconf_ctx parameter first.
..for consistency. Exception: the open/init function, where the smbconf_ctx
is created from the given talloc context.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
5b6b90900a libsmbconf: change smbconf_get_seqnum() to smbconf_changed().
The former seqnum is hidden inside a struct smbconf_csn.
And the get_seqnum is united with a changed function that
stores the seqnum inside the given csn.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
7dc64d1021 loadparm: reenable checking files for updates while in registry configuration.
This is necessary now that includes (to files) are enabled from registry.

Michael
2008-03-20 15:01:52 +01:00
Michael Adam
5c3f14e02f loadparm: remove unneeded include.
libnet.h unneeded after separation of libsmbconf from libnet.

Michael
2008-03-20 15:01:52 +01:00
Michael Adam
097af0309d libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
Michael
2008-03-17 18:03:02 +01:00
Michael Adam
ce943aeb58 loadparm: add a debug message.
Michael
2008-03-12 02:12:34 +01:00
Michael Adam
b942ff6b7f loadparm: remove services read from smb.conf when starting over for config backend registry.
Michael
2008-03-12 02:12:34 +01:00
Michael Adam
32bfd131e3 loadparm: add convenience wrapper lp_kill_all_services()
Michael
2008-03-12 02:12:34 +01:00
Michael Adam
05eda12525 loadparm: add a comment
Michael
2008-03-12 02:12:34 +01:00
Michael Adam
0a619d4dc4 loadparm: fix a comment typo.
Michael
2008-03-12 02:12:33 +01:00
Michael Adam
288495ec1a loadparm: add utility function to check for config backend file.
Michael
2008-03-12 02:12:33 +01:00
Michael Adam
4ac52a5a1d loadparm: use a function to check for the registry config backend.
Michael
2008-03-12 02:12:33 +01:00
Michael Adam
f12259d9c4 loadparm: fix init_globals() to re-init all options event when called 2nd time.
Up to the globals had only been fully reset when init_globals() was called
for the first time. But a full restart is needed for use with
"config backend = registry". (And should be with "config file = ...", but
in this case the restart is outsourced to the daemons.) This left
some options (like e.g. "realm") set to values that were set in smb.conf
before the occurence of "config backend = registry".

Now this misbehaviour is fixed with this change.

Michael
2008-03-10 17:22:41 +01:00
Michael Adam
ab70e781b2 loadparm: replace typedef struct {} global/service by struct global/struct service.
Michael
2008-03-10 17:22:40 +01:00
Michael Adam
10ab0681e6 loadparm: fix whitespaces in global and service parameter structs.
Michael
2008-03-10 17:22:40 +01:00
Michael Adam
91aab823fc loadparm: fix spacing in parm_table (training spaces and empty lines).
Michael
2008-03-10 17:22:40 +01:00
Michael Adam
869a17f1a9 loadparm: Reformat the parm table to use named initializers.
This makes each entry in the parm table much more comprehensible
at first glance (to me). On the other hand, roughly 9 lines are
used instead of one for each entry which makes the overall list
less clearly laid out, one might argue. But we have 400+ lines
of parameter descriptions anyways...

Michael
2008-03-10 17:22:40 +01:00
Derrell Lipman
b7f34e7ef2 Eliminate global variable in_client and a plethora of extern declarations.
Derrell
2008-03-06 10:41:42 -05:00
Günther Deschner
d9f4060c66 Fix lp_load with an empty registry and "config backend = registry". Michael, please check.
Guenther
2008-03-06 09:52:06 +01:00
Andreas Schneider
eff3d3bad5 Rename the 'hidden' variable to 'administrative share'. 2008-02-29 13:08:04 +01:00
Jeremy Allison
7bf4216644 Remove my change 2008-02-28 02:13:48 -08:00
Jeremy Allison
644a3be37a Fix debug %lu message.
Jeremy.
2008-02-28 02:07:06 -08:00
Andreas Schneider
a3da677bf0 Add variable to define if a share should be hidden.
If you create a share on a Windows machine called foo$ then this share is
of the type STYPE_DISKTREE. So it is possible to administrate this kind of
share. Tested on Windows NT and 2003.

In samba we assume that if a share with a $ at the end must be of the type
STYPE_DISKTREE_HIDDEN. This is wrong, so we need a variable in the config
to define if the share should be hidden or not.
2008-02-26 21:34:05 +01:00
Volker Lendecke
ad37b7b0ae Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
2008-02-25 16:09:26 +01:00
Michael Adam
d08a3a1957 Use linbet_conf code in loadparm's registry handling.
This replaces the original hand-written tdb code, now that the
linking dependencies have been significantly reduced.

Michael
2008-02-19 09:09:05 +01:00