1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

1042 Commits

Author SHA1 Message Date
Zach Loafman
8e19a28805 s3 auth: Add parameter that forces every user through an NSS lookup
When set to yes, "force username map" forces every user, even AD
users, through an NSS lookup. This allows the token to be overridden
with information from NSS in certain broken environments.
2009-02-16 00:29:21 -08:00
Volker Lendecke
913c547cf6 Rename lp_smb_perfcount_module() to lp_perfcount_module() to match the parameter name 2009-02-14 22:01:03 +01:00
Steven Danneman
5cd4b7b7c0 s3: Added new parameter "map untrusted to domain"
When enabled this reverts smbd to the legacy domain remapping behavior when
a user provides an untrusted domain

This partially reverts d8c54fdd
2009-02-12 13:55:44 -08:00
todd stecher
54c51a66e3 S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
2009-02-09 13:23:44 -08:00
Karolin Seeger
3f9daf434a s3/libads: Change "ldap ssl:ads" parameter to "ldap ssl ads".
Karolin
2009-02-05 15:55:14 +01:00
Dan Sledz
d96248a9b4 Add two new parameters to control how we verify kerberos tickets. Removes lp_use_kerberos_keytab parameter.
The first is "kerberos method" and replaces the "use kerberos keytab"
with an enum.  Valid options are:
secrets only - use only the secrets for ticket verification (default)
system keytab - use only the system keytab for ticket verification
dedicated keytab - use a dedicated keytab for ticket verification.
secrets and keytab - use the secrets.tdb first, then the system keytab

For existing installs:
"use kerberos keytab = yes" corresponds to secrets and keytab
"use kerberos keytab = no" corresponds to secrets only

The major difference between "system keytab" and "dedicated keytab" is
that the latter method relies on kerberos to find the correct keytab
entry instead of filtering based on expected principals.

The second parameter is "dedicated keytab file", which is the keytab
to use when in "dedicated keytab" mode.  This keytab is only used in
ads_verify_ticket.
2009-02-01 20:23:31 -08:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
f497a79f28 Deprecate the "share modes" parameter to address bug #6024, swat disagrees with smbstatus as to share mode with share modes = No set in samba.
Jeremy.
2009-01-12 16:25:03 -08:00
Steven Danneman
19a05bf2f4 Make STATEDIR and CACHEDIR configurable through ./configure and loadparm.c
If they are not explicitely set in either place both will default to LOCKDIR.

Signed-off-by: Michael Adam <obnox@samba.org>
2009-01-12 12:16:03 +01:00
Volker Lendecke
81624030ef Fix a typo found by the IBM Checker 2009-01-04 18:14:33 +01:00
Jelmer Vernooij
ef80d1b794 Fix use of "time offset" parameter, and add test to make sure I don't break it again :-) 2008-12-23 22:10:34 +01:00
root
cf9f2484b7 s3:loadparm/docs: Set default for "ldap ssl" to "start tls".
This has been discussed on samba-technical before.
3.3 and newer only!

Karolin
2008-12-21 08:55:30 +01:00
Karolin Seeger
cbb085b2a2 s3: loadparm: Clean-up list of parameters.
We don't need to list several combinations of lowercase and uppercase here.

Karolin
2008-12-21 08:23:39 +01:00
Karolin Seeger
9458d4be87 s3/loadparm.c: Change default value for "ldap ssl".
LDAP_SSL_ON is not defined at all. That's why the actual default value
was "" for a long time. Set a more sensible default value without chnging the
default behaviour.

-----8<------------------snip--------------8<--------------
user@host:/data/git/samba/v3-0-test/source> git grep LDAP_SSL_ON | cat
include/smb.h:enum ldap_ssl_types {LDAP_SSL_ON, LDAP_SSL_OFF,
LDAP_SSL_START_TLS};
param/loadparm.c:       Globals.ldap_ssl = LDAP_SSL_ON;
----->8------------------snap-------------->8--------------

