[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Fri Jul 8 04:36:02 MDT 2011
The branch, master has been updated
via cda8686 lib/param: Merge struct loadparm_service into common
via cf406f7 s3-param use common struct parmlist_entry to hold parametric options
via 2fcbfcd param: Move per-share parameters into a seperate file, to share with s3
via f50f937 s4-param Remove offset != -1 checks
via 61b937d s4-param change to struct bitmap to match s3-param
via 27e169e s4-param Also check the p_class matches when comparing offset
via 3ab3159 s3-param check for aliases with both p_class and offset
via 6e6aaac lib/util Move bitmap.c to lib/util
via 6b2749f param: Add hooks to s3 parm_struct and the parameters void * pointer
via 198ad4d s3-lib use True and False in bitmap.c
via 60f353a s3-param: calculate default_server_announce at runtime
via fad3c76 s3-param Remove lp_set_passdb_backend()
from 76c73db s3-zfsacl: Fix a debug message
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit cda86869400285afe17db87a9a666fbcc5b918a8
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Jul 8 09:19:43 2011 +1000
lib/param: Merge struct loadparm_service into common
This is handled by a common header and a .c file that is included into
both loadparm.c files.
In the process, _lp functions were renamed to lp__ to allow the common
function definition declarations to be used by source3 and source4
(which have different macro definitions).
The only parameter to change type is 'strict_locking' which was a
bool, and is now an int, to accommodate the 'Auto' value from source3.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Fri Jul 8 12:35:56 CEST 2011 on sn-devel-104
commit cf406f7e7d58b9c993ba1ddc6471fa85e445ba88
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Jul 8 09:18:09 2011 +1000
s3-param use common struct parmlist_entry to hold parametric options
This will allow struct loadparm_service to be shared in future.
Andrew Bartlett
commit 2fcbfcd004685482c40de169bf904d7fa92ac165
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 22:03:30 2011 +1000
param: Move per-share parameters into a seperate file, to share with s3
This will allow the struct loadparm_service to be in common between
the two loadparm implementations in the tree.
Andrew Bartlett
commit f50f9374b584b881aac0304aeefc56ebfd6b745a
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 21:38:46 2011 +1000
s4-param Remove offset != -1 checks
No offset values are set to -1 in the parameter table
Andrew Bartlett
commit 61b937d23695ef8820a969f769732ecf79662597
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 21:35:51 2011 +1000
s4-param change to struct bitmap to match s3-param
commit 27e169e17efd7150cc9479face9989586a65c70f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 21:30:02 2011 +1000
s4-param Also check the p_class matches when comparing offset
commit 3ab3159f757cd9849ea77c2938c340564fd1b018
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 21:16:24 2011 +1000
s3-param check for aliases with both p_class and offset
This bug was found when comparing with the source4 loadparm code.
Andrew Bartlett
commit 6e6aaacedb96ea45a5b8a9237915525a87189001
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 21:04:31 2011 +1000
lib/util Move bitmap.c to lib/util
commit 6b2749f8a9f527c1d52ba76566c661cab30b59c6
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 20:33:55 2011 +1000
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
commit 198ad4df31e5e4ab177d0abb851cb5c0c527f8d4
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 18:18:38 2011 +1000
s3-lib use True and False in bitmap.c
commit 60f353a144f72c09cd6d0694c7afb29aa3eb2516
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 14:10:54 2011 +1000
s3-param: calculate default_server_announce at runtime
commit fad3c763f723fad05551787200c95ecfe0e056bc
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Jul 7 13:45:13 2011 +1000
s3-param Remove lp_set_passdb_backend()
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/wafsamba.py | 2 +
lib/param/loadparm.h | 19 ++-
lib/param/param_functions.c | 158 +++++++++++++
lib/param/wscript_build | 6 +
{source3/lib => lib/util}/bitmap.c | 19 +-
source3/smbd/noquotas.c => lib/util/bitmap.h | 30 +--
lib/util/parmlist.h | 1 +
lib/util/wscript_build | 8 +-
source3/Makefile.in | 4 +-
source3/include/proto.h | 17 +-
source3/include/smb.h | 5 -
source3/modules/vfs_acl_common.c | 1 +
source3/modules/vfs_full_audit.c | 1 +
source3/param/loadparm.c | 325 +++++++++-----------------
source3/param/loadparm_ctx.c | 10 +-
source3/passdb/pdb_get_set.c | 1 +
source3/smbd/conn.c | 1 +
source3/smbd/dir.c | 1 +
source3/smbd/files.c | 1 +
source3/smbd/smb2_read.c | 2 +-
source3/smbd/smb2_server.c | 1 +
source3/utils/pdbedit.c | 2 +-
source3/wscript_build | 13 +-
source4/param/loadparm.c | 134 +++++------
source4/param/param.h | 3 +-
source4/param/pyparam.c | 4 +-
source4/param/wscript_build | 8 +-
source4/script/mkproto.pl | 54 +++--
source4/script/mks3param.pl | 5 +-
wscript_build | 1 +
30 files changed, 444 insertions(+), 393 deletions(-)
create mode 100644 lib/param/param_functions.c
create mode 100644 lib/param/wscript_build
rename {source3/lib => lib/util}/bitmap.c (92%)
copy source3/smbd/noquotas.c => lib/util/bitmap.h (58%)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index d76afc4..3858770 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -108,6 +108,7 @@ def SAMBA_LIBRARY(bld, libname, source,
external_library=False,
realname=None,
autoproto=None,
+ autoproto_extra_source='',
group='libraries',
depends_on='',
local_include=True,
@@ -168,6 +169,7 @@ def SAMBA_LIBRARY(bld, libname, source,
cflags = cflags,
group = subsystem_group,
autoproto = autoproto,
+ autoproto_extra_source=autoproto_extra_source,
depends_on = depends_on,
hide_symbols = hide_symbols,
pyext = pyext or (target_type == "PYTHON"),
diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h
index 2627727..1fa06b6 100644
--- a/lib/param/loadparm.h
+++ b/lib/param/loadparm.h
@@ -27,7 +27,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* the following are used by loadparm for option lists */
+#include "../lib/util/parmlist.h"
+
/* the following are used by loadparm for option lists */
typedef enum {
P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL,P_LIST,
@@ -115,3 +116,19 @@ struct parm_struct {
#ifndef PRINT_MAX_JOBID
#define PRINT_MAX_JOBID 10000
#endif
+
+#define LOADPARM_EXTRA_LOCALS \
+ bool valid; \
+ int usershare; \
+ struct timespec usershare_last_mod; \
+ int iMaxPrintJobs; \
+ char *szCopy; \
+ char *szService; \
+ char *szInclude; \
+ bool bWidelinks; \
+ int bAvailable; \
+ struct parmlist_entry *param_opt; \
+ struct bitmap *copymap; \
+ char dummy[3]; /* for alignment */
+
+#include "lib/param/param_local.h"
diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c
new file mode 100644
index 0000000..ee865fd
--- /dev/null
+++ b/lib/param/param_functions.c
@@ -0,0 +1,158 @@
+/*
+ Unix SMB/CIFS implementation.
+ Parameter loading functions
+ Copyright (C) Karl Auer 1993-1998
+
+ Largely re-written by Andrew Tridgell, September 1994
+
+ Copyright (C) Simo Sorce 2001
+ Copyright (C) Alexander Bokovoy 2002
+ Copyright (C) Stefan (metze) Metzmacher 2002
+ Copyright (C) Jim McDonough <jmcd at us.ibm.com> 2003
+ Copyright (C) Michael Adam 2008
+ Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2007
+ Copyright (C) Andrew Bartlett 2011
+
+ 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/>.
+*/
+
+FN_LOCAL_STRING(pathname, szPath)
+FN_LOCAL_LIST(hostsallow, szHostsallow)
+FN_LOCAL_LIST(hostsdeny, szHostsdeny)
+FN_LOCAL_STRING(fstype, fstype)
+FN_LOCAL_LIST(ntvfs_handler, ntvfs_handler)
+FN_LOCAL_BOOL(msdfs_root, bMSDfsRoot)
+FN_LOCAL_BOOL(browseable, bBrowseable)
+FN_LOCAL_BOOL(readonly, bRead_only)
+FN_LOCAL_BOOL(print_ok, bPrint_ok)
+FN_LOCAL_BOOL(map_hidden, bMap_hidden)
+FN_LOCAL_BOOL(map_archive, bMap_archive)
+FN_LOCAL_BOOL(oplocks, bOpLocks)
+FN_LOCAL_BOOL(strict_sync, bStrictSync)
+FN_LOCAL_BOOL(ci_filesystem, bCIFileSystem)
+FN_LOCAL_BOOL(map_system, bMap_system)
+FN_LOCAL_INTEGER(max_connections, iMaxConnections)
+FN_LOCAL_INTEGER(csc_policy, iCSCPolicy)
+FN_LOCAL_INTEGER(create_mask, iCreate_mask)
+FN_LOCAL_INTEGER(force_create_mode, iCreate_force_mode)
+FN_LOCAL_INTEGER(dir_mask, iDir_mask)
+FN_LOCAL_INTEGER(force_dir_mode, iDir_force_mode)
+FN_LOCAL_STRING(preexec, szPreExec)
+FN_LOCAL_STRING(postexec, szPostExec)
+FN_LOCAL_STRING(rootpreexec, szRootPreExec)
+FN_LOCAL_STRING(rootpostexec, szRootPostExec)
+FN_LOCAL_STRING(dontdescend, szDontdescend)
+FN_LOCAL_STRING(username, szUsername)
+FN_LOCAL_LIST(invalid_users, szInvalidUsers)
+FN_LOCAL_LIST(valid_users, szValidUsers)
+FN_LOCAL_LIST(admin_users, szAdminUsers)
+FN_LOCAL_STRING(printcommand, szPrintcommand)
+FN_LOCAL_STRING(lpqcommand, szLpqcommand)
+FN_LOCAL_STRING(lprmcommand, szLprmcommand)
+FN_LOCAL_STRING(lppausecommand, szLppausecommand)
+FN_LOCAL_STRING(lpresumecommand, szLpresumecommand)
+FN_LOCAL_STRING(queuepausecommand, szQueuepausecommand)
+FN_LOCAL_STRING(queueresumecommand, szQueueresumecommand)
+static FN_LOCAL_STRING(_printername, szPrintername)
+FN_LOCAL_CONST_STRING(printjob_username, szPrintjobUsername)
+FN_LOCAL_STRING(magicscript, szMagicScript)
+FN_LOCAL_STRING(magicoutput, szMagicOutput)
+FN_LOCAL_STRING(comment, comment)
+FN_LOCAL_STRING(force_user, force_user)
+FN_LOCAL_STRING(force_group, force_group)
+FN_LOCAL_LIST(readlist, readlist)
+FN_LOCAL_LIST(writelist, writelist)
+FN_LOCAL_LIST(printer_admin, printer_admin)
+FN_LOCAL_LIST(vfs_objects, szVfsObjects)
+FN_LOCAL_STRING(msdfs_proxy, szMSDfsProxy)
+static FN_LOCAL_STRING(volume, volume)
+FN_LOCAL_STRING(veto_files, szVetoFiles)
+FN_LOCAL_STRING(hide_files, szHideFiles)
+FN_LOCAL_STRING(veto_oplocks, szVetoOplockFiles)
+FN_LOCAL_STRING(aio_write_behind, szAioWriteBehind)
+FN_LOCAL_STRING(dfree_command, szDfree)
+FN_LOCAL_BOOL(autoloaded, autoloaded)
+FN_LOCAL_BOOL(preexec_close, bPreexecClose)
+FN_LOCAL_BOOL(rootpreexec_close, bRootpreexecClose)
+FN_LOCAL_INTEGER(casesensitive, iCaseSensitive)
+FN_LOCAL_BOOL(preservecase, bCasePreserve)
+FN_LOCAL_BOOL(shortpreservecase, bShortCasePreserve)
+FN_LOCAL_BOOL(hide_dot_files, bHideDotFiles)
+FN_LOCAL_BOOL(hide_special_files, bHideSpecialFiles)
+FN_LOCAL_BOOL(hideunreadable, bHideUnReadable)
+FN_LOCAL_BOOL(hideunwriteable_files, bHideUnWriteableFiles)
+FN_LOCAL_BOOL(access_based_share_enum, bAccessBasedShareEnum)
+FN_LOCAL_BOOL(no_set_dir, bNo_set_dir)
+FN_LOCAL_BOOL(guest_ok, bGuest_ok)
+FN_LOCAL_BOOL(guest_only, bGuest_only)
+FN_LOCAL_BOOL(administrative_share, bAdministrative_share)
+FN_LOCAL_BOOL(print_notify_backchannel, bPrintNotifyBackchannel)
+FN_LOCAL_BOOL(store_dos_attributes, bStoreDosAttributes)
+FN_LOCAL_BOOL(dmapi_support, bDmapiSupport)
+FN_LOCAL_PARM_BOOL(locking, bLocking)
+FN_LOCAL_PARM_INTEGER(strict_locking, iStrictLocking)
+FN_LOCAL_PARM_BOOL(posix_locking, bPosixLocking)
+FN_LOCAL_BOOL(share_modes, bShareModes)
+FN_LOCAL_BOOL(level2_oplocks, bLevel2OpLocks)
+FN_LOCAL_BOOL(onlyuser, bOnlyUser)
+FN_LOCAL_PARM_BOOL(manglednames, bMangledNames)
+FN_LOCAL_BOOL(symlinks, bSymlinks)
+FN_LOCAL_BOOL(syncalways, bSyncAlways)
+FN_LOCAL_BOOL(strict_allocate, bStrictAllocate)
+FN_LOCAL_BOOL(delete_readonly, bDeleteReadonly)
+FN_LOCAL_BOOL(fake_oplocks, bFakeOplocks)
+FN_LOCAL_BOOL(recursive_veto_delete, bDeleteVetoFiles)
+FN_LOCAL_BOOL(dos_filemode, bDosFilemode)
+FN_LOCAL_BOOL(dos_filetimes, bDosFiletimes)
+FN_LOCAL_BOOL(dos_filetime_resolution, bDosFiletimeResolution)
+FN_LOCAL_BOOL(fake_dir_create_times, bFakeDirCreateTimes)
+FN_LOCAL_BOOL(blocking_locks, bBlockingLocks)
+FN_LOCAL_BOOL(inherit_perms, bInheritPerms)
+FN_LOCAL_BOOL(inherit_acls, bInheritACLS)
+FN_LOCAL_BOOL(inherit_owner, bInheritOwner)
+FN_LOCAL_BOOL(use_client_driver, bUseClientDriver)
+FN_LOCAL_BOOL(default_devmode, bDefaultDevmode)
+FN_LOCAL_BOOL(force_printername, bForcePrintername)
+FN_LOCAL_BOOL(nt_acl_support, bNTAclSupport)
+FN_LOCAL_BOOL(force_unknown_acl_user, bForceUnknownAclUser)
+FN_LOCAL_BOOL(ea_support, bEASupport)
+FN_LOCAL_BOOL(_use_sendfile, bUseSendfile)
+FN_LOCAL_BOOL(profile_acls, bProfileAcls)
+FN_LOCAL_BOOL(map_acl_inherit, bMap_acl_inherit)
+FN_LOCAL_BOOL(afs_share, bAfs_Share)
+FN_LOCAL_BOOL(acl_check_permissions, bAclCheckPermissions)
+FN_LOCAL_BOOL(acl_group_control, bAclGroupControl)
+FN_LOCAL_BOOL(acl_map_full_control, bAclMapFullControl)
+FN_LOCAL_INTEGER(security_mask, iSecurity_mask)
+FN_LOCAL_INTEGER(force_security_mode, iSecurity_force_mode)
+FN_LOCAL_INTEGER(dir_security_mask, iDir_Security_mask)
+FN_LOCAL_INTEGER(force_dir_security_mode, iDir_Security_force_mode)
+FN_LOCAL_INTEGER(defaultcase, iDefaultCase)
+FN_LOCAL_INTEGER(minprintspace, iMinPrintSpace)
+FN_LOCAL_INTEGER(printing, iPrinting)
+FN_LOCAL_INTEGER(max_reported_jobs, iMaxReportedPrintJobs)
+FN_LOCAL_INTEGER(oplock_contention_limit, iOplockContentionLimit)
+FN_LOCAL_INTEGER(write_cache_size, iWriteCacheSize)
+FN_LOCAL_INTEGER(block_size, iBlock_size)
+FN_LOCAL_INTEGER(dfree_cache_time, iDfreeCacheTime)
+FN_LOCAL_INTEGER(allocation_roundup_size, iallocation_roundup_size)
+FN_LOCAL_INTEGER(aio_read_size, iAioReadSize)
+FN_LOCAL_INTEGER(aio_write_size, iAioWriteSize)
+FN_LOCAL_INTEGER(map_readonly, iMap_readonly)
+FN_LOCAL_INTEGER(directory_name_cache_size, iDirectoryNameCacheSize)
+FN_LOCAL_INTEGER(smb_encrypt, ismb_encrypt)
+FN_LOCAL_CHAR(magicchar, magic_char)
+FN_LOCAL_STRING(cups_options, szCupsOptions)
+FN_LOCAL_PARM_BOOL(change_notify, bChangeNotify)
+FN_LOCAL_PARM_BOOL(kernel_change_notify, bKernelChangeNotify)
diff --git a/lib/param/wscript_build b/lib/param/wscript_build
new file mode 100644
index 0000000..c84a99d
--- /dev/null
+++ b/lib/param/wscript_build
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+bld.SAMBA_GENERATOR('param_local_h',
+ source= 'param_functions.c ../../script/mkparamdefs.pl',
+ target='param_local.h',
+ rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT} --generate-scope=LOCAL')
diff --git a/source3/lib/bitmap.c b/lib/util/bitmap.c
similarity index 92%
rename from source3/lib/bitmap.c
rename to lib/util/bitmap.c
index 5216b05..7defd77 100644
--- a/source3/lib/bitmap.c
+++ b/lib/util/bitmap.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "lib/util/bitmap.h"
/* these functions provide a simple way to allocate integers from a
pool without repetition */
@@ -34,7 +35,7 @@ struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n)
if (!bm) return NULL;
bm->n = n;
- bm->b = talloc_zero_array(bm, uint32, (n+31)/32);
+ bm->b = talloc_zero_array(bm, uint32_t, (n+31)/32);
if (!bm->b) {
TALLOC_FREE(bm);
return NULL;
@@ -51,7 +52,7 @@ int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src)
int count = MIN(dst->n, src->n);
SMB_ASSERT(dst->b != src->b);
- memcpy(dst->b, src->b, sizeof(uint32)*((count+31)/32));
+ memcpy(dst->b, src->b, sizeof(uint32_t)*((count+31)/32));
return count;
}
@@ -64,10 +65,10 @@ bool bitmap_set(struct bitmap *bm, unsigned i)
if (i >= bm->n) {
DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n",
i, bm->n));
- return False;
+ return false;
}
bm->b[i/32] |= (1<<(i%32));
- return True;
+ return true;
}
/****************************************************************************
@@ -78,10 +79,10 @@ bool bitmap_clear(struct bitmap *bm, unsigned i)
if (i >= bm->n) {
DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n",
i, bm->n));
- return False;
+ return false;
}
bm->b[i/32] &= ~(1<<(i%32));
- return True;
+ return true;
}
/****************************************************************************
@@ -89,11 +90,11 @@ query a bit in a bitmap
****************************************************************************/
bool bitmap_query(struct bitmap *bm, unsigned i)
{
- if (i >= bm->n) return False;
+ if (i >= bm->n) return false;
if (bm->b[i/32] & (1<<(i%32))) {
- return True;
+ return true;
}
- return False;
+ return false;
}
/****************************************************************************
diff --git a/source3/smbd/noquotas.c b/lib/util/bitmap.h
similarity index 58%
copy from source3/smbd/noquotas.c
copy to lib/util/bitmap.h
index 6b67bb1..cf7aa1b 100644
--- a/source3/smbd/noquotas.c
+++ b/lib/util/bitmap.h
@@ -1,6 +1,6 @@
/*
Unix SMB/CIFS implementation.
- No support for quotas :-).
+ simple bitmap functions
Copyright (C) Andrew Tridgell 1992-1998
This program is free software; you can redistribute it and/or modify
@@ -17,22 +17,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
-#include "smbd/smbd.h"
+/* The following definitions come from lib/bitmap.c */
-/*
- * Needed for auto generation of proto.h.
- */
-
-bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize)
-{
- (*bsize) = 512; /* This value should be ignored */
-
- /* And just to be sure we set some values that hopefully */
- /* will be larger that any possible real-world value */
- (*dfree) = (uint64_t)-1;
- (*dsize) = (uint64_t)-1;
+struct bitmap {
+ uint32_t *b;
+ unsigned int n;
+};
- /* As we have select not to use quotas, allways fail */
- return False;
-}
+struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
+int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
+bool bitmap_set(struct bitmap *bm, unsigned i);
+bool bitmap_clear(struct bitmap *bm, unsigned i);
+bool bitmap_query(struct bitmap *bm, unsigned i);
+int bitmap_find(struct bitmap *bm, unsigned ofs);
diff --git a/lib/util/parmlist.h b/lib/util/parmlist.h
index b320afe..9bc4f36 100644
--- a/lib/util/parmlist.h
+++ b/lib/util/parmlist.h
@@ -24,6 +24,7 @@ struct parmlist_entry {
struct parmlist_entry *prev, *next;
char *key;
char *value;
+ char **list; /* For the source3 parametric options, to save the parsed list */
int priority;
};
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index bdc9d10..f8386fa 100755
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -84,5 +84,11 @@ bld.SAMBA_LIBRARY('tdb-wrap',
deps='tdb_compat talloc samba-util',
private_library=True,
local_include=False
- )
+ )
+
+bld.SAMBA_LIBRARY('bitmap',
+ source='bitmap.c',
+ deps='talloc samba-util',
+ local_include=False,
+ private_library=True)
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 92613ab..146c9cb 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -456,7 +456,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) $(LIBTSOCKET_OBJ) \
lib/username.o \
../libds/common/flag_mapping.o \
lib/access.o lib/smbrun.o \
- lib/bitmap.o ../lib/util/dprintf.o $(UTIL_REG_OBJ) \
+ ../lib/util/bitmap.o ../lib/util/dprintf.o $(UTIL_REG_OBJ) \
lib/wins_srv.o lib/string_init.o \
lib/util_str.o ../lib/util/util_str_common.o \
../lib/util/util_str.o \
@@ -1643,7 +1643,7 @@ idl_full::
srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh --full $(IDL_FILES)
mkparam:
- $(PERL) ../script/mkparamdefs.pl $(srcdir)/param/loadparm.c --file param/param_local.h --generate-scope=LOCAL
+ $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c --file ../lib/param/param_local.h --generate-scope=LOCAL
$(PERL) ../script/mkparamdefs.pl $(srcdir)/param/loadparm.c --file param/param_global.h --generate-scope=GLOBAL
#####################################################################
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c6fd474..715641f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -61,15 +61,6 @@ const char *audit_description_str(uint32 category);
bool get_audit_category_from_param(const char *param, uint32 *audit_category);
const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32 policy);
-/* The following definitions come from lib/bitmap.c */
-
-struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
-int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
-bool bitmap_set(struct bitmap *bm, unsigned i);
-bool bitmap_clear(struct bitmap *bm, unsigned i);
-bool bitmap_query(struct bitmap *bm, unsigned i);
-int bitmap_find(struct bitmap *bm, unsigned ofs);
-
/* The following definitions come from lib/charcnv.c */
void gfree_charcnv(void);
@@ -1506,7 +1497,7 @@ bool lp_force_printername(int );
bool lp_nt_acl_support(int );
bool lp_force_unknown_acl_user(int );
bool lp_ea_support(int );
-bool _lp_use_sendfile(int );
+bool lp__use_sendfile(int );
bool lp_profile_acls(int );
bool lp_map_acl_inherit(int );
bool lp_afs_share(int );
@@ -1549,6 +1540,8 @@ int lp_server_signing(void);
int lp_client_ldap_sasl_wrapping(void);
char *lp_parm_talloc_string(int snum, const char *type, const char *option, const char *def);
const char *lp_parm_const_string(int snum, const char *type, const char *option, const char *def);
+struct loadparm_service;
+const char *lp_parm_const_string_service(struct loadparm_service *service, const char *type, const char *option);
const char **lp_parm_string_list(int snum, const char *type, const char *option, const char **def);
int lp_parm_int(int snum, const char *type, const char *option, int def);
unsigned long lp_parm_ulong(int snum, const char *type, const char *option, unsigned long def);
@@ -1586,8 +1579,9 @@ const char *lp_ldap_machine_suffix(void);
const char *lp_ldap_user_suffix(void);
const char *lp_ldap_group_suffix(void);
const char *lp_ldap_idmap_suffix(void);
-struct loadparm_service;
struct parm_struct;
+/* Return a pointer to a service by name. */
+struct loadparm_service *lp_service(const char *pszServiceName);
void *lp_parm_ptr(struct loadparm_service *service, struct parm_struct *parm);
void *lp_local_ptr_by_snum(int snum, struct parm_struct *parm);
bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue);
@@ -1667,7 +1661,6 @@ enum brl_flavour lp_posix_cifsu_locktype(files_struct *fsp);
void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val);
int lp_min_receive_file_size(void);
char* lp_perfcount_module(void);
-void lp_set_passdb_backend(const char *backend);
void widelinks_warning(int snum);
const char *lp_ncalrpc_dir(void);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index d41d363..0c1a76e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -705,11 +705,6 @@ struct connections_data {
uint32 unused_compatitibility_field;
};
-struct bitmap {
- uint32 *b;
- unsigned int n;
-};
-
/* offsets into message for common items */
#define smb_com 8
#define smb_rcls 9
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index bee7966..b01fd18 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -23,6 +23,7 @@
#include "system/filesys.h"
#include "../libcli/security/security.h"
#include "../librpc/gen_ndr/ndr_security.h"
+#include "../lib/util/bitmap.h"
static NTSTATUS create_acl_blob(const struct security_descriptor *psd,
DATA_BLOB *pblob,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 362749a..19092c4 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -65,6 +65,7 @@
#include "auth.h"
#include "ntioctl.h"
#include "lib/param/loadparm.h"
+#include "lib/util/bitmap.h"
static int vfs_full_audit_debug_level = DBGC_VFS;
--
Samba Shared Repository
More information about the samba-cvs
mailing list