sssd / ding-libs Goto Github PK
View Code? Open in Web Editor NEW"DING is not GNU" helper libraries for SSSD and FreeIPA
License: GNU Lesser General Public License v3.0
"DING is not GNU" helper libraries for SSSD and FreeIPA
License: GNU Lesser General Public License v3.0
To build the ding-libs from the tarball: ./configure make make docs (optional) make check (optional) make install To build the ding-libs from a source checkout: autoreconf -if then follow the tarball instructions above.
Doing git clone ding-libs && autoreconf -vsi --force
fails with:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
autoreconf: running: libtoolize --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build'.
libtoolize: linking file 'build/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/local/bin/autoconf --force
autoreconf: running: /usr/local/bin/autoheader --force
autoreconf: running: automake --add-missing --force-missing
configure.ac:8: installing 'build/compile'
configure.ac:57: error: required file 'build/config.rpath' not found
configure.ac:11: installing 'build/missing'
Makefile.am: installing 'build/depcomp'
autoreconf: automake failed with exit status: 1
Hi I am having problems with this unit test with musl libc
./path_utils/path_utils_ut.c
fail_unless(get_dirname(p, PATH_MAX, "//foo//") == SUCCESS);
fail_unless_str_equal(p, "//");
Result
Running suite(s): path_utils
95%: Checks: 24, Failures: 1, Errors: 0
path_utils/path_utils_ut.c:65:F:path_utils:test_dirname:0: The strings '/' and '//' are different, expected same
FAIL path_utils_ut (exit status: 1)
For reference http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266
Multiple successive slashes are considered to be the same as one slash
Hence it would seem like a test problem?
With this diff it will pass on musl
--- ding-libs-0.6.1/path_utils/path_utils_ut.c
+++ ding-libs-0.6.1-path-utils/path_utils/path_utils_ut.c
@@ -62,7 +62,14 @@
fail_unless_str_equal(p, "//foo");
fail_unless(get_dirname(p, PATH_MAX, "//foo//") == SUCCESS);
- fail_unless_str_equal(p, "//");
+ //fail_unless_str_equal(p, "//");
+ fail_unless_str_equal(p, "/");
+
+ fail_unless(get_dirname(p, PATH_MAX, "//") == SUCCESS);
+ fail_unless_str_equal(p, "/");
+
+ fail_unless(get_dirname(p, PATH_MAX, "/") == SUCCESS);
+ fail_unless_str_equal(p, "/");
fail_unless(get_dirname(p, PATH_MAX, "foo//bar") == SUCCESS);
fail_unless_str_equal(p, "foo");
I'm looking at:
typedef struct hash_key_t {
hash_key_enum type;
union {
char *str;
unsigned long ul;
};
} hash_key_t;
and shouldn't str
be of type const char *
instead? The library should never modify it.
Which means that convert_key
should also use type const unsigned char *
instead.
I don't think the other functions touching .str
will care too much about it's signed-ness.
Or str
could be changed to const unsigned char *
and that would probably make more sense.
Well, it's the const-ness that I care about most: in my code which uses this library I have to drop the const
when initializing a hash_key_t
object which is kind of unfortunate, especially since str
never gets written to.
Cloned from https://pagure.io/SSSD/ding-libs/issue/2307 :
Here are some review comments from Stephen but I suspect there is much more so it makes sense to have a run of it.
struct ini_cfgfile **file_ctx);
/**
+ * @brief Create a configuration file object using memory buffer.
@brief Create a configuration file object from a NULL-terminated buffer.
+ *
+ * Create a file object for parsing a configuration file.
+ * Configuration will use provided memory instead of the actual file.
Configuration will use the provided memory buffer instead of a real file.
+ *
+ * A "configuration file object" is different from
+ * a "configuration object". The former stores metadata
+ * about a file the configuration data is read from,
about a file from which the configuration data is read,
(this is a very esoteric bit of English)
+ * while the latter holds the configuration itself.
while the latter holds the configuration data itself.
It would be beneficial to have ding-libs doxygen docs published.
As a preliminary step, this requires to enable generation of doxygen docs for DHASH.
As http://fedorahosted.org/ is disfuntional now, update the URL
in refarray/ref_array.pc.in, basicobjects/basicobjects.pc.in, collection/collection.pc.in, path_utils/path_utils.pc.in, dhash/dhash.pc.in and ini/ini_config.pc.in
94%: Checks: 18, Failures: 1, Errors: 0
ini/ini_validators_ut_check.c:610:F:ini_allowed_options:test_ini_allowed_options_wrong_regex:0: Got msg: [[r
ule/options_for_foo]: Cannot compile regular expression from option 'section_re'. Error: 'Unmatched [, [^, [
:, [., or [=']
FAIL ini_validators_ut_check (exit status: 1)
Cloned from https://pagure.io/SSSD/ding-libs/issue/3190
Hi, it's been 3.5 years since the last release (2017-11-07). In that time, there have been 16 commits, and the last commit was in 2018.
Specifically, I'd like a release that contains be9ca3a - while Fedora carries that patch, other distributions don't tend to.
In the function col_allocate_item
, a point that may cause process reset.
int col_allocate_item(struct collection_item **ci, const char *property,
const void *item_data, int length, int type) {
...
if (type == COL_TYPE_STRING) ((char *)(item->data))[length-1] = '\0';
...
}
When const char *property != NULL
and int length = 0
, the value of ((char *)(item->data))[length-1]
may fail. Therefore, should a negative value be protected before the value here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.