It's the same in 3.2 and 3.3 series.

Karolin
2008-12-17 16:31:06 +01:00
Michael Adam
51118b1974 s3:loadparm: fix copy service error (canonicalize_servicename: NULL source name)
this was introduced by commit 3358a139d2.

Michael
2008-12-15 14:46:30 +01:00
Michael Adam
c2bd88f145 s3:loadparm: add service-struct based variants of the free-parameter routines
and use the abstracted free_one_parameter_common() in old
free_one_parameter_by_snum() as well as in new free_one_parameter()

Michael
2008-12-15 14:46:25 +01:00
Michael Adam
03f19dad79 s3:loadparm: rename free_parameters() to free_parameters_by_snum()
Michael
2008-12-15 14:46:19 +01:00
Michael Adam
0b0dc506d4 s3:loadparm: rename free_parameter() to free_one_parameter_by_snum()
Michael
2008-12-15 14:46:11 +01:00
Michael Adam
6244194265 s3:loadparm: add lp_local_ptr() that operates on a service struct
and use this in lp_local_ptr_by_snum().

Michael
2008-12-15 14:20:16 +01:00
Michael Adam
91c543f0b5 s3:loadparm: rename lp_local_ptr() to lp_local_ptr_by_snum()
Michael
2008-12-15 14:16:06 +01:00
Michael Adam
606abdceac s3:loadparm: fix newly introduced leading whitespaces to tabs
Michael
2008-12-15 13:33:24 +01:00
Todd Stecher
9985898e94 s3: Add support for access based share enumeration 2008-12-08 22:23:16 -08:00
Yasuma Takeda
611ef42053 Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.conf 2008-12-05 13:37:51 -08:00
Jeremy Allison
8962be69c7 Make us clean under valgrind --leak-check=full by using talloc_autofree_context() instead of NULL.
Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting
to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should
be deleted when their parent context is deleted, so freeing them at some arbitrary point later
will be a double-free.
Jeremy.
2008-11-06 20:48:13 -08:00
Jeremy Allison
8b4b5c3a92 Add wrapper str_list_make_v3() to replace the old S3 behavior of
str_list_make(). From Dan Sledz <dan.sledz@isilon.com>:
In samba 3.2 passing NULL or an empty string returned NULL.
In master, it now returns a list of length 1 with the first string set
to NULL (an empty list).
Jeremy.
2008-11-06 18:53:00 -08:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Jelmer Vernooij
9de80e7abc Samba3: Include util.h header file rather than having custom prototypes. 2008-11-01 03:14:43 +01:00
Jelmer Vernooij
89c9545430 Use str_list_equal() rather than str_list_compare(). 2008-10-18 15:56:07 +02:00
Michael Adam
339925f98d [s3]loadparm: remove param/params.c which is used no more.
Michael
2008-10-18 15:36:18 +02:00
Michael Adam
ef9ccf5d20 [s3]test_lp_load: fix "no talloc stackframe around" message
gfree_loadparm() and TALLOC_FREE(frame) were in the wron order.

Michael
2008-10-18 15:36:17 +02:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
1b99d8fbb5 Use common util_file code. 2008-10-12 17:34:43 +02:00
Jelmer Vernooij
348be5f1e4 Share data_blob implementation. 2008-10-12 01:46:15 +02:00
Jeremy Allison
eada8f8abe If you have a large number of cups printers, then scanning for print info can cause a client to timeout
(it takes longer than 30 seconds to enumerate them). Make scanning for printers async with a callback
from the main loop. This fixes a bug that was irritating *me* :-).
Jeremy.
2008-10-10 11:55:14 -07:00
Michael Adam
3358a139d2 [s3]loadparm: refactor freeing of parameter data out and reduce memleak.
Add new functions free_parameter(), free_parameters() and
free_global_parameters() and use these in the appropriate places,
reducing code duplication.

Also, always TALLOC_FREE data of type P_LIST, thus reducing mem-leaks:
This had not been done in init_globals before.

