summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* tdb: remove 'EOF' print from tdbrestoreAndrew Tridgell2011-07-211-1/+0
| | | | | | the EOF message is pointless, and makes for noisy scripts Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* pyldb: use dn.is_child_of() instead of dn.compare_base()Andrew Tridgell2011-07-212-9/+10
| | | | | | | | the compare_base() C API doesn't really fit well in python, as it returns 0 for true. Better to have a boolean function for the python interface. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* pyldb: add unit test for ldbDn.compare_baseMatthieu Patou2011-07-211-0/+11
|
* ldb-python: add a function to Dn object to compare the Dn with a base DNMatthieu Patou2011-07-211-0/+17
|
* debug: log early messages to stdout, and keep it openAndrew Bartlett2011-07-202-0/+7
| | | | | | | | | The --log-stdout option was compromised by the log file descriptors being closed once the file process forked. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* lib/util Change debug priority order: DEBUG_STDOUT now overrides DEBUG_FILEAndrew Bartlett2011-07-201-1/+1
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* Second part of fix for bug 8310 - toupper_ascii() is broken on big-endian ↵Jeremy Allison2011-07-192-0/+12
| | | | | | | | | | | | | | | systems. Re-add: smb_ucs2_t toupper_w(smb_ucs2_t v); and ensure it is called whenever we are operating on smb_ucs2_t variables. I'd like to make the definition of smb_ucs2_t incompatible with int and codepoint_t so they can't be mixed, but that's a patch for another time. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Jul 19 23:48:05 CEST 2011 on sn-devel-104
* First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systemsJeremy Allison2011-07-193-43/+1
| | | | | | | | | | Remove int toupper_ascii(int c); int tolower_ascii(int c); int isupper_ascii(int c); int islower_ascii(int c); and replace with their _m equivalents, as they are identical.
* lib/util/attr: add _UNUSED_ marcoStefan Metzmacher2011-07-141-2/+7
| | | | metze
* s4-fault: changed to use %d for PID, instead of %PID%Andrew Tridgell2011-07-131-1/+1
| | | | | | this matches the s3 behaviour Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* ldb: added ldb_val_string_cmp()Andrew Tridgell2011-07-134-1/+272
| | | | | | this should help fix some places where we run past the end of a string Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* ldb: don't return special DNs on non-base searchesAndrew Tridgell2011-07-131-0/+5
| | | | | | to look at a special DN, give the full DN Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* ldb: don't shortcut dn comparison for mismatched special DNsAndrew Tridgell2011-07-131-1/+1
| | | | | | | DNs that start with @ can't be compared via string comparison with normal DNs Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* ldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique ↵Matthieu Patou2011-07-131-4/+11
| | | | | | | | | | | | | | | | | | | | | | value test should be performed or not The function ltdb_add_internal is called either from ltdb_add or ltdb_rename. In case of add we enforce the unique test (unless it has been relaxed by a upper module through the LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK flag), but for rename as it is translated by a delete + a add we relax the test as we can have one or more attribute which are supposed to be single valued but that are not (ie. when we have a couple of deleted value on a single valued attribute), we have already done the tests on insert so make the assumption that the values are OK. Without this patch deleting a subnet that has been affected to more than one site fails as the delete is in fact a rename to GUID\0DEL ... with an attribute siteObject that has 1 active link value and 1 inactive link value Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Jul 13 02:29:20 CEST 2011 on sn-devel-104
* socket_wrapper: make sure interfaces are in the valid range on bind()Stefan Metzmacher2011-07-101-0/+5
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sun Jul 10 18:24:14 CEST 2011 on sn-devel-104
* tevent: change version to 0.9.13 after adding tevent_req_defer_callback()tevent-0.9.13Stefan Metzmacher2011-07-092-1/+76
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sat Jul 9 12:16:44 CEST 2011 on sn-devel-104
* tevent: add tevent_req_defer_callback()Stefan Metzmacher2011-07-093-0/+60
| | | | metze
* tevent: fix comments for tevent_req_post()Stefan Metzmacher2011-07-091-2/+2
| | | | metze
* lib/param: Merge struct loadparm_service into commonAndrew Bartlett2011-07-084-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
* s3-param use common struct parmlist_entry to hold parametric optionsAndrew Bartlett2011-07-082-1/+3
| | | | | | This will allow struct loadparm_service to be shared in future. Andrew Bartlett
* param: Move per-share parameters into a seperate file, to share with s3Andrew Bartlett2011-07-082-0/+36
| | | | | | | This will allow the struct loadparm_service to be in common between the two loadparm implementations in the tree. Andrew Bartlett
* lib/util Move bitmap.c to lib/utilAndrew Bartlett2011-07-083-1/+176
|
* s3:libsmb: remove unused clistr_push_fn()Stefan Metzmacher2011-07-071-6/+0
| | | | metze
* s3:libsmb: remove unused clistr_pull_fn()Stefan Metzmacher2011-07-071-6/+0
| | | | metze
* ccan/tally: don't use SIZE_MAX.Rusty Russell2011-07-061-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
* libcli/smb move enum protocol_types to a common headerAndrew Bartlett2011-07-062-15/+1
|
* ldb: set -Wl,-no-undefined only on standalone buildAndrew Bartlett2011-07-051-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
* ldb: make ldb a top level library for Samba 4.0Andrew Bartlett2011-07-05149-0/+49340
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* ccan: fix configure tests for __builtin_clz etc.Rusty Russell2011-07-051-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
* S3: Fix some nonempty blank linesVolker Lendecke2011-07-031-3/+3
|
* lib/util/string_wrappers: move everything into one ↵Stefan Metzmacher2011-06-301-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
* param: Merge param headers into lib/param/loadparm.hAndrew Bartlett2011-06-291-0/+117
| | | | | | | This defines a common table format, so we can in future define a common table. Andrew Bartlett
* lib: Allow NULL converted_size in convert_string_tallocVolker Lendecke2011-06-241-2/+6
|
* lib/util/charset: Remove autodetection of charset from LOCALEAndrew Bartlett2011-06-231-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
* lib/util/charset: Remove 'display charset'Andrew Bartlett2011-06-235-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
* lib/util: Restore CH_UNIX as source charset for d_printf()Andrew Bartlett2011-06-211-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>
* lib/util Remove display_cd from d_printf()Andrew Bartlett2011-06-211-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>
* lib/ccan/tally.h: update for FreeBSD compile.Rusty Russell2011-06-217-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
* lib/util Remove samba-util-common!Andrew Bartlett2011-06-211-44/+12
| | | | | | | All of this code is now in common, so we don't need the second '-common' library any more! Andrew Bartlett
* lib/util: allow parmlist.c to compile under s3 includes.hAndrew Bartlett2011-06-211-0/+2
|
* lib/util: Use common d_printf() in the whole codebaseAndrew Bartlett2011-06-213-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
* lib/util Make unused d_vfprintf() staticAndrew Bartlett2011-06-212-2/+1
|
* Use tevent_req_oomVolker Lendecke2011-06-201-3/+3
| | | | This fixes a few Coverity errors
* tevent: change version to 0.9.12tevent-0.9.12Volker Lendecke2011-06-202-1/+75
|
* tevent: Add tevent_req_oomVolker Lendecke2011-06-202-1/+20
| | | | This is a replacement for tevent_req_nomem(NULL, req)
* tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.Rusty Russell2011-06-201-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
* tdb2: tie it into build process if --enable-tdb2-breaks-compatRusty Russell2011-06-203-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>
* tdb2: create tdb2 versions of various testing TDBs.Rusty Russell2011-06-202-22/+55
| | | | | | | Soon, TDB2 will handle tdb1 files, but until then, we substitute. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb2: python wrapperRusty Russell2011-06-201-0/+574
| | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb2: minor changes to SAMBIFY it.Rusty Russell2011-06-203-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>