1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Volker Lendecke
78d7512db9 lib: Remove unused parmlist code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-21 11:43:04 +02:00
Volker Lendecke
0f91e4e18d lib: Fix a few CIDs for Resource Leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-21 19:37:16 +02:00
Stefan Metzmacher
3f0c7e8794 lib/util/tests: avoid some compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-14 23:27:04 +01:00
Jeremy Allison
612b74296c lib: util: asn1 tests. Check every asn1 return.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-09-26 00:51:16 +02:00
Stefan Metzmacher
8ba775b0a3 lib/util/tests: add missing #include "torture/local/proto.h"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:44 +02:00
Stefan Metzmacher
65f2bba559 lib/util: improve check_password_quality() to handle utf8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-04 17:14:22 +01:00
Andrew Bartlett
530e4cac2e s3-param Remove 'time offset' from smb.conf
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-11 03:54:44 +02:00
Andrew Bartlett
ede98c0e51 lib/util Add Volker's asn1_Integer test into code that runs in 'make test'
The comfychair test harness isn't hooked up, and with the current
infrustructure C code is better tested directly here.

Andrew Bartlett
2011-05-24 12:48:00 -07:00
Jeremy Allison
017e0c8d95 Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1. 2011-05-04 12:12:13 -07:00
Andrew Bartlett
d01f318179 s4: fix arguments to safe_strcpy()
Found by the s3-derivied safe_strcpy() macro.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Stefan Metzmacher
c9e6bf047d lib/util: add tests for anonymous_shared_allocate/free()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan 20 06:25:03 CET 2011 on sn-devel-104
2011-01-20 06:25:03 +01:00
Matthias Dieter Wallnöfer
3b591caed0 lib/util/asn1.c - remove the "const" specifier from OID
There is no reason to have it "const" since it's an allocated thing.
2010-12-21 15:10:37 +11:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
Matthias Dieter Wallnöfer
bd3e5804a4 Revert "lib/util:tests/time.c - "test_timestring" - fix it on Solaris"
This reverts commit 654e0102dd.
This should better be handled by the replace library.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Dec  6 12:17:31 CET 2010 on sn-devel-104
2010-12-06 12:17:31 +01:00
Matthias Dieter Wallnöfer
654e0102dd lib/util:tests/time.c - "test_timestring" - fix it on Solaris
Solaris returns "Thu Jan 01" and not "Thu Jan  1" - therefore proof for
both.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec  5 23:09:13 CET 2010 on sn-devel-104
2010-12-05 23:09:13 +01:00
Kamen Mazdrashki
14cb61da8f asn1_tests: Implement negative unit-tests for ber_write_OID_String() 2010-10-22 01:48:58 +03:00
Kamen Mazdrashki
099b0057be asn1_tests.c: Make test data static const 2010-10-20 13:12:17 +00:00
Jelmer Vernooij
4c681f760f strlist: Make test names unique. 2010-09-21 22:54:33 -07:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Brad Hards
dd89dc2c31 Spelling fixes for libutil
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:35 +01:00
Andrew Tridgell
91cb7b7c60 test:local added LOCAL-DLINKLIST testsuite
(cherry picked from commit 95a5bee2c30a67a35604b0456ab7836f6dc67702)
2010-02-10 15:55:34 -08:00
Matthias Dieter Wallnöfer
94c33bdd72 util/strlist: Fix up "const" warnings in the string list and test code
This work I did using suggestions by Jelmer.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-20 16:50:47 +01:00
Kamen Mazdrashki
b7839b73b1 util: str_list_unique_2() test implementation
Difference with previous test for str_list_unique() is
that this test allows number of elements and number
of duplicates to be supplied on command line using
--option="list_unique:count=47"
--option="list_unique:dups=7"
2009-11-13 23:19:06 +11:00
Andrew Bartlett
fd5174e88c lib/util Split data_blob_hex_string() into upper and lower
Rather than have a repeat of the bugs we found at the plugfest where
hexidecimal strings must be in upper or lower case in particular
places, ensure that each caller chooses which case they want.

This reverts most of the callers back to upper case, as things were
before tridge's patch.  The critical call in the extended DN code is
of course handled in lower case.