Michael
2008-09-27 22:28:27 +02:00
Michael Adam
e56c89b5e8 [s3]loadparm: in lp_do_parameter() use function lp_local_ptr()
instead of hard coded calculation.

Michael
2008-09-27 22:28:26 +02:00
Michael Adam
1578610aef [s3]loadparm: remove superfluous talloc context / talloc_stackframe call.
Michael
2008-09-27 22:28:26 +02:00
Michael Adam
aa388a2005 [s3]loadparm: refactor setting parametric options in list out
into new function set_param_opt().
This unifies and clarifies two instances of the code.

Michael
2008-09-27 22:28:26 +02:00
Michael Adam
33d18c76f1 [s3]loadparm: fix memory error - free the right param_opt->list in copy_service.
Michael
2008-09-27 22:28:26 +02:00
Michael Adam
612aa3915f [s3]loadparm: refactor freeing of parametric options into free_param_opts().
This code was there in three places.

Michael
2008-09-27 22:28:25 +02:00
Michael Adam
b38ed2674b [s3]loadparm: rename process_registry_service() to process_smbconf_service().
There is nothing registry-specific in that function.

Michael
2008-09-27 22:28:25 +02:00
Michael Adam
21c4061414 [s3]loadparm: add a command test_lp_load to test the lp_load function.
This is not like testparm, just a simple tool that runs
lp_load_with_registry_shares the requested number of times.

Michael
2008-09-27 22:28:24 +02:00
Karolin Seeger
9cf1a68977 printing: Rename new parameter "cups timeout" to "cups connection timeout".
Karolin
2008-09-24 11:09:04 -07:00
Karolin Seeger
765e5d2282 printing: Add new parameter "cups timeout".
The default timeout for connections to CUPS servers is set
to 5 minutes in the CUPS libraries. The smbd hangs on startup
until the timeout is reached if the CUPS server is unreachable.
This parameter makes the timeout configurable. The default value
is set to 30 seconds.

Karolin
2008-09-23 16:57:58 -07:00
Jeremy Allison
c16f2907c5 Fix bug #5729. Explicitly allow "-valid".
Jeremy
(This used to be commit 4f2de29723)
2008-09-03 13:06:36 -07:00
Volker Lendecke
c529cd153f Increase the default positive idmap cache time to a week
(This used to be commit 60af636750)
2008-08-26 13:01:11 -07:00
Karolin Seeger
b90607e6e8 loadparm: idmap backend is not depracated any longer.
Karolin
(This used to be commit fcfab47036)
2008-08-22 10:06:26 +02:00
Jeremy Allison
79150da70b Here is a re-working of the winbindd
reconnect code to cope with rebooting a DC. This
replaces the code I asked Volker to revert.
The logic is pretty simple. It adds a new parameter,
"winbind reconnect delay", set to 30 seconds by
default, which determines how long to wait between
connection attempts.
To avoid overwhelming the box with DC-probe
forked children, the code now keeps track of
the DC probe child per winbindd_domain struct
and only starts a new one if the existing one
has died.
I also added a little logic to make sure the
dc probe child always sends a message whatever
the reason for exit so we will always reschedule
another connect attempt.
Also added documentation.
Jeremy.
(This used to be commit 8027197635)
2008-08-20 16:24:22 -07:00
Jeremy Allison
03991ab073 Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.
Here is a patch to allow many subsystems to be re-initialized. The only
functional change I made was to remove the null context tracking, as the memory
allocated here is designed to be left for the complete lifetime of the program.
Freeing this early (when all smb contexts are destroyed) could crash other
users of talloc.
Jeremy.
(This used to be commit 8c630efd25)
2008-08-12 13:35:15 -07:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fc)
2008-08-12 11:28:29 +02:00
Michael Adam
bf291c95bc loadparm: add two parameters "init logon delay hosts" and "init logon delay"
"init logon delays hosts" takes a list of hosts names or addresses
or networks for which the initial SAMLOGON reply should be delayed
(so other DCs get preferred by XP workstations if there are any).
This option takes the same type of list as "hosts allow" does.

