GithubHelp home page GithubHelp logo

sssd / ding-libs Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 9.0 1.07 MB

"DING is not GNU" helper libraries for SSSD and FreeIPA

License: GNU Lesser General Public License v3.0

C 98.79% Shell 0.04% Makefile 0.81% M4 0.36%

ding-libs's Introduction

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.

ding-libs's People

Contributors

alexey-tikhonov avatar cipherboy avatar frozencemetery avatar hrio avatar ijwagn avatar jas4711 avatar jengelh avatar jhrozek avatar mzidek-gh avatar nullr0ute avatar palfrey avatar sgallagher avatar simo5 avatar sumit-bose avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ding-libs's Issues

autoreconf: configure.ac:57: error: required file 'build/config.rpath' not found

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

Problem with path_utils_ut.c on musl

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");

hash_key_t.str really should be const

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.

Fix some mistakes in doxygen docs for ding-libs.

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.

Test Case Failure - ini_config_ut, ini_save_ut

Hi I tried to update ding-libs to the upstream version while running the test cases I am facing some issues can anyone help? are any dependency packages required?

Architecture -> armv7l.
Kernel-Version -> 5.4.
Debian distribution.

ding-libs-error

Running tests fail in ini_validators_ut_check

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)

New release?

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.

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.