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

782 Commits

Author SHA1 Message Date
Andrew Bartlett
3428c63aa7 r25049: Set new, more secure defaults for Samba 3.2.
Andrew Bartlett
(This used to be commit 87d39f61b4)
2007-10-10 12:30:36 -05:00
Volker Lendecke
325b342f31 r25036: Fix a become/unbecome_root() pair
(This used to be commit 9e53f50e94)
2007-10-10 12:30:36 -05:00
Jeremy Allison
132ee3990a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
(This used to be commit dee8beba7a)
2007-10-10 12:30:32 -05:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Jeremy Allison
f1041f98ce r24639: Add parameter "directory name cache size" - parameterize
use of directory name cache, 100 by default. Will be needed
to turn this off for *BSD systems.
Jeremy.
(This used to be commit bea8e9840f)
2007-10-10 12:30:13 -05:00
Michael Adam
85d0c15da4 r24636: Raise one debug level, since the callers (that want to do so)
issue a level 0 debug message.

Michael
(This used to be commit c0022ff927)
2007-10-10 12:30:12 -05:00
Michael Adam
aa1c863063 r24616: In set_boolean(), only pass the result back to the caller
if parsing of the boolean string was successful.
Also, initialize the local result variable
(although not strictly necessary anymore, now.)
(This used to be commit bf0daa74fa)
2007-10-10 12:30:10 -05:00
Michael Adam
b9a7a2b966 r24602: Add function lp_string_is_valid_boolean() to check if a string
contains a correct representation of a boolean value (in the
understanding of loadparm.c).

Make set_boolean() catch passing NULL for the boolean target.

Michael
(This used to be commit d13eaa60f5)
2007-10-10 12:30:09 -05:00
Michael Adam
987d7010f8 r24572: Allow for functions map_parameter_canonical() and is_synonym_of() to
be called with inverse == NULL.

Add a new function lp_parameter_is_canonical() to check whether a
parameter name is the canonical name (as apposed to an alias).

Michael
(This used to be commit 07dc0fecf5)
2007-10-10 12:30:07 -05:00
Michael Adam
c56874d112 r24527: Add a function lp_canonicalize_parameter_with_value that turns
a parameter and value into the canonical paramter with the value
inverted if it was in invers boolean synonym.

Make net conf use this function when storing parameters.

Michael
(This used to be commit 3b762ab183)
2007-10-10 12:29:54 -05:00
Michael Adam
bb76f3f98e r24526: Refactor determiniation of the index of the canonical form of a
parameter given in string representation into a function of its
own (map_parameter_canonical).

Michael
(This used to be commit 0dfb5eee25)
2007-10-10 12:29:54 -05:00
Michael Adam
7190e7515b r24525: Add output of synonym information to show_parameter_list().
Also simplify lp_canonicalize_parameter by making use of
the new function "is_synonym_of".

Michael

Note: If anything depends on the exact former output format of
show_parameter list, I would trigger the output of synonym information
by a boolean verbose switch (that could be passed to testparm
via the "-v" command line switch).
(This used to be commit fd2dbae825)
2007-10-10 12:29:53 -05:00
Michael Adam
b2455bb8d2 r24519: Refactor printing of one parameter into a helper function of its own.
(This used to be commit 70dfe5d098)
2007-10-10 12:29:53 -05:00
Michael Adam
ed4b40e9cb r24510: Fix logic. Thanks to Volker for the hint!
Michael
(This used to be commit ce1d7ad1ac)
2007-10-10 12:29:53 -05:00
Michael Adam
bf374d3d3d r24495: Add a function lp_canonicalize_parameter: It takes a name of a parameter
and produces the "canonical" (or main) name of the parameter (the one
synonym that does not have the flag FLAG_HIDE). The function also sets
a flag as to whether the synonym is a reverse boolean synonym.

Add some functions for the handling of string representations of boolean
values: return the canonical string representation of a bool, invert
a bool given as a string, canonicalize a bool given as a string.

