summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-01save memoryVolker Lendecke1-12/+15
Hi! Attached find a patch that I've wanted to check in for ages. The whole area probably needs a major rewrite, but this is a minimal patch that on a 32-bit box saves 1.5k per smbd per defined share, twice as much on a 64-bit box. Volker From ebb80e664ecc49eb597a45cb57e1067fbae49e62 Mon Sep 17 00:00:00 2001 From: Volker Lendecke <vl@sernet.de> Date: Wed, 31 Oct 2007 15:04:34 +0100 Subject: [PATCH] Change global->copymap from bool* to a bitmap We right now have 401 parameters, so with bool being represented as a 64-bit integer this saves about 3k of memory per smbd per share that is defined in smb.conf. (This used to be commit 94f2c35a683eace7f9f3dad9748aaec93f7c534f)
2007-10-30Add new parameter, "min receivefile size" (by default setJeremy Allison1-0/+5
to zero). If non-zero, writeX calls greater than this value will be left in the socket buffer for later handling with recvfile (or userspace equivalent). Definition of recvfile for your system is left as an exercise for the reader (I'm working on getting splice working :-). Jeremy. (This used to be commit 11c03b75ddbcb6e36b231bb40a1773d1c550621c)
2007-10-21Fix two type-punned warningsVolker Lendecke1-3/+3
(This used to be commit 04d660bbb371f859cc50a9f3ea7d358f74acfa8b)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-283/+282
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-3/+9
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25564: Pass sharename to delete_share_security()Volker Lendecke1-2/+2
(This used to be commit d100bfffe2a503b8820889faedc6ed57100ca7af)
2007-10-10r25434: Add the option to print the debug class (DBGC_CLASS) in the debug ↵Michael Adam1-0/+4
header. Control this by a new boolean smb.conf option "debug class" which is by default set to "no" to keep the default debug header unchanged. Michael Note: You need to make clean for this patch. (This used to be commit 066a46ba91ca734d9e20cb9d6db36fec209a27d7)
2007-10-10r25049: Set new, more secure defaults for Samba 3.2.Andrew Bartlett1-4/+4
Andrew Bartlett (This used to be commit 87d39f61b498c1327c2b3a818e41bb6451fe7518)
2007-10-10r25036: Fix a become/unbecome_root() pairVolker Lendecke1-1/+1
(This used to be commit 9e53f50e9489a5f6cfa40eed59be39e8a294db7d)
2007-10-10r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison1-4/+0
interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy. (This used to be commit dee8beba7a92b8a3f68bbcc59fd0a827f68c7736)
2007-10-10r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke1-39/+5
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 6585ea2cb7f417e14540495b9c7380fe9c8c717b)
2007-10-10r24639: Add parameter "directory name cache size" - parameterizeJeremy Allison1-1/+8
use of directory name cache, 100 by default. Will be needed to turn this off for *BSD systems. Jeremy. (This used to be commit bea8e9840fd65268e649f813eba10502b0c4d721)
2007-10-10r24636: Raise one debug level, since the callers (that want to do so)Michael Adam1-1/+1
issue a level 0 debug message. Michael (This used to be commit c0022ff9278a06b92a550cf0d6a8e75af31a673c)
2007-10-10r24616: In set_boolean(), only pass the result back to the callerMichael Adam1-1/+2
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 bf0daa74fadcd506b80c29d04ccf6ec7345ee0e1)
2007-10-10r24602: Add function lp_string_is_valid_boolean() to check if a stringMichael Adam1-2/+18
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 d13eaa60f504987445b7333ef6972491c9483e6a)
2007-10-10r24572: Allow for functions map_parameter_canonical() and is_synonym_of() toMichael Adam1-11/+33
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 07dc0fecf5116b34e468bddae8b36920c492717a)
2007-10-10r24527: Add a function lp_canonicalize_parameter_with_value that turnsMichael Adam1-0/+45
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 3b762ab18392fd06427957b0263262e3b8e34b9d)
2007-10-10r24526: Refactor determiniation of the index of the canonical form of aMichael Adam1-15/+35
parameter given in string representation into a function of its own (map_parameter_canonical). Michael (This used to be commit 0dfb5eee25e287c129f7d34e4d079c60d56dce59)
2007-10-10r24525: Add output of synonym information to show_parameter_list().Michael Adam1-8/+52
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 fd2dbae82594c6d6ab10a7318f127aea0a9a61ea)
2007-10-10r24519: Refactor printing of one parameter into a helper function of its own.Michael Adam1-30/+42
(This used to be commit 70dfe5d098b5d815e652b82fca57be0eb826f820)
2007-10-10r24510: Fix logic. Thanks to Volker for the hint!Michael Adam1-1/+1
Michael (This used to be commit ce1d7ad1acb48a254add3ddfac5f13e05b8ec646)
2007-10-10r24495: Add a function lp_canonicalize_parameter: It takes a name of a parameterMichael Adam1-0/+108
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 113ac07199aaf2271af6eba2611dad429ee4c416)
2007-10-10r24453: Remove the read and write bmpx callsVolker Lendecke1-4/+0
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 d941aae2dfd11609e807bf4ce712571a2e354627)
2007-10-10r24266: Remove the "open files database hash size" parameterVolker Lendecke1-1/+0
This has been superseded by the "tdb_hashsize:<tdbname>" parameter (This used to be commit df40d336afd256f05a0ec3724cc2096fb7114d81)
2007-10-10r24072: Add "client ldap sasl wrapping" parameter.Stefan Metzmacher1-1/+10
Possible values are "plain" (default), "sign" or "seal". metze (This used to be commit 26ccbad7212e9acd480b98789f04b71c1e940ea8)
2007-10-10r24027: merge from http://people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:Stefan Metzmacher1-0/+4
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 98c57562c4dcf04b72a1e4ad5d9f5cf48e7d0b28)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23666: Rename lp_parameter_valid -> lp_parameter_is_valid.Michael Adam1-1/+1
Michael (This used to be commit 7f85cff49dfe1ae90e37162d35f1a48baaa9fe79)
2007-10-10r23657: Prevent setting of a global option in a share definitionMichael Adam1-0/+18
in "net conf setparm". Michael (This used to be commit bf92d567984f00ebb998fb2485d0aac87d30b924)
2007-10-10r23656: Add initial checking of the validity of a paramterMichael Adam1-0/+12
given to "net conf setparm". Add a utility function lp_parameter_valid() for this to loadparm.c. Michael (This used to be commit 639051e58d4da9fb1116c19f0790250640b6ac7a)
2007-10-10r23641: Put check for forbidden values in smbconf into a function.Michael Adam1-4/+1
(This will be used in a next step to prevent storing these values in reg_smbconf.c.) Michael (This used to be commit 00be68a8416405e12a27186506f9eb15bca055b3)
2007-10-10r23592: Change a debuglevel to not clutter output when callingMichael Adam1-1/+1
net as a non-root user, e.g. Michael (This used to be commit bbbfd7f41ab85f269d115f19601729f16079b552)
2007-10-10r23579: Up to now, the "allparameters" argument to lp_next_parameter wasMichael Adam1-0/+3
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 56f82485ec3b14ddcbcf7f5823926a94b17683f3)
2007-10-10r23575: Fix a segfault when lp_load is called before init_registry.Michael Adam1-0/+2
Michael (This used to be commit 235a5ae4cdf3ea238728c2e89a4318c18257426a)
2007-10-10r23553: Also ignore "lock directory" in registry global options.Michael Adam1-2/+5
Michael (This used to be commit 3695a66166c6aa88051b21ad40a19f1cc8b87c7b)
2007-10-10r23552: Use proper comparison function an fix logic.Michael Adam1-1/+1
Michael (This used to be commit a4714b34284f9e205556166166f41ce9dad4d3da)
2007-10-10r23548: Fix comments.Michael Adam1-3/+3
Michael (This used to be commit 73e41c1d0a7af7488b35b54182ea532103b51fd4)
2007-10-10r23547: Ignore parameter "include" in regsitry globals.Michael Adam1-0/+5
Michael (This used to be commit f0992c0d79bb6a5810c84a9eac208d83390bb047)
2007-10-10r23513: Fix one more use of VALUE_PREFIX.Jeremy Allison1-1/+1
Jeremy. (This used to be commit fca5637dc6c91a57c4e087670068688557e5bf32)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach1-1/+1
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r23509: This activates the global options from the registry in loadparm.Michael Adam1-0/+265
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 24b0cbcb3741dd14b04728448a85cc04a057e7d0)
2007-10-10r23472: add missing default setting for 'winbind nss info' (merge from 3.0.26)Gerald Carter1-0/+1
(This used to be commit 1f80f9d14553650fb9d24f1d4c36e5cf7986ce23)
2007-10-10r23471: Here's a rough patch for expanding domain group membershipGerald Carter1-0/+4
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 3d3a8130351753dc5caa2a270d130e2150da6b54)
2007-10-10r23410: Merge the core of the cluster code.Volker Lendecke1-0/+9
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 15553d6327a3aecdd2b0b94a3656d04bf4106323)
2007-10-10r23368: Make "winbind:rpc only" a full blown parameter. Thanks to Karolin forVolker Lendecke1-0/+3
the patch :-) (This used to be commit 07b71a02aef15b75d281cabeb7140db1bc0bb283)
2007-10-10r22648: Fix comment to match the code.James Peach1-1/+1
(This used to be commit e93d33b4631e634499b2e74c31d483d306d10367)
2007-10-10r22285: Allow arbitrary bases in int and ulong parsing.Jeremy Allison1-2/+2
Jeremy. (This used to be commit c1f1949ff134c343cb0ee8f8e46cf58b1dfe97c7)
2007-10-10r22266: Fix bug #4512 - we were returning a volume label greater thanJeremy Allison1-6/+13
32 unicode chars. Windows XP doesn't like that :-). Jeremy (This used to be commit e59b5276b56d6963ddd0598bbd1b15426d2d13e8)
2007-10-10r21959: Merge a comment fix from Michael Adam -- more to come :-)Volker Lendecke1-1/+2
(This used to be commit 06a4d2ce5d4d5d637f19c7444a6510a1bbad7a9f)