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

1139 Commits

Author SHA1 Message Date
Andrew Bartlett
3ab3159f75 s3-param check for aliases with both p_class and offset
This bug was found when comparing with the source4 loadparm code.

Andrew Bartlett
2011-07-08 11:23:23 +02:00
Andrew Bartlett
6e6aaacedb lib/util Move bitmap.c to lib/util 2011-07-08 11:23:23 +02:00
Andrew Bartlett
6b2749f8a9 param: Add hooks to s3 parm_struct and the parameters void * pointer
This is to that the pyparam hooks can use the hooks to connect with
the s3 loadparm system.  This now also includes per-service
parameters.

Andrew Bartlett
2011-07-08 11:23:23 +02:00
Andrew Bartlett
60f353a144 s3-param: calculate default_server_announce at runtime 2011-07-08 11:23:23 +02:00
Andrew Bartlett
fad3c763f7 s3-param Remove lp_set_passdb_backend() 2011-07-08 11:23:23 +02:00
Andrew Bartlett
2240ac96c1 s3-param Remove #defines already in common loadparm.h 2011-07-02 12:31:35 +10:00
Andrew Bartlett
4f3a155fb5 s3-param Generate parameter tables 2011-07-02 12:31:34 +10:00
Andrew Bartlett
d4ef70a764 param: Finish conversion from lp_wins_support() -> lp_we_are_a_wins_server()
Jermey started this in 1997 with 0aa493cc03

(avoiding the duplicate function makes it easier to generate the
struct loadparm_globals).

Andrew Bartlett
2011-07-02 12:31:34 +10:00
Andrew Bartlett
6d8cc418ba s3-param remove unused bIdmapReadOnly 2011-07-02 12:31:34 +10:00
Andrew Bartlett
b459a6d7c6 s3-param Remove unused bUpdateEncrypt 2011-07-02 12:31:34 +10:00
Andrew Bartlett
489f528857 param: Merge param headers into lib/param/loadparm.h
This defines a common table format, so we can in future define a
common table.

Andrew Bartlett
2011-06-29 15:44:09 +10:00
Andrew Bartlett
ff13827537 s3-param use C99 boolean for false 2011-06-29 15:44:09 +10:00
Andrew Bartlett
f8c0a89939 s3-param use C99 boolean for true 2011-06-29 15:44:09 +10:00
Andrew Bartlett
9adc0e9ed8 s3-param Convert sDefault to C99 initialisers
The conversion has been verified with gdb (p sDefaults before and after)

C99 booleans were helpfully provided by gdb, which was used to generate
the C99 format, and so have been kept.

Andrew Bartlett
2011-06-29 15:44:09 +10:00
Andrew Bartlett
658f55bbb7 s3-param Remove unused FLAG_DOS_STRING 2011-06-29 15:44:08 +10:00
Andrew Bartlett
7198d540e8 param: Merge struct parm_struct definitions
This will allow the parameter tables to be shared between source3 and
source4.

Andrew Bartlett
2011-06-29 15:44:08 +10:00
Andrew Bartlett
21756b7c7d s3-param Use .offset rather than .ptr when defining parameters
This change has a number of purposes:

 * It removes the fancy logic around pointers into sDefault for all
   per-share parameters.  Instead, this is always expressed as an
   offset, rather than implicitly via PTR_DIFF macros.

 * It makes struct parm_struct almost identical to that as used in
   source4/param.  This will very shortly allow the loadparm tables
   and most of the 'special' helper functions to be placed in common.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun 29 05:50:46 CEST 2011 on sn-devel-104
2011-06-29 05:50:46 +02:00
Andrew Bartlett
573109d346 s3-param Remove .offset == 0 checks as 'valid' will have offset 0
The validity of an entry in the parm_table is by having a .p_class of
P_LOCAL or P_GLOBAL rather than P_SEPARATOR.  Termination of the table
is by having a .label of non-NULL.  This is possible because there are
no longer any specially handled smb.conf options without a value in
the struct loadparm_globals or struct loadparm_service.

This is required because the first element in the structure will have
.offset = 0, and skipping that would be unfortunate (particularly as it
is the vital 'valid' variable).

Andrew Bartlett
2011-06-29 04:42:04 +02:00
Andrew Bartlett
0e38199a84 s3-param use .offset rather than .ptr (renames)
This commit uses GLOBAL_VAR and LOCAL_VAR macros to hide the use of .ptr
in the source3 loadparm code.

This will then be changed to use offsetof() in a future commit, removing
the #define offset ptr hack.

Andrew Bartlett
2011-06-29 04:42:03 +02:00
Andrew Bartlett
e63d5d2cd5 s3-param use lp_parm_ptr() rather than parm.ptr directly
This will help with a change from .ptr to .offset

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun 29 03:26:21 CEST 2011 on sn-devel-104
2011-06-29 03:26:21 +02:00
Andrew Bartlett
dd7d655b83 s3-param Rename struct service and struct globals
The rename of struct service -> loadparm_service and struct globals ->
loadparm_globals makes this match the names used in source4/param, and
is one step towards a single loadparm definition.

Andrew Bartlett
2011-06-28 09:33:05 +02:00
Andrew Bartlett
ed2b452024 s3-param Remove lp_parm_string
Samba 4.0 makes no attempt to provide a loader environment that
will allow a module that is not rebuilt to operate.

Andrew Bartlett
2011-06-28 09:33:05 +02:00
Andrew Bartlett
9d72efd374 s3-param make lp_passdb_backend() a normal lp_ function again
It is now a large number of releases since the multiple passdb backend
support was removed in 3.0.23.

Andrew Bartlett
2011-06-28 09:33:05 +02:00
Andrew Bartlett
734e1b6812 s3-param Remove 'announce version' parameter
The only users I can find of this on the internet involve confused
users, and our own documentation recommends never setting this.  Don't
confuse our users any longer.

Andrew Bartlett
2011-06-23 13:47:27 +02:00
Andrew Bartlett
38b5beb33d param: Remove "announce as" parameter 2011-06-23 13:47:27 +02:00
Andrew Bartlett
125a2ff262 lib/util/charset: Remove 'display charset'
As discussed in 'CH_DISPLAY and gettext' on the samba-technical list:
http://lists.samba.org/archive/samba-technical/2011-June/078190.html

Setting this to a value other than 'unix charset' does not make sense,
as any system where the filesytem charset does not equal the terminal
charset will already have problems with programs as simple as 'ls'.
It also means that our output could not be pasted as our input in
interactive programs or onto our command line, as we never did
translate in the DISPLAY -> UNIX direction.

The d_printf() calls are retained in case we need to revisit this, and
to support display_set_stderr().

Andrew Bartlett
2011-06-23 13:47:27 +02:00
Andrew Bartlett
ea006ab8b2 s3-param Put &Globals in the FN_ macros, rather than in each entry
This global replace allows an easier comparison between the source3
and source4 loadparm systems.

Andrew Bartlett
2011-06-21 09:35:34 +10:00
Andrew Bartlett
530e4cac2e s3-param Remove 'time offset' from smb.conf
This strange parameter is apparently very rarely used, and it seems to
me that on modern networks, if clients don't have correct clocks and
DST offsets, that many other things (Kerberos) start to fail pretty
quickly, and time and DST tables tend to be internet delivered anyway.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Jun 11 03:54:45 CEST 2011 on sn-devel-104
2011-06-11 03:54:44 +02:00
Andrew Bartlett
91f351568a s3-param Avoid strupper_m() where possible.
Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jun 10 04:37:54 CEST 2011 on sn-devel-104
2011-06-10 04:37:54 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
f348d148b4 s3-param Remove special case for global_scope()
There is no reason this can't be a normal constant string in the
loadparm system.  (Past reasons were that we didn't have lp_set_cmdline())

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
3ccc760947 s3-param Remove special case for lp_workgroup()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
b9108cac52 s3-s4-param: Add hooks for parametric options in the s3/s4 glue layer
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun  6 10:48:53 CEST 2011 on sn-devel-104
2011-06-06 10:48:53 +02:00
Andrew Bartlett
1dfc6fa558 s4-param Add hook between Samba3 and Samba4 loadparm systems.
In the top level build, this allows calls to code that requires a
lpcfg_ style loadparm_context, while using the global parameters
loaded from the source3 loadparm code.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
698538e594 s3-param always allow the realm parameter 2011-06-06 17:37:50 +10:00
Andrew Bartlett
5a8218b147 s3-param Make lp_ncalrpc_dir() const
This disables % substitutions in the 'ncalrpc dir' parameter.  This is
used as a communication point between multiple parts of the codebase,
and needs to be internally consistent between all the Samba tasks.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  1 05:30:53 CEST 2011 on sn-devel-104
2011-06-01 05:30:53 +02:00
Andrew Bartlett
b9d61ef55a s3-param Make lp_dedicated_keytab_file() const
This disables % substitutions in the 'dedicated keytab file' parameter.

Andrew Bartlett
2011-06-01 04:19:06 +02:00
Andrew Bartlett
edc3041093 s3-param Make lp_realm() const
This disables % substitutions in the 'realm' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
860b43737c s3-param Make lp_name_resolv_order() const
This disables % substitutions in the 'name resolv order' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
08a72f3a15 s3-param Make lp_utmpdir() and lp_wtmpdir const
This disables % substitutions in the 'utmp dir' and 'wtmp dir'
parameters.  These are system paths, and need to be consistent between
all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
47ece3f897 s3-param Make lp_piddir() const
This disables % substitutions in the 'pid dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
a0758bb5e5 s3-param Make lp_cachedir() const
This disables % substitutions in the 'cache dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
9aef68f4c2 s3-param Make lp_statedir() const
This disables % substitutions in the 'state dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
5f176378a8 s3-param Make lp_lockdir() const
This disables % substitutions in the 'lock dir' parameter.  This is
used all over the codebase, and needs to be internally consistent
for the life of the process, as they determine the location of
our locking databases.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
f331936db2 s3-param Make lp_smb_passwd_file() and lp_private_dir() const
This disables % substitutions in the 'smb passwd file' and 'private
dir' parameters.  These are used all over the codebase, and need to be
internally consistent for the life of the process, as they determine
the location of secrets.tdb, as well as the passdb databases.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
a74e7fbc6a s3-param Make lp_smb_ports() const
It makes no sense to have a % substiution in the 'smb ports' parameter.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
f52b97a129 s3-param Make charset parameters const
This removes the dangerous ability for these parameters to change
based on % substitutions.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
ec9ff19e60 s3-param Make lp_passwordserver() const.
This means that it no longer takes % substituations, and so the documentation for this behaviour is removed from the smb.conf manpage.  (This mode is only useful in security=server, which is already marked as deprecated in 3.6).

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
8d639feed9 s3-param Move init_iconv() to loadparm.c
This assists with some dependency loops

Andrew Bartlett
2011-05-31 00:32:07 +02:00