"init logon delay" allows one to configure the delay for the hosts
configured for delayed initial samlogon with "init logon delayed hosts".
The value is interpreted as milliseconds. The default value is 100.

This commit only introduces the parameters.
They will be activated in a subsequent commit.

Michael
(This used to be commit f7c1f85438)
2008-08-09 01:15:58 +02:00
Michael Adam
1a6aecaea8 testparm: Display warning if invalid values are used.
This one came up while using "csc policy = disabled" instead of
"disable"... ;-)
(This used to be commit d01da44de7)
2008-07-30 16:31:09 +02:00
Volker Lendecke
065fb506a2 Sequel to c10aad9f13: Ignore whitespaces in parametric options
It's a bit difficult to explain why

idmap config backend:FOO = rid

should work while

idmap config backend : FOO = rid

should not. And I doubt we will ever see domain names with whitespaces...
(This used to be commit 0207f99d3f)
2008-07-16 18:21:22 +02:00
Volker Lendecke
d11796d392 Tiny logic simplification: Remove an indentation by using an early return;
(This used to be commit 37dba0c192)
2008-07-16 18:21:17 +02:00
Volker Lendecke
ed5e6b3244 Remove a silly "typedef struct _param_opt_struct param_opt_struct"
(This used to be commit 78801431c8)
2008-07-16 18:21:11 +02:00
Jeremy Allison
24eec914c0 Fix swat. Bug #5613.
Jeremy
(This used to be commit 15920f8388)
2008-07-15 14:37:48 -07:00
Volker Lendecke
d5ccdcce0b Revert "Slightly increase the default idmap cache time"
This reverts commit 448836d44d.
(This used to be commit a9b29ab6b7)
2008-07-11 17:53:24 +02:00
Volker Lendecke
5515c0e81c Slightly increase the default idmap cache time
(This used to be commit 448836d44d)
2008-07-03 21:19:09 +02:00
Jeremy Allison
1fb1c67fb9 Patch from SATOH Fumiyasu <fumiyas@osstech.co.jp> for bug #5202. Re-activate "acl group control"
parameter and make it only apply to owning group. Also added man page fix.
Jeremy.
(This used to be commit e98e080bad)
2008-07-03 10:24:12 -07:00
Volker Lendecke
335e3b1197 Fix the build
(This used to be commit 3bfeae651f)
2008-06-25 16:25:05 +02:00
Andrew Tridgell
927621ba12 make parametic options case insensitive
This is needed as some options are uppercased internally in Samba, such as the idmap config option
Without this change it is not possible to set these options via net conf which lowercases options
(This used to be commit c10aad9f13)
2008-06-25 21:40:53 +10:00
Michael Adam
769646efc6 loadparm: use the return value of the special handlers in lp_load().
Up to now, the bool return value was silently ignored.

Michael
(This used to be commit c65d425fec)
2008-06-19 17:22:27 +02:00
Michael Adam
09d769057e loadparm: don't treat a missing include file as an error in handle_include().
Michael
(This used to be commit a8ef8870be)
2008-06-19 17:22:27 +02:00
Volker Lendecke
2cfacbaacb 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
(This used to be commit 6c80362e29)
2008-06-03 21:36:56 +02:00
Björn Jacke
d8b234648c 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
(This used to be commit 8e59a2fedc)
2008-06-03 16:32:31 +02:00
Michael Adam
2f446d9e55 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
(This used to be commit 28d1972200)
2008-05-27 11:00:30 +02:00
Michael Adam
33f632b8b5 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
(This used to be commit 5e2b925367)
2008-05-26 12:00:13 +02:00
Michael Adam
42beddc991 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
(This used to be commit b387c614ba)
2008-05-15 02:42:41 +02:00
Michael Adam
0589c607a7 loadparm: add call to do_section() to process_registry_service().
Michael
(This used to be commit e1b76cd5d6)
2008-05-15 02:42:41 +02:00
Michael Adam
0ba819dd21 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
(This used to be commit b3233ecefd)
2008-05-15 02:42:41 +02:00
Michael Adam
86766b5220 loadparm: add a function process_registry_shares()
This loads the shares defined in registry into the services array.