Michael
(This used to be commit 113ac07199)
2007-10-10 12:29:52 -05:00
Volker Lendecke
24f42c5cef r24453: Remove the read and write bmpx calls
Talked to both Tridge and Jeremy about this, Tridge said that there is a
special error message persuading OS/2 to fall back to other methods.
The calls now checked in always return the error message we used to
return when "read bmpx = False" was set (the default): ERRSRV, ERRuseSTD.

If someone has a reproducable test case where this is really needed, we
can always dig it up from version control and convert it to the new API.
But that time without that silly parameter, and with a torture test case
for "make test" please :-)

Volker
(This used to be commit d941aae2df)
2007-10-10 12:29:49 -05:00
Volker Lendecke
28210588ed r24266: Remove the "open files database hash size" parameter
This has been superseded by the "tdb_hashsize:<tdbname>" parameter
(This used to be commit df40d336af)
2007-10-10 12:29:22 -05:00
Stefan Metzmacher
31dc9126c1 r24072: Add "client ldap sasl wrapping" parameter.
Possible values are "plain" (default), "sign" or "seal".

metze
(This used to be commit 26ccbad721)
2007-10-10 12:29:02 -05:00
Stefan Metzmacher
4ce5c36367 r24027: merge from http://people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:
add in any cluster addresses. We need to response to these,
but not listen on them. This allows us to run nmbd on every
node in the cluster, and have all of them register with a
WINS server correctly

metze
(This used to be commit 98c57562c4)
2007-10-10 12:28:57 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Michael Adam
f26abd78b1 r23666: Rename lp_parameter_valid -> lp_parameter_is_valid.
Michael
(This used to be commit 7f85cff49d)
2007-10-10 12:23:44 -05:00
Michael Adam
e388130aa6 r23657: Prevent setting of a global option in a share definition
in "net conf setparm".

Michael
(This used to be commit bf92d56798)
2007-10-10 12:23:42 -05:00
Michael Adam
2073303664 r23656: Add initial checking of the validity of a paramter
given to "net conf setparm". Add a utility function
lp_parameter_valid() for this to loadparm.c.

Michael
(This used to be commit 639051e58d)
2007-10-10 12:23:42 -05:00
Michael Adam
72f468088f r23641: Put check for forbidden values in smbconf into a function.
(This will be used in a next step to prevent storing these
values in reg_smbconf.c.)

Michael
(This used to be commit 00be68a841)
2007-10-10 12:23:40 -05:00
Michael Adam
e8f99045c4 r23592: Change a debuglevel to not clutter output when calling
net as a non-root user, e.g.

Michael
(This used to be commit bbbfd7f41a)
2007-10-10 12:23:34 -05:00
Michael Adam
de81984b5e r23579: Up to now, the "allparameters" argument to lp_next_parameter was
not effective for the global section (snum < 0). This checkin
makes it effective for the global section, too.

This does not produce changes in the results of the present calls of
lp_next_parameter: Beside the new use in utils/net_conf.c (which is
hereby fixed), the only calls of lp_next_parameter are in web/swat.c,
where it is effectively always called with allparameters == 1.

Michael
(This used to be commit 56f82485ec)
2007-10-10 12:23:32 -05:00
Michael Adam
510ba543cc r23575: Fix a segfault when lp_load is called before init_registry.
Michael
(This used to be commit 235a5ae4cd)
2007-10-10 12:23:31 -05:00
Michael Adam
04c75d9c95 r23553: Also ignore "lock directory" in registry global options.
Michael
(This used to be commit 3695a66166)
2007-10-10 12:23:28 -05:00
Michael Adam
9b11c3e08f r23552: Use proper comparison function an fix logic.
Michael
(This used to be commit a4714b3428)
2007-10-10 12:23:28 -05:00
Michael Adam
0d4e977f5d r23548: Fix comments.
Michael
(This used to be commit 73e41c1d0a)
2007-10-10 12:23:27 -05:00
Michael Adam
0027ca86b6 r23547: Ignore parameter "include" in regsitry globals.
Michael
(This used to be commit f0992c0d79)
2007-10-10 12:23:27 -05:00
Jeremy Allison
ebb53d7288 r23513: Fix one more use of VALUE_PREFIX.
Jeremy.
(This used to be commit fca5637dc6)
2007-10-10 12:23:24 -05:00
James Peach
b1ce226af8 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2)
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 24b0cbcb37)
2007-10-10 12:23:23 -05:00
Gerald Carter
bfbf08adff r23472: add missing default setting for 'winbind nss info' (merge from 3.0.26)
(This used to be commit 1f80f9d145)
2007-10-10 12:23:19 -05:00
Gerald Carter
78d6b95e18 r23471: Here's a rough patch for expanding domain group membership
in the winbindd_getgrnam() call.  Couple of comments:

* Adds "winbind expand groups" parameter which defines the
  max depth winbindd will expand group members.  The default
  is the current behavior of one level of expansion.
* The entire getrgnam() interface should be async.  I
  haven't done that.
* Refactors the domain users hack in fill_grent_mem() into
  its own function.
(This used to be commit 3d3a813035)
2007-10-10 12:23:19 -05:00
Volker Lendecke
de565785f5 r23410: Merge the core of the cluster code.
I'm 100% certain I've forgotten to merge something, but the main code
should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and
messages_ctdbd.c.

There should be no changes to the non-cluster case, it does survive make
test on my laptop.

It survives some very basic tests with ctdbd enables, I did not do the
full test suite for clusters yet.

Phew...

Volker
(This used to be commit 15553d6327)
2007-10-10 12:23:14 -05:00
Volker Lendecke
4a99ee0236 r23368: Make "winbind:rpc only" a full blown parameter. Thanks to Karolin for
the patch :-)
(This used to be commit 07b71a02ae)
2007-10-10 12:23:10 -05:00
James Peach
68d5d934bb r22648: Fix comment to match the code.
(This used to be commit e93d33b463)
2007-10-10 12:19:52 -05:00
Jeremy Allison
e459831b5a r22285: Allow arbitrary bases in int and ulong parsing.
Jeremy.
(This used to be commit c1f1949ff1)
2007-10-10 12:19:24 -05:00
Jeremy Allison
74a07edb50 r22266: Fix bug #4512 - we were returning a volume label greater than
32 unicode chars. Windows XP doesn't like that :-).
Jeremy
(This used to be commit e59b5276b5)
2007-10-10 12:19:23 -05:00
Volker Lendecke
643157ff5a r21959: Merge a comment fix from Michael Adam -- more to come :-)
(This used to be commit 06a4d2ce5d)
2007-10-10 12:18:52 -05:00
Gerald Carter
f8c2960d45 r21905: Rename
idmap expire time 	-> idmap cache time
  idmap negative time	-> idmap negative cache time
(This used to be commit aac2d0af5e)
2007-10-10 12:18:48 -05:00
Volker Lendecke
93b2485c9b r21892: Mini-Patch from Michael
(This used to be commit 6cae3cf281)
2007-10-10 12:18:46 -05:00
Gerald Carter
52d5e2a935 r21884: * Blacklist BUILTIN and MACHINE domains from the
idmap domains as these should only be handled by the
  winbindd_passdb.c backend

* Allow the alloc init to fail for backwards compatible
  configurations like

     idmap backend = ad
     idmap uid = 1000-100000
	....

* Remove the deprecated flags from idmap backend, et. al.
  These are mutually exclusive with the new configuration
  options (idmap domains).  Logging annoying messages
  about deprecated parameters is confusing.  So we'll try
  this apprpach for now.
(This used to be commit 5e30807b4e)
2007-10-10 12:18:44 -05:00
Volker Lendecke
7c2bc9c070 r21869: Move sending keepalives out of the main processing loop into idle event.
On the way, make lp_keepalive() a proper parameter.

Volker
(This used to be commit 9499fd9c80)
2007-10-10 12:18:41 -05:00
Volker Lendecke
80a78b0aa8 r21866: Remove unused "lock spin count" parameter
(This used to be commit 52f2c89c0a)
2007-10-10 12:18:40 -05:00
Herb Lewis
93128b863b r21825: add debug prefix timestamp to allow "short timestamps" to be
added to debug messages
(This used to be commit 4af2795e65)
2007-10-10 12:18:37 -05:00