1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

816 Commits

Author SHA1 Message Date
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
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
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