Michael
(This used to be commit b3a90b7251)
2008-05-15 02:42:40 +02:00
Michael Adam
8cb4461044 loadparm: refactor processing of service out of process_registry_globals()
into new function process_registry_service().

Michael
(This used to be commit 2986e5174e)
2008-05-15 02:42:40 +02:00
Michael Adam
18b385ccef loadparm: refactor initalization of registry config out into lp_smbconf_ctx().
Michael
(This used to be commit 83cd9f74d5)
2008-05-15 02:42:40 +02:00
Michael Adam
1e161b8c81 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
(This used to be commit c1f300c76e)
2008-05-10 00:15:00 +02:00
Michael Adam
fb9232c0a9 libsmbconf: rewrite API to use smbconf_service struct
instead of lists of strings and counters directly...

Michael
(This used to be commit 17415e2dc4)
2008-04-23 01:43:31 +02:00
Michael Adam
00210d773b loadparm: reformat - fix whitespace/tab
Michael
(This used to be commit 3acc0d84dc)
2008-04-21 00:21:23 +02:00
Michael Adam
4244655e5b loadparm: rename bNoIncludes to bAllowIncludeRegistry (inverting logic)
This is what that variable controls now...

Michael
(This used to be commit bba04a8fba)
2008-04-21 00:21:23 +02:00
Michael Adam
318c983d82 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
(This used to be commit 1bb28bc1d8)
2008-04-21 00:21:23 +02:00
Stefan Metzmacher
49bf9d35cd loadparm: make it possible to just load the config without following "include =" statements
metze
(This used to be commit 6b5c76bf1e)
2008-04-18 14:43:07 +02:00
Michael Adam
2e1e83b4c0 loadparm: reactivate special semantics of "include = registry" for now.
This includes the configuration stored in HKLM/Software/Samba/smbconf .

Michael
(This used to be commit 42c7fb4ddf)
2008-04-17 18:39:00 +02:00
Michael Adam
b7bb61eff0 loadparm: remove pfunc parameter from process_registry_globals().
Use do_parameter() directly.

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

Michael
(This used to be commit fd43a4a1e0)
2008-04-10 01:29:02 +02:00
Michael Adam
2b84aea424 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
(This used to be commit 31b31171bd)
2008-03-26 14:55:05 +01:00
Michael Adam
6f7cfeddd6 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
(This used to be commit 96434d9dc7)
2008-03-21 18:19:24 +01:00
Michael Adam
fececde181 libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
(This used to be commit b3f6920ccb)
2008-03-21 02:25:56 +01:00
Michael Adam
adf5bf554c libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
(This used to be commit d7bd9bb8aa)
2008-03-21 02:25:56 +01:00
Michael Adam
153ed797e6 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
(This used to be commit 304dba6cb2)
2008-03-21 02:25:55 +01:00
Michael Adam
7621b4c3d8 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
(This used to be commit 5b6b90900a)
2008-03-21 02:25:55 +01:00
Michael Adam
f18722f889 loadparm: reenable checking files for updates while in registry configuration.
This is necessary now that includes (to files) are enabled from registry.

Michael
(This used to be commit 7dc64d1021)
2008-03-20 15:01:52 +01:00
Michael Adam
78d37365d4 loadparm: remove unneeded include.
libnet.h unneeded after separation of libsmbconf from libnet.

Michael
(This used to be commit 5c3f14e02f)
2008-03-20 15:01:52 +01:00
Michael Adam
6274929b1e libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
Michael
(This used to be commit 097af0309d)
2008-03-17 18:03:02 +01:00
Michael Adam
646f3b6fec loadparm: add a debug message.
Michael
(This used to be commit ce943aeb58)
2008-03-12 02:12:34 +01:00
Michael Adam
7af7afc594 loadparm: remove services read from smb.conf when starting over for config backend registry.
Michael
(This used to be commit b942ff6b7f)
2008-03-12 02:12:34 +01:00
Michael Adam
90fd5082a2 loadparm: add convenience wrapper lp_kill_all_services()
Michael
(This used to be commit 32bfd131e3)
2008-03-12 02:12:34 +01:00
Michael Adam
a3eae3039d loadparm: add a comment
Michael
(This used to be commit 05eda12525)
2008-03-12 02:12:34 +01:00
Michael Adam
e14e348d06 loadparm: fix a comment typo.
Michael
(This used to be commit 0a619d4dc4)
2008-03-12 02:12:33 +01:00
Michael Adam
62c9c6be22 loadparm: add utility function to check for config backend file.
Michael
(This used to be commit 288495ec1a)
2008-03-12 02:12:33 +01:00
Michael Adam
4f739abea5 loadparm: use a function to check for the registry config backend.
Michael
(This used to be commit 4ac52a5a1d)
2008-03-12 02:12:33 +01:00
Michael Adam
9fa02847b7 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
(This used to be commit f12259d9c4)
2008-03-10 17:22:41 +01:00
Michael Adam
080fedd25e loadparm: replace typedef struct {} global/service by struct global/struct service.
Michael
(This used to be commit ab70e781b2)
2008-03-10 17:22:40 +01:00
Michael Adam
ffb45fd8f8 loadparm: fix whitespaces in global and service parameter structs.
Michael
(This used to be commit 10ab0681e6)
2008-03-10 17:22:40 +01:00
Michael Adam
b99ca19040 loadparm: fix spacing in parm_table (training spaces and empty lines).
Michael
(This used to be commit 91aab823fc)
2008-03-10 17:22:40 +01:00
Michael Adam
d4c24fff32 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
(This used to be commit 869a17f1a9)
2008-03-10 17:22:40 +01:00
Derrell Lipman
914cd3e483 Eliminate global variable in_client and a plethora of extern declarations.
Derrell
(This used to be commit b7f34e7ef2)
2008-03-06 10:41:42 -05:00
Günther Deschner
ddd8bdedcb Fix lp_load with an empty registry and "config backend = registry". Michael, please check.
Guenther
(This used to be commit d9f4060c66)
2008-03-06 09:52:06 +01:00
Andreas Schneider
1751b533f0 Rename the 'hidden' variable to 'administrative share'.
(This used to be commit eff3d3bad5)
2008-02-29 13:08:04 +01:00
Jeremy Allison
22ac09c08c Remove my change
(This used to be commit 7bf4216644)
2008-02-28 02:13:48 -08:00
Jeremy Allison
9d37794a6c Fix debug %lu message.
Jeremy.
(This used to be commit 644a3be37a)
2008-02-28 02:07:06 -08:00
Andreas Schneider
d85c517b45 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.
(This used to be commit a3da677bf0)
2008-02-26 21:34:05 +01:00
Volker Lendecke
3176392878 Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0ae)
2008-02-25 16:09:26 +01:00
Michael Adam
6d963a807d 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
(This used to be commit d08a3a1957)
2008-02-19 09:09:05 +01:00
Michael Adam
9af84dd382 Rename registry_init_regdb() to registry_init_smbconf().
That's what it actually is.

Michael
(This used to be commit 9d3c27f557)
2008-02-15 16:23:10 +01:00
Michael Adam
7183e5811e Add support for LDAP debug output in Samba log file.
Logging of the ldap libraries appears with a [LDAP] prefix
inside the samba logs. This is controlled by two new parameters:

* "ldap debug level" sets the debug level of the ldap libraries.
  It is the bit-field as understood by the openldap server.

* "ldap debug threshold" is the samba debug level at which ldap
  logging appears inside the samba logs.

This probably needs some configure tests since it makes
use of the LBER_OPT_LOG_PRINT_FN option to redirect the
debug output of the ldap libraries.

Michael
(This used to be commit 15c25990bd)
2008-02-06 18:16:22 +01:00
Volker Lendecke
b361956942 str_list_free is not needed anymore
(This used to be commit feddc1447d)
2008-02-04 21:05:41 +01:00
Volker Lendecke
2762b9a975 Always pass a TALLOC_CTX to str_list_make and str_list_copy
(This used to be commit e2c9fc4cf5)
2008-02-04 20:57:49 +01:00
Volker Lendecke
587cf54c61 strtok -> strtok_r
(This used to be commit fd34ce4370)
2008-01-23 15:08:04 +01:00
Michael Adam
536bff4229 Do an explicit init_globals() when restarting for "config backend = registry".
Michael
(This used to be commit 487c43f928)
2008-01-20 03:54:57 +01:00
Volker Lendecke
60c3ec3fca Revert "default to tdbsam instead of smbpasswd"
This reverts commit ab8ff39fd5.
(This used to be commit 5838a9f556)
2008-01-16 21:26:16 +01:00
Volker Lendecke
088183896a default to tdbsam instead of smbpasswd
(This used to be commit ab8ff39fd5)
2008-01-16 20:37:56 +01:00
Michael Adam
422fbd0bbd Add my (C) to loadparm.c.
I think now that I have changed some substantial logic,
I should confess.... :-)

Michael
(This used to be commit 704ac0ba49)
2008-01-16 17:15:08 +01:00
Michael Adam
762ca95be7 Remove special semantics of "include = registry" from loadparm.c
This is now replaced by "config backend = registry".

Michael
(This used to be commit 5680181025)
2008-01-16 17:10:02 +01:00
Michael Adam
d3be7a7bdd Add utility function lp_config_backend_is_registry().
So external callers can determine if we are running on
registry config without knowing the internals.

Michael
(This used to be commit d8a7c3ec8e)
2008-01-16 17:10:02 +01:00
Michael Adam
1abc94e95b Initialise Globals.ConfigBackend from global var config_backend.
and use lp_config_backend() instead of config_backend.

Michael
(This used to be commit 9f69efe954)
2008-01-16 17:10:02 +01:00
Michael Adam
89b1c68b37 Add config parameter "config backend = registry".
This adds a new config parameter "config backend" that can have
values "file" (default) and "registry". When lp_load() encounters
a "config backend = registry", then all config read up to that
point is discarded and globals are read from registry.

This is done in suche a way that as with "config file",
there is no way back to non-registry config during the
lifetime of a process: The file_list_changed mechanism
does not look at files anymore once config backend is
set to registry. This is modelled after the behaviour
of the "config file" option.

Note that only the global section is read by lp_load().
The shares are handled by the registry shares mechanism,
thus allowing for a smaller memory footprint since
share definitions are read on demand.

This new parameter is intended as a substitute of the
previously installed special semantics of "include = registry"
which allows for messed up mixed configurations.
This parameter (which has not yet been released) will
vanish next.

Michael
(This used to be commit 77b33cf34c)
2008-01-16 17:10:02 +01:00
Michael Adam
789720e0ed Add "MSDFS options" separator to parm_table.
Michael
(This used to be commit a103509a46)
2008-01-16 17:10:02 +01:00
Michael Adam
f2b2e01fd8 Re-order an option block in parm_table to re-unite the misc options.
Michael
(This used to be commit 9e11768256)
2008-01-16 17:10:02 +01:00
Volker Lendecke
059be4dda0 Reduce stat cache size default
Now that we have a LRU scheme for the stat cache we can live with a lot less
(This used to be commit 9e736aab07)
2008-01-09 11:25:49 +01:00
Michael Adam
22068a0c16 Change registry_create_admin_token() to return NTSTATUS.
Michael
(This used to be commit 9cd30fb25c)
2008-01-09 01:47:10 +01:00
Michael Adam
3ff1fc3932 Extend a comment.
Michael
(This used to be commit 0814352507)
2008-01-09 01:47:10 +01:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Jeremy Allison
675f41dc14 Add "smb encrypt" parameter. Can be set to "no, yes, required".
Currently if set required this is not enforced. I'll be adding
that soon.
Jeremy.
(This used to be commit df7e447623)
2007-12-27 16:54:07 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Volker Lendecke
eeb92cedde Fix a C++ warning
(This used to be commit c31c7e3e24)
2007-12-21 09:58:20 +01:00
Volker Lendecke
e518e19bc0 Remove Get_Pwnam and its associated static variable
All callers are replaced by Get_Pwnam_alloc
(This used to be commit 735f593154)
2007-12-19 21:09:10 +01:00
Volker Lendecke
f427d4ce65 Add a in-memory cache
This is a more general API that caches data with a LRU scheme. See
include/cache.h. No comments yet, I'm still working on it. But Jeremy has given
me a hint in one of his checkins that he would like to make use of this now.

The idea is that we get rid of all our silly little caches and merge them all
into one cache that we can then very easily trim, for example even with a
smbcontrol message if someone decides memory is tight. The main user is the
stat cache, this patch also converts the getwd cache. More caches to come.
(This used to be commit 7a911b3571)
2007-12-18 09:56:04 +01:00
Günther Deschner
b0614071bf Add lp_include_registry_globals().
Guenther
(This used to be commit d30b945e99)
2007-12-12 00:58:58 +01:00
Volker Lendecke
ff1a79f24b Remove two completely unnecessary globals
Can someone look over this? To me it looks as if bufr was only made static to
save a malloc during an included smb.conf file. I think that's pretty much
pointless.
(This used to be commit 068e8de72c)
2007-12-10 12:36:43 -08:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Volker Lendecke
0c0054fe16 use dbwrap_rbt in loadparm.c
(This used to be commit e816293395)
2007-12-10 16:06:32 +01:00
Volker Lendecke
307396435b Convert ServiceHash to dbwrap
(This used to be commit 66bd6837b5)
2007-12-10 16:06:32 +01:00
Jeremy Allison
ade51769d5 We don't need P_GSTRING or P_UGSTRING anymore.
Jeremy.
(This used to be commit 78dc756000)
2007-12-07 12:43:10 -08:00
Jeremy Allison
acf15ae730 Don't build rpctorture anymore - not maintained. Just remove.
Remove all vestiges of pstring (except for smbctool as noted
in previous commit).
Jeremy
(This used to be commit 4c32a22ac5)
2007-12-07 12:26:32 -08:00
Volker Lendecke
78c6ee0090 Remove some globals
(This used to be commit 31d0a846db)
2007-12-05 14:39:07 +01:00
Günther Deschner
4b9f336a62 Move param helper routines to one place.
Guenther
(This used to be commit 6bf2c8038c)
2007-11-30 22:25:01 +01:00
Jeremy Allison
b11e6f2158 Save one extra strdup per lp_string. Use talloc_sub_basic()
directly.
Jeremy.
(This used to be commit f1e401ef5c)
2007-11-27 19:12:42 -08:00
Jeremy Allison
68be9a8200 More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to
remain until I've removed all pstrings from the client code.
Jeremy.
(This used to be commit 1ea3ac8014)
2007-11-15 14:19:52 -08:00
Jeremy Allison
7a3ece4145 Remove pstring from param/
This was a little tricky..... I'll watch the
build farm.
Jeremy.
(This used to be commit d6e2519c67)
2007-11-13 18:42:42 -08:00
Volker Lendecke
e63bcdd720 Remove the silly "user_socket_options" global variable
This is better done with a 'lp_do_parameter(-1, "socket options", ..);
(This used to be commit 814bed029e)
2007-11-09 15:11:54 +01:00