summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2011-07-08lib/param: Merge struct loadparm_service into commonAndrew Bartlett4-16/+160
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@samba.org> Autobuild-Date: Fri Jul 8 12:35:56 CEST 2011 on sn-devel-104
2011-07-08s3-param use common struct parmlist_entry to hold parametric optionsAndrew Bartlett2-1/+3
This will allow struct loadparm_service to be shared in future. Andrew Bartlett
2011-07-08param: Move per-share parameters into a seperate file, to share with s3Andrew Bartlett2-0/+36
This will allow the struct loadparm_service to be in common between the two loadparm implementations in the tree. Andrew Bartlett
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett3-1/+176
2011-07-07s3:libsmb: remove unused clistr_push_fn()Stefan Metzmacher1-6/+0
metze
2011-07-07s3:libsmb: remove unused clistr_pull_fn()Stefan Metzmacher1-6/+0
metze
2011-07-06ccan/tally: don't use SIZE_MAX.Rusty Russell1-2/+2
Michael Adam points out this broke the build farm (ie. OSF1 axp V5.1 2650 alpha) so fixed in CCAN and imported from af7a902d74a7926693f55da9e21a67dde46931d4: Turns out it's not standard (thanks Samba build farm!) And the previous test had a hole in it anyway. This one is more conservative. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Jul 6 08:34:05 CEST 2011 on sn-devel-104
2011-07-06libcli/smb move enum protocol_types to a common headerAndrew Bartlett2-15/+1
2011-07-05ldb: set -Wl,-no-undefined only on standalone buildAndrew Bartlett1-5/+5
This ensures that the flag is not propogated to other projects, such as Samba's source3 waf build. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Jul 5 10:37:30 CEST 2011 on sn-devel-104
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett149-0/+49340
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-05ccan: fix configure tests for __builtin_clz etc.Rusty Russell1-8/+8
It's not enough to compile-test them: Michael Adam points out that nonexistant functions merely cause a warning. We have to try to link them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Tue Jul 5 07:08:55 CEST 2011 on sn-devel-104
2011-07-03S3: Fix some nonempty blank linesVolker Lendecke1-3/+3
2011-06-30lib/util/string_wrappers: move everything into one ↵Stefan Metzmacher1-18/+8
HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS block metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jun 30 14:29:41 CEST 2011 on sn-devel-104
2011-06-29param: Merge param headers into lib/param/loadparm.hAndrew Bartlett1-0/+117
This defines a common table format, so we can in future define a common table. Andrew Bartlett
2011-06-24lib: Allow NULL converted_size in convert_string_tallocVolker Lendecke1-2/+6
2011-06-23lib/util/charset: Remove autodetection of charset from LOCALEAndrew Bartlett1-31/+0
In the past, our LOCALE would set the display charset of Samba. The display charset has now been removed. This patch removes the support code that detected the locale from the environment. We cannot safely have 'unix charset' follow the locale (at it creates files on disk and entries in databases that must not vary), so this code is unused. As an example, imagine a database is manipulated in the administrator's locale, and then read by smbd starting up in the system default locale. Or smbd restarted by the administrator rather than a startup script. Both of these situations could corrupt databases or filenames on disk. Andrew Bartlett
2011-06-23lib/util/charset: Remove 'display charset'Andrew Bartlett5-103/+61
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-21lib/util: Restore CH_UNIX as source charset for d_printf()Andrew Bartlett1-1/+1
I'm changed this during the change to use the d_printf() code in common, but should not have. However, there is a puzzle: What is the right source charset? Translated strings in our .mo and .msg files are in UTF8, but strings such as file names on remote servers are in UNIX (whatever that is). I can't see how this actually works properly when either CH_DISPLAY or CH_UNIX are other than UTF8! Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21lib/util Remove display_cd from d_printf()Andrew Bartlett1-7/+0
The setting of the display charset is now done by convert_string_talloc() selecting the right charset based on CH_DISPLAY. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21lib/ccan/tally.h: update for FreeBSD compile.Rusty Russell7-2/+8
Based on commit 0284423676209380a2e07086b9b356096a2f93e6 from CCAN: Author: Rusty Russell <rusty@rustcorp.com.au> Date: Tue Jun 21 10:43:31 2011 +0930 tally: fix FreeBSD compile, memleak in tests. Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough. Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Tue Jun 21 05:52:12 CEST 2011 on sn-devel-104
2011-06-21lib/util Remove samba-util-common!Andrew Bartlett1-44/+12
All of this code is now in common, so we don't need the second '-common' library any more! Andrew Bartlett
2011-06-21lib/util: allow parmlist.c to compile under s3 includes.hAndrew Bartlett1-0/+2
2011-06-21lib/util: Use common d_printf() in the whole codebaseAndrew Bartlett3-26/+25
This removes the lang_tdb based varient, the only user of the lang_tdb code is SWAT, which calls that directly. 'net' and 'pam_winbind' are internationalised using gettext. Andrew Bartlett
2011-06-21lib/util Make unused d_vfprintf() staticAndrew Bartlett2-2/+1
2011-06-20Use tevent_req_oomVolker Lendecke1-3/+3
This fixes a few Coverity errors
2011-06-20tevent: change version to 0.9.12Volker Lendecke2-1/+75
2011-06-20tevent: Add tevent_req_oomVolker Lendecke2-1/+20
This is a replacement for tevent_req_nomem(NULL, req)
2011-06-20tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.Rusty Russell1-0/+6
I don't think this kind of hack belongs in the tdb2 source, but SAMBA uses it to speed testing, so we should respect it: handle it in our compat open wrapper. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Mon Jun 20 12:32:08 CEST 2011 on sn-devel-104
2011-06-20tdb2: tie it into build process if --enable-tdb2-breaks-compatRusty Russell3-2/+116
This is simplistic. We need to support making TDB2 a standalone library, but for now, we simply built it in-tree. Once we have tdb1 compatibility in tdb2, we can rename this option to --enable-tdb2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: create tdb2 versions of various testing TDBs.Rusty Russell2-22/+55
Soon, TDB2 will handle tdb1 files, but until then, we substitute. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: python wrapperRusty Russell1-0/+574
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: minor changes to SAMBIFY it.Rusty Russell3-4/+18
This is a bit messy, but it works. Kept as a separate patch so it's easier to merge back and forth with CCAN's tdb2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)Rusty Russell84-0/+26504
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat: Higher level API fixes.Rusty Russell2-6/+6
My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat: use tdb_open_compat.Rusty Russell1-5/+28
This is a helper for the common case of opening a tdb with a logging function, but it doesn't do all the work, since TDB1 and TDB2's log functions are different types. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_store: check returns for 0, not -1.Rusty Russell4-16/+16
TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_delete: check returns for 0, not -1.Rusty Russell1-1/+1
TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_fetch_compat: use instead of tdb_fetch.Rusty Russell1-3/+3
This is a noop for tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat.h: divert every tdb build and includes to tdb_compatRusty Russell5-7/+14
We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20lib/tdb_compat: header for tdb1 vs tdb2.Rusty Russell3-0/+239
TDB2's API is slightly different from TDB1. In particular, all functions return 0 (TDB_SUCCESS) or a negative error number, rather than -1 or tdb_null and storing the error in tdb_error() (though TDB2 does that as well). The simplest fix is to replace all the different functions with a wrapper, and that is done here. Compatibility functions: tdb_null: not used as an error return, so not defined by tdb2. tdb_fetch_compat: TDB1-style data-returning tdb_fetch. tdb_firstkey_compat: TDB1-style data-returning tdb_firstkey tdb_nextkey_compat: TDB1-style data-returning tdb_nextkey, with TDB2-style free of old key. tdb_errorstr_compat: TDB1-style tdb_errorstr() which takes TDB instead of ecode. TDB_CONTEXT: TDB1-style typedef for struct tdb_context. tdb_open_compat: Simplified open routine which takes log function, sets TDB_ALLOW_NESTING as Samba expects, and adds TDB_CLEAR_IF_FIRST support. Things defined away in TDB2 wrappers: tdb_traverse_read: TDB2's tdb_traverse only uses read-locks anyway. tdb_reopen/tdb_reopen_all: TDB2 detects this error itself. TDB_INCOMPATIBLE_HASH: TDB2 uses the Jenkins hash already. TDB_VOLATILE: TDB2 shouldn't have freelist scaling issues. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20lib: import ccan modules for tdb2Rusty Russell129-0/+13867
Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett1-2/+2
The two error tables need to be combined, but for now seperate the names. (As the common parts of the tree now use the _common function, errmap_unix.c must be included in the s3 autoconf build). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-17talloc: added talloc_stackframe_exists()Andrew Tridgell2-0/+25
This can be used to tell if a talloc stackframe is currently available. Callers can use this to decide if they will use talloc_tos() or instead use an alternative strategy. This gives us a way to safely have calls to talloc_tos() in common code that may end up in external libraries, as long as all talloc_tos() calls in these pieces of common code check first that a stackframe is available.
2011-06-11s3-param Remove 'time offset' from smb.confAndrew Bartlett3-24/+1
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-10lib/util/wrap_xattr.h: fix licence/copyrightGünther Deschner1-0/+21
Guenther
2011-06-10lib/util/util_tdb.h: fix licence/copyrightGünther Deschner1-0/+21
Guenther
2011-06-10lib/util/util_ldb.h: fix licence/copyrightGünther Deschner1-0/+23
Guenther
2011-06-10lib/util/time.h: fix licence/copyrightGünther Deschner1-1/+6
Guenther
2011-06-10lib/util/data_blob.h: fix licence/copyrightGünther Deschner1-1/+4
Guenther
2011-06-09server_id: Change format to vnn:pid.task_id, pid.task_id or pidAndrew Bartlett1-1/+6
This helps ensure the string cannot be ambiguous, while also ensuring that it remains simple in the non-cluster case. The asymmetry of reading get_my_vnn() but writing based on NONCLUSTER_VNN is acceptable because in the non-clustered case, they are equal, and in the clustered case we will print the full string. Andrew Bartlett