Andrew Bartlett
2009-11-12 16:34:01 +11:00
Kamen Mazdrashki
f11cdc19d1 s4/asn1: Use explicite TALLOC_CTX in ber_write_OID functions 2009-10-16 12:54:13 +03:00
Karolin Seeger
fc2604ed26 asn1_tests: Fix typo in comment.
Karolin
2009-10-09 11:27:06 +02:00
Kamen Mazdrashki
a96c8c2355 s4/asn1: local TALLOC_CTX should be child of torture_context 2009-10-01 23:13:00 +02:00
Kamen Mazdrashki
a51571bf41 s4/asn1: fixed typo in torture messages 2009-10-01 23:13:00 +02:00
Kamen Mazdrashki
97e7f48f75 s4/asn1: Added test for ber_read_partial_OID_String() 2009-10-01 23:13:00 +02:00
Kamen Mazdrashki
5021301a0e s4/asn1: Added test for ber_read_OID_String() 2009-10-01 23:12:59 +02:00
Kamen Mazdrashki
681064e66e s4/asn1: Added test for ber_write_partial_OID_String() 2009-10-01 23:12:59 +02:00
Kamen Mazdrashki
3c3ef94ab3 s4/asn1: Added test for ber_write_OID_String() 2009-10-01 23:12:59 +02:00
Kamen Mazdrashki
bd5343924f s4/asn1: Added torture suite for ASN1 2009-10-01 23:12:59 +02:00
Andrew Kroeger
c5dba4a82e s4:torture: data_blob_hex_string() output is now lowercase.
Based on the change in commit fb84edabbe, these
tests needs to expect lowercase output.
2009-09-30 16:02:14 +02:00
Jelmer Vernooij
d9ada600cc parmlist: Add more tests. 2009-09-27 17:37:53 +02:00
Jelmer Vernooij
db55ea08bc parmlist: Add basic tests for test_get_int(). 2009-09-27 14:39:58 +02:00
Andrew Kroeger
a32f4dd3cf util:tests: Correct time tests for negative UTC offsets.
All:

Please find attached a patch to fix the timestring and http_timestring
tests on hosts that have a negative UTC offset (west of the Prime Meridian).

Sincerely,
Andrew Kroeger

>From 8a8ca35edccf64aa98f2f3ae1469c4c27db8215e Mon Sep 17 00:00:00 2001
From: Andrew Kroeger <andrew@id10ts.net>
Date: Fri, 4 Sep 2009 01:31:50 -0500
Subject: [PATCH] util:tests: Correct time tests for negative UTC offsets.

The timestring and http_timestring tests were failing on hosts with negative
offsets from UTC.  Due to the timezone offset, the returned values were back in
the year 1969 (before the epoch) and did not match the test patterns.

The correction computes the offset from UTC, and if it is negative that offset
is added onto the value given to the timestring() and http_timestring() calls so
that the returned values fall on 01-Jan-1970 and match the test pattern.
2009-09-05 10:06:29 +10:00
Matthieu Patou
a817cff5a0 Fix broken password quality check
This fixes broken password tests when the passwords contain non ASCII characters
(e.g. accentuated chars like ('e, `e, ...)
2009-07-19 16:00:19 +02:00
Andrew Bartlett
d73eab2b33 Add extensive tests for str_list function behaviour 2009-05-15 01:50:06 +10:00
Andrew Bartlett
a89bee4c98 Add new functions and tests: str_list_make_empty(), str_list_make_single() 2009-05-14 05:56:58 +10:00
Jelmer Vernooij
078879735b Print the failed value in the time tests. 2009-01-08 12:45:57 +01:00
Jelmer Vernooij
ef80d1b794 Fix use of "time offset" parameter, and add test to make sure I don't break it again :-) 2008-12-23 22:10:34 +01:00
Jelmer Vernooij
65d5b1e7b4 Test maxsize parameter to file_load() as used in Samba 3. 2008-10-13 16:40:27 +02:00
Jelmer Vernooij
eaba778416 Add test for data_blob_string_const_null. 2008-10-13 16:29:19 +02:00
Jelmer Vernooij
3994c42f19 Fix number of arguments for file_load() functions. 2008-10-12 19:46:38 +02:00
Jelmer Vernooij
a19929dac1 Add more tests to datablob testsuite. 2008-10-12 05:59:50 +02:00
Jelmer Vernooij
d7371dae24 Add one-test testsuite for datablob. 2008-10-12 01:56:11 +02:00
Jelmer Vernooij
218f482fbf Use common strlist implementation in Samba 3 and Samba 4. 2008-10-12 00:56:56 +02:00
Jelmer Vernooij
75a36a9a54 Add some simple tests for lib/util/time.c 2008-10-11 23:25:35 +02:00
Jelmer Vernooij
caa4e42860 Move lib/util from source4 to top-level libutil.
Conflicts:

	source4/Makefile
2008-10-11 21:05:38 +02:00