summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* torture: fix whitespace/tab mixup in internal_torture_run_test()Michael Adam2014-09-081-22/+22
| | | | | | | | | | No diff visible with "git show|diff -w". Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Sep 8 04:21:52 CEST 2014 on sn-devel-104
* lib/ldb/wscript: pass dep_vars=['LDB_VERSION'] to SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-2/+1
| | | | | | | bld.add_manual_dependency() only works for files not for environment variables. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/texpect: add texpect binary based on heimdals rkpty.Günther Deschner2014-09-012-0/+450
| | | | | | | | Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* Remove custom password change code in libadsSimo Sorce2014-09-011-1/+0
| | | | | | | | | Use standard libkrb5 calls instead. Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* Look for system setproctitle before trying -lbsd.Jelmer Vernooij2014-08-311-2/+2
| | | | | | Change-Id: I390c186d7c1400287c6a18909a5d6587f2052243 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* replace: remove tabs.Jelmer Vernooij2014-08-311-4/+4
| | | | | | Change-Id: Ie87f3c8a60f6292b7d2302425c946f5befaf5fcc Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* replace: remove unused and duplicate imports.Jelmer Vernooij2014-08-311-2/+2
| | | | | | Change-Id: I6cfd2cf80efe19fa31bcd6b3881a1eb01f05d1b4 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Fix typo in ldbrename manpageMarc Muehlfeld2014-08-281-1/+1
| | | | | Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org>
* lib: Introduce server_id_same_process()Volker Lendecke2014-08-232-5/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ldb: Fix check for third_partyAmitay Isaacs2014-08-211-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Remove unused item returned by FAILED()Martin Schwenke2014-08-201-1/+1
| | | | | | | | | | | | | | | | | | The (return) value of FAILED() is a constant 1. However, it is never used, so the compiler complains when run with -Wall: lib/replace/test/os2_delete.c: In function ‘cleanup’: lib/replace/test/os2_delete.c:39:163: warning: right-hand operand of comma expression has no effect [-Wunused-value] FAILED("system"); So just get remove the ", 1" since it is the bit that does nothing and is never used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Aug 20 16:54:31 CEST 2014 on sn-devel-104
* tdbtorture: print details when run with -n 1David Disseldorp2014-08-181-4/+4
| | | | | | | | | | | | | Currently tdbtorture prints the test details (processes, loops, etc.) from the first forked child process. When run with -n 1 (one process), the test is run from within the parent and no details are printed. This change ensures that they are. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Aug 18 13:26:32 CEST 2014 on sn-devel-104
* lib: Remove parser code, now replaced with tini parser.Volker Lendecke2014-08-151-508/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 15 20:34:56 CEST 2014 on sn-devel-104
* Add tiniparser - tiny version of iniparser that only implements what Samba uses.Jeremy Allison2014-08-143-1/+441
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Use tini in preference.Volker Lendecke2014-08-141-0/+28
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add tini parser.Volker Lendecke2014-08-143-1/+348
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/popt: Remove non third_party popt.Ira Cooper2014-08-0914-3321/+0
| | | | | | | | Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Sat Aug 9 20:47:05 CEST 2014 on sn-devel-104
* third_party/popt: Initial support for popt.Ira Cooper2014-08-091-3/+15
| | | | | | | ctdb, ldb, and samba are supported builds for third_party popt. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/zlib: Remove non third_party zlib.Ira Cooper2014-08-09197-54080/+0
| | | | | Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/iniparser: Remove non third_party iniparser.Ira Cooper2014-08-0927-3524/+0
| | | | | Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* krb5_wrap: Use com_err in krb5_warnx.Andreas Schneider2014-08-081-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: make sure smb_krb5_principal_get_realm returns a malloced string.Günther Deschner2014-08-081-3/+5
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: provide krb5_warnx() replacement.Günther Deschner2014-08-082-0/+27
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 8 08:30:50 CEST 2014 on sn-devel-104
* lib/krb5_wrap: use krb5_copy_data_contents in smb_krb5_principal_set_realm.Günther Deschner2014-08-081-5/+5
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: provide CKSUMTYPE_HMAC_MD5 type matching MIT.Günther Deschner2014-08-081-0/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: define KRB5_PW_SALT if it is not already there.Günther Deschner2014-08-081-0/+4
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add smb_krb5_principal_get_type().Günther Deschner2014-08-082-0/+23
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add smb_krb5_principal_set_realm().Günther Deschner2014-08-082-0/+48
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: use const principal in smb_krb5_principal_get_realm().Günther Deschner2014-08-082-2/+2
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add krb5_copy_data_contents.Günther Deschner2014-08-082-0/+37
| | | | | | | | | | | This reuses krb5_data_copy() if available, choosed not to call it krb5_data_copy as that is easily mixed up with krb5_copy_data (which allocs the krb5_data pointer). Thanks Simo for proposing the better name. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add smb_krb5_principal_get_comp_string().Günther Deschner2014-08-082-0/+42
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: move krb5_princ_size replacement code to ↵Günther Deschner2014-08-081-0/+8
| | | | | | | | | lib/krb5_wrap/krb5_samba.c. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add smb_krb5_get_allowed_weak_crypto().Günther Deschner2014-08-082-0/+55
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* lib/krb5_wrap: remove unused create_kerberos_key_from_string_direct().Günther Deschner2014-08-082-54/+0
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* lib/krb5_wrap: add smb_krb5_create_key_from_string().Günther Deschner2014-08-082-0/+79
| | | | | | | | | | | This function can take either a calculated salt or a principal and calculate the salt on its own. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* lib/krb5_wrap: add smb_krb5_get_pw_salt().Günther Deschner2014-08-082-0/+45
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* lib: strings: Simplify strcasecmpVolker Lendecke2014-08-061-35/+13
| | | | | | | | | This makes us fallback to strcasecmp early if any INVALID_CODEPOINT appears. Without this patch we just continue to compare if both strings happen to have an INVALID_CODEPOINT in the same spot. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4: tests: Added local.charset test for Bug 10716 - smbd constantly crashes ↵Jeremy Allison2014-08-061-0/+12
| | | | | | | | when filename contains non-ascii character https://bugzilla.samba.org/show_bug.cgi?id=10716 Signed-off-by: Jeremy Allison <jra@samba.org>
* lib: strings: Fix the behavior of strncasecmp_m_handle() in the face of bad ↵Jeremy Allison2014-08-061-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversions. When either string has a bad conversion, we fall back to doing raw ascii byte comparisons using strcasecmp(). This is wrong - we should fall back to strncasecmp. The problem is we've already stepped past the character that failed the conversion, so we're not re-testing those characters for comparison. This can have the effect of causing strncasecmp_m_handle() to report that two strings are identical when they are not, if the failed conversion takes place at the end of the string. The correct behavior is to step back to the point of the string(s) that failed the conversion, and continue the test from there. This is a litle trickier than the previous fix, as it requires converting the incoming n variable from remaining characters to compare to remaining bytes to compare. As bytes are always the smallest character size (1 byte) then it's safe to convert the remaining characters to check by decrementing the source string by the last character length (in bytes) and incrementing the remaining bytes to scan by the same value, then calling strncasecmp() with the stepped back strings remaining. Signed-off-by: Jeremy Allison <jra@samba.org>
* lib: strings: Fix the behavior of strcasecmp_m_handle() in the face of bad ↵Jeremy Allison2014-08-061-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversions. When either string has a bad conversion, we fall back to doing raw ascii byte comparisons using strcasecmp(). The problem is we've already stepped past the character that failed the conversion, so we're not re-testing those characters for comparison. This can have the effect of causing strcasecmp_m_handle() to report that two strings are identical when they are not, if the failed conversion takes place at the end of the string. The correct behavior is to step back to the point of the string(s) that failed the conversion, and continue the test from there. Found by <lev@zadarastorage.com> when investigating bug 10716 - smbd constantly crashes when filename contains non-ascii character. Given the normal character set of utf-8, and an on disk filename of ISO-8859-1 of file-é on disk hex value: 66 69 6c 65 2d e9, an incoming open given the correct utf8 name of file-é will collide when it should not. Fixes: Bug 10716 - smbd constantly crashes when filename contains non-ascii character https://bugzilla.samba.org/show_bug.cgi?id=10716 Signed-off-by: Jeremy Allison <jra@samba.org>
* lib: Remove unused nstrcpyVolker Lendecke2014-08-041-5/+0
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Aug 4 09:58:16 CEST 2014 on sn-devel-104
* lib: Make DEBUG a subsystem of its ownVolker Lendecke2014-08-021-2/+7
| | | | | | | | | | | In the future this might become a library, but even with the SUBSYSTEM it should be clear what debug.c depends upon. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Aug 2 00:36:50 CEST 2014 on sn-devel-104
* lib: Make close_low_fd() independently linkableVolker Lendecke2014-08-016-51/+101
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* debug: Use close_low_fd in reopen_logs_internalVolker Lendecke2014-08-011-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use close_low_fd in close_low_fdsVolker Lendecke2014-08-011-33/+19
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add close_low_fdVolker Lendecke2014-08-012-0/+48
| | | | | | | | This factors out the essential code from close_low_fds for one file descriptor: Redirect a fd to /dev/null Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* fix unstrcpyVolker Lendecke2014-08-011-1/+1
| | | | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10735 CVE-2014-3560: unstrcpy macro length is invalid Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Fri Aug 1 22:10:23 CEST 2014 on sn-devel-104
* waf: socket_wrapper should check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.Andreas Schneider2014-07-311-0/+12
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 31 21:12:07 CEST 2014 on sn-devel-104
* uwrap: Support dropping all supplemetary groups with setgroups()Jakub Hrozek2014-07-311-2/+12
| | | | | | | | | | Dropping all supplementary groups is a common practice when changing UIDs. This patch adds support for dropping all supplementary groups when setgroups is called with size=0. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Add logging if uwrap is enabled correctly.Andreas Schneider2014-07-311-0/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>