[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha2-821-gb0991cc
Kai Blin
kai at samba.org
Thu Feb 14 11:32:59 GMT 2008
The branch, v4-0-test has been updated
via b0991cc09b36171c18d2407c9f3153b6f7e8299b (commit)
via abc816b3884838441ab379c9e31e16937caa4734 (commit)
from 96736eb556bfd7ab5b04ec40beefe23e475a438d (commit)
http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit b0991cc09b36171c18d2407c9f3153b6f7e8299b
Author: Kai Blin <kai at samba.org>
Date: Wed Feb 13 23:35:43 2008 +0100
util_ldb: Add a missing \n to debug string, fix trailing whitespaces.
commit abc816b3884838441ab379c9e31e16937caa4734
Author: Kai Blin <kai at samba.org>
Date: Sun Feb 10 13:01:20 2008 +0100
loadparm: Clean up trailing whitespace
No code change. Couldn't resist.
-----------------------------------------------------------------------
Summary of changes:
source/lib/util/util_ldb.c | 17 ++-
source/param/loadparm.c | 326 ++++++++++++++++++++++----------------------
2 files changed, 172 insertions(+), 171 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/util/util_ldb.c b/source/lib/util/util_ldb.c
index a8719af..f1b42ef 100644
--- a/source/lib/util/util_ldb.c
+++ b/source/lib/util/util_ldb.c
@@ -1,21 +1,21 @@
-/*
+/*
Unix SMB/CIFS implementation.
common share info functions
Copyright (C) Andrew Tridgell 2004
Copyright (C) Tim Potter 2004
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -56,7 +56,7 @@ int gendb_search_v(struct ldb_context *ldb,
if (ret == LDB_SUCCESS) {
talloc_steal(mem_ctx, res->msgs);
- DEBUG(6,("gendb_search_v: %s %s -> %d\n",
+ DEBUG(6,("gendb_search_v: %s %s -> %d\n",
basedn?ldb_dn_get_linearized(basedn):"NULL",
expr?expr:"NULL", res->count));
@@ -67,7 +67,8 @@ int gendb_search_v(struct ldb_context *ldb,
ret = 0;
*msgs = NULL;
} else {
- DEBUG(4,("gendb_search_v: search failed: %s", ldb_errstring(ldb)));
+ DEBUG(4,("gendb_search_v: search failed: %s\n",
+ ldb_errstring(ldb)));
ret = -1;
}
@@ -80,7 +81,7 @@ int gendb_search_v(struct ldb_context *ldb,
search the LDB for the specified attributes - varargs variant
*/
int gendb_search(struct ldb_context *ldb,
- TALLOC_CTX *mem_ctx,
+ TALLOC_CTX *mem_ctx,
struct ldb_dn *basedn,
struct ldb_message ***res,
const char * const *attrs,
@@ -101,7 +102,7 @@ int gendb_search(struct ldb_context *ldb,
*/
int gendb_search_dn(struct ldb_context *ldb,
- TALLOC_CTX *mem_ctx,
+ TALLOC_CTX *mem_ctx,
struct ldb_dn *dn,
struct ldb_message ***res,
const char * const *attrs)
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 9ec5a59..e850d82 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -11,17 +11,17 @@
Copyright (C) Jim McDonough (jmcd at us.ibm.com) 2003.
Copyright (C) James Myers 2003 <myersjj at samba.org>
Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2007
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -40,7 +40,7 @@
* 3) add it to the list of available functions (eg: using FN_GLOBAL_STRING())
* 4) If it's a global then initialise it in init_globals. If a local
* (ie. service) parameter then initialise it in the sDefault structure
- *
+ *
*
* Notes:
* The configuration file is processed sequentially for speed. It is NOT
@@ -150,7 +150,7 @@ struct loadparm_global
char *socket_options;
int bWINSsupport;
int bWINSdnsProxy;
- char *szWINSHook;
+ char *szWINSHook;
int bLocalMaster;
int bPreferredMaster;
int bEncryptPasswords;
@@ -182,7 +182,7 @@ struct loadparm_global
/**
- * This structure describes a single service.
+ * This structure describes a single service.
*/
struct loadparm_service
{
@@ -228,28 +228,28 @@ struct loadparm_service sDefault = {
.szPath = NULL,
.szCopy = NULL,
.szInclude = NULL,
- .szPrintername = NULL,
- .szHostsallow = NULL,
- .szHostsdeny = NULL,
- .comment = NULL,
- .volume = NULL,
- .fstype = NULL,
- .ntvfs_handler = NULL,
- .iMaxPrintJobs = 1000,
- .iMaxConnections = 0,
- .iCSCPolicy = 0,
- .bAvailable = true,
- .bBrowseable = true,
- .bRead_only = true,
- .bPrint_ok = false,
- .bMap_system = false,
- .bMap_hidden = false,
- .bMap_archive = true,
- .bStrictLocking = true,
- .iCreate_mask = 0744,
+ .szPrintername = NULL,
+ .szHostsallow = NULL,
+ .szHostsdeny = NULL,
+ .comment = NULL,
+ .volume = NULL,
+ .fstype = NULL,
+ .ntvfs_handler = NULL,
+ .iMaxPrintJobs = 1000,
+ .iMaxConnections = 0,
+ .iCSCPolicy = 0,
+ .bAvailable = true,
+ .bBrowseable = true,
+ .bRead_only = true,
+ .bPrint_ok = false,
+ .bMap_system = false,
+ .bMap_hidden = false,
+ .bMap_archive = true,
+ .bStrictLocking = true,
+ .iCreate_mask = 0744,
.iCreate_force_mode = 0000,
- .iDir_mask = 0755,
- .iDir_force_mode = 0000,
+ .iDir_mask = 0755,
+ .iDir_force_mode = 0000,
.copymap = NULL,
.bMSDfsRoot = false,
.bStrictSync = false,
@@ -261,9 +261,9 @@ struct loadparm_context *global_loadparm = NULL;
#define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
/* prototypes for the special type handlers */
-static bool handle_include(struct loadparm_context *lp_ctx,
+static bool handle_include(struct loadparm_context *lp_ctx,
const char *pszParmValue, char **ptr);
-static bool handle_copy(struct loadparm_context *lp_ctx,
+static bool handle_copy(struct loadparm_context *lp_ctx,
const char *pszParmValue, char **ptr);
static bool handle_debuglevel(struct loadparm_context *lp_ctx,
const char *pszParmValue, char **ptr);
@@ -308,9 +308,9 @@ static const struct enum_list enum_bool_auto[] = {
};
/* Client-side offline caching policy types */
-enum csc_policy {
- CSC_POLICY_MANUAL=0,
- CSC_POLICY_DOCUMENTS=1,
+enum csc_policy {
+ CSC_POLICY_MANUAL=0,
+ CSC_POLICY_DOCUMENTS=1,
CSC_POLICY_PROGRAMS=2,
CSC_POLICY_DISABLE=3
};
@@ -397,12 +397,12 @@ static struct parm_struct parm_table[] = {
{"client lanman auth", P_BOOL, P_GLOBAL, GLOBAL_VAR(bClientLanManAuth), NULL, NULL},
{"client plaintext auth", P_BOOL, P_GLOBAL, GLOBAL_VAR(bClientPlaintextAuth), NULL, NULL},
{"client use spnego principal", P_BOOL, P_GLOBAL, GLOBAL_VAR(client_use_spnego_principal), NULL, NULL},
-
+
{"read only", P_BOOL, P_LOCAL, LOCAL_VAR(bRead_only), NULL, NULL},
- {"create mask", P_OCTAL, P_LOCAL, LOCAL_VAR(iCreate_mask), NULL, NULL},
+ {"create mask", P_OCTAL, P_LOCAL, LOCAL_VAR(iCreate_mask), NULL, NULL},
{"force create mode", P_OCTAL, P_LOCAL, LOCAL_VAR(iCreate_force_mode), NULL, NULL},
- {"directory mask", P_OCTAL, P_LOCAL, LOCAL_VAR(iDir_mask), NULL, NULL},
+ {"directory mask", P_OCTAL, P_LOCAL, LOCAL_VAR(iDir_mask), NULL, NULL},
{"force directory mode", P_OCTAL, P_LOCAL, LOCAL_VAR(iDir_force_mode), NULL, NULL},
{"hosts allow", P_LIST, P_LOCAL, LOCAL_VAR(szHostsallow), NULL, NULL},
@@ -411,7 +411,7 @@ static struct parm_struct parm_table[] = {
{"log level", P_INTEGER, P_GLOBAL, GLOBAL_VAR(debuglevel), handle_debuglevel, NULL},
{"debuglevel", P_INTEGER, P_GLOBAL, GLOBAL_VAR(debuglevel), handle_debuglevel, NULL},
{"log file", P_STRING, P_GLOBAL, GLOBAL_VAR(logfile), handle_logfile, NULL},
-
+
{"smb ports", P_LIST, P_GLOBAL, GLOBAL_VAR(smb_ports), NULL, NULL},
{"nbt port", P_INTEGER, P_GLOBAL, GLOBAL_VAR(nbt_port), NULL, NULL},
{"dgram port", P_INTEGER, P_GLOBAL, GLOBAL_VAR(dgram_port), NULL, NULL},
@@ -435,7 +435,7 @@ static struct parm_struct parm_table[] = {
{"read raw", P_BOOL, P_GLOBAL, GLOBAL_VAR(bReadRaw), NULL, NULL},
{"write raw", P_BOOL, P_GLOBAL, GLOBAL_VAR(bWriteRaw), NULL, NULL},
{"disable netbios", P_BOOL, P_GLOBAL, GLOBAL_VAR(bDisableNetbios), NULL, NULL},
-
+
{"nt status support", P_BOOL, P_GLOBAL, GLOBAL_VAR(bNTStatusSupport), NULL, NULL},
{"announce version", P_STRING, P_GLOBAL, GLOBAL_VAR(szAnnounceVersion), NULL, NULL},
@@ -457,13 +457,13 @@ static struct parm_struct parm_table[] = {
{"paranoid server security", P_BOOL, P_GLOBAL, GLOBAL_VAR(paranoid_server_security), NULL, NULL},
{"socket options", P_STRING, P_GLOBAL, GLOBAL_VAR(socket_options), NULL, NULL},
- {"strict sync", P_BOOL, P_LOCAL, LOCAL_VAR(bStrictSync), NULL, NULL},
+ {"strict sync", P_BOOL, P_LOCAL, LOCAL_VAR(bStrictSync), NULL, NULL},
{"case insensitive filesystem", P_BOOL, P_LOCAL, LOCAL_VAR(bCIFileSystem), NULL, NULL},
{"max print jobs", P_INTEGER, P_LOCAL, LOCAL_VAR(iMaxPrintJobs), NULL, NULL},
{"printable", P_BOOL, P_LOCAL, LOCAL_VAR(bPrint_ok), NULL, NULL},
{"print ok", P_BOOL, P_LOCAL, LOCAL_VAR(bPrint_ok), NULL, NULL},
-
+
{"printer name", P_STRING, P_LOCAL, LOCAL_VAR(szPrintername), NULL, NULL},
{"printer", P_STRING, P_LOCAL, LOCAL_VAR(szPrintername), NULL, NULL},
@@ -483,7 +483,7 @@ static struct parm_struct parm_table[] = {
{"wins hook", P_STRING, P_GLOBAL, GLOBAL_VAR(szWINSHook), NULL, NULL},
{"csc policy", P_ENUM, P_LOCAL, LOCAL_VAR(iCSCPolicy), NULL, enum_csc_policy},
-
+
{"strict locking", P_BOOL, P_LOCAL, LOCAL_VAR(bStrictLocking), NULL, NULL},
{"share backend", P_STRING, P_GLOBAL, GLOBAL_VAR(szShareBackend), NULL, NULL},
@@ -495,11 +495,11 @@ static struct parm_struct parm_table[] = {
{"pid directory", P_STRING, P_GLOBAL, GLOBAL_VAR(szPidDir), NULL, NULL},
{"js include", P_LIST, P_GLOBAL, GLOBAL_VAR(jsInclude), NULL, NULL},
{"setup directory", P_STRING, P_GLOBAL, GLOBAL_VAR(szSetupDir), NULL, NULL},
-
+
{"socket address", P_STRING, P_GLOBAL, GLOBAL_VAR(szSocketAddress), NULL, NULL},
{"copy", P_STRING, P_LOCAL, LOCAL_VAR(szCopy), handle_copy, NULL},
{"include", P_STRING, P_LOCAL, LOCAL_VAR(szInclude), handle_include, NULL},
-
+
{"available", P_BOOL, P_LOCAL, LOCAL_VAR(bAvailable), NULL, NULL},
{"volume", P_STRING, P_LOCAL, LOCAL_VAR(volume), NULL, NULL },
{"fstype", P_STRING, P_LOCAL, LOCAL_VAR(fstype), NULL, NULL},
@@ -547,7 +547,7 @@ struct parm_struct *lp_parm_table(void)
/**
* Convenience routine to grab string parameters into temporary memory
- * and run standard_sub_basic on them.
+ * and run standard_sub_basic on them.
*
* The buffers can be written to by
* callers without affecting the source string.
@@ -595,8 +595,8 @@ static const char *lp_string(const char *s)
}
/*
- In this section all the functions that are used to access the
- parameters from the rest of the program are defined
+ In this section all the functions that are used to access the
+ parameters from the rest of the program are defined
*/
#define FN_GLOBAL_STRING(fn_name,var_name) \
@@ -750,7 +750,7 @@ static int map_parameter(const char *pszParmName);
static struct loadparm_service *getservicebyname(struct loadparm_context *lp_ctx,
const char *pszServiceName);
static void copy_service(struct loadparm_service *pserviceDest,
- struct loadparm_service *pserviceSource,
+ struct loadparm_service *pserviceSource,
int *pcopymapDest);
static bool service_ok(struct loadparm_service *service);
static bool do_section(const char *pszSectionName, void *);
@@ -759,8 +759,8 @@ static void init_copymap(struct loadparm_service *pservice);
/* This is a helper function for parametrical options support. */
/* It returns a pointer to parametrical option value if it exists or NULL otherwise */
/* Actual parametrical functions are quite simple */
-const char *lp_get_parametric(struct loadparm_context *lp_ctx,
- struct loadparm_service *service,
+const char *lp_get_parametric(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service,
const char *type, const char *option)
{
char *vfskey;
@@ -768,9 +768,9 @@ const char *lp_get_parametric(struct loadparm_context *lp_ctx,
if (lp_ctx == NULL)
return NULL;
-
+
data = (service == NULL ? lp_ctx->globals->param_opt : service->param_opt);
-
+
asprintf(&vfskey, "%s:%s", type, option);
strlower(vfskey);
@@ -785,7 +785,7 @@ const char *lp_get_parametric(struct loadparm_context *lp_ctx,
if (service != NULL) {
/* Try to fetch the same option but from globals */
/* but only if we are not already working with globals */
- for (data = lp_ctx->globals->param_opt; data;
+ for (data = lp_ctx->globals->param_opt; data;
data = data->next) {
if (strcmp(data->key, vfskey) == 0) {
free(vfskey);
@@ -795,7 +795,7 @@ const char *lp_get_parametric(struct loadparm_context *lp_ctx,
}
free(vfskey);
-
+
return NULL;
}
@@ -811,7 +811,7 @@ static int lp_int(const char *s)
return -1;
}
- return strtol(s, NULL, 0);
+ return strtol(s, NULL, 0);
}
/**
@@ -853,7 +853,7 @@ static bool lp_bool(const char *s)
DEBUG(0,("lp_bool(%s): is called with NULL!\n",s));
return false;
}
-
+
if (!set_boolean(s, &ret)) {
DEBUG(0,("lp_bool(%s): value is not boolean!\n",s));
return false;
@@ -866,11 +866,11 @@ static bool lp_bool(const char *s)
/**
* Return parametric option from a given service. Type is a part of option before ':'
* Parametric option has following syntax: 'Type: option = value'
- * Returned value is allocated in 'lp_talloc' context
+ * Returned value is allocated in 'lp_talloc' context
*/
-const char *lp_parm_string(struct loadparm_context *lp_ctx,
- struct loadparm_service *service, const char *type,
+const char *lp_parm_string(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service, const char *type,
const char *option)
{
const char *value = lp_get_parametric(lp_ctx, service, type, option);
@@ -888,13 +888,13 @@ const char *lp_parm_string(struct loadparm_context *lp_ctx,
*/
const char **lp_parm_string_list(TALLOC_CTX *mem_ctx,
- struct loadparm_context *lp_ctx,
- struct loadparm_service *service,
- const char *type,
+ struct loadparm_context *lp_ctx,
+ struct loadparm_service *service,
+ const char *type,
const char *option, const char *separator)
{
const char *value = lp_get_parametric(lp_ctx, service, type, option);
-
+
if (value != NULL)
return str_list_make(mem_ctx, value, separator);
@@ -906,12 +906,12 @@ const char **lp_parm_string_list(TALLOC_CTX *mem_ctx,
* Parametric option has following syntax: 'Type: option = value'
*/
-int lp_parm_int(struct loadparm_context *lp_ctx,
- struct loadparm_service *service, const char *type,
+int lp_parm_int(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service, const char *type,
const char *option, int default_v)
{
const char *value = lp_get_parametric(lp_ctx, service, type, option);
-
+
if (value)
return lp_int(value);
@@ -924,8 +924,8 @@ int lp_parm_int(struct loadparm_context *lp_ctx,
* Parametric option has following syntax: 'Type: option = value'.
*/
-int lp_parm_bytes(struct loadparm_context *lp_ctx,
- struct loadparm_service *service, const char *type,
+int lp_parm_bytes(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service, const char *type,
const char *option, int default_v)
{
uint64_t bval;
@@ -942,16 +942,16 @@ int lp_parm_bytes(struct loadparm_context *lp_ctx,
}
/**
- * Return parametric option from a given service.
+ * Return parametric option from a given service.
* Type is a part of option before ':'
* Parametric option has following syntax: 'Type: option = value'
*/
-unsigned long lp_parm_ulong(struct loadparm_context *lp_ctx,
- struct loadparm_service *service, const char *type,
+unsigned long lp_parm_ulong(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service, const char *type,
const char *option, unsigned long default_v)
{
const char *value = lp_get_parametric(lp_ctx, service, type, option);
-
+
if (value)
return lp_ulong(value);
@@ -959,12 +959,12 @@ unsigned long lp_parm_ulong(struct loadparm_context *lp_ctx,
}
-double lp_parm_double(struct loadparm_context *lp_ctx,
- struct loadparm_service *service, const char *type,
+double lp_parm_double(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service, const char *type,
const char *option, double default_v)
{
const char *value = lp_get_parametric(lp_ctx, service, type, option);
-
+
if (value != NULL)
return lp_double(value);
@@ -976,12 +976,12 @@ double lp_parm_double(struct loadparm_context *lp_ctx,
* Parametric option has following syntax: 'Type: option = value'
*/
-bool lp_parm_bool(struct loadparm_context *lp_ctx,
- struct loadparm_service *service, const char *type,
+bool lp_parm_bool(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service, const char *type,
const char *option, bool default_v)
{
const char *value = lp_get_parametric(lp_ctx, service, type, option);
-
+
if (value != NULL)
return lp_bool(value);
@@ -995,7 +995,7 @@ bool lp_parm_bool(struct loadparm_context *lp_ctx,
static struct loadparm_service *init_service(TALLOC_CTX *mem_ctx)
{
- struct loadparm_service *pservice =
+ struct loadparm_service *pservice =
talloc_zero(mem_ctx, struct loadparm_service);
copy_service(pservice, &sDefault, NULL);
return pservice;
@@ -1009,7 +1009,7 @@ static bool string_set(TALLOC_CTX *mem_ctx, char **dest, const char *src)
{
talloc_free(*dest);
- if (src == NULL)
+ if (src == NULL)
src = "";
*dest = talloc_strdup(mem_ctx, src);
@@ -1024,12 +1024,12 @@ static bool string_set(TALLOC_CTX *mem_ctx, char **dest, const char *src)
/**
- * Add a new service to the services array initialising it with the given
- * service.
+ * Add a new service to the services array initialising it with the given
+ * service.
*/
-struct loadparm_service *lp_add_service(struct loadparm_context *lp_ctx,
- const struct loadparm_service *pservice,
+struct loadparm_service *lp_add_service(struct loadparm_context *lp_ctx,
+ const struct loadparm_service *pservice,
--
Samba Shared Repository
More information about the samba-cvs
mailing list