[SSSD] [PATCH] [HBAC]: Better libhbac debuging

Lukas Slebodnik lslebodn at redhat.com
Fri Sep 18 09:08:10 UTC 2015


On (15/09/15 09:54), Petr Cech wrote:
>On 09/14/2015 03:25 PM, Jakub Hrozek wrote:
>>On Mon, Sep 14, 2015 at 02:15:39PM +0200, Petr Cech wrote:
>>>> From 4246d5cd91c4c34b8524be5bfce38c57163a6e2b Mon Sep 17 00:00:00 2001
>>>>From: Lukas Slebodnik<lslebodn at redhat.com>
>>>>Date: Fri, 11 Sep 2015 17:04:58 +0200
>>>>Subject: [PATCH] squash_me
>>>>
>>>>---
>>>>  Makefile.am                        | 2 +-
>>>>  src/providers/ipa/ipa_hbac.exports | 8 ++++++--
>>>>  2 files changed, 7 insertions(+), 3 deletions(-)
>>>>
>>>>diff --git a/Makefile.am b/Makefile.am
>>>>index 851f943a4c57b70cee4f4f34e83457e7d204aff1..a2a868455f91fac212fcfa7b41681086145c06f9 100644
>>>>--- a/Makefile.am
>>>>+++ b/Makefile.am
>>>>@@ -928,7 +928,7 @@ libipa_hbac_la_LIBADD = \
>>>>      $(UNICODE_LIBS)
>>>>  libipa_hbac_la_LDFLAGS = \
>>>>      -Wl,--version-script,$(srcdir)/src/providers/ipa/ipa_hbac.exports \
>>>>-    -version-info 0:1:0
>>>>+    -version-info 1:0:1
>>>Lukas, are you sure this version number 1:0:1? If you're really sure this
>>>number, I have not understood it properly.

You might also look into generated library name for old version-info and for
new version-info. The SONAME should be the same.

sh$ objdump -p /lib64/libipa_hbac.so | grep SONAME
  SONAME               libipa_hbac.so.0


>>
>>I have not read the patch at all, just adding a link about version info
>[1]
>>     https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
>>
>>The trick to follow this guide is that it's really an algorithm, so you
>>shouldn't stop at the first change, but continue (potentially reverting
>>or overwriting previous changes)
>>
>I understand, how we changed -version-info (it is exactly by steps as
>described in [1]), but I don't understand clearly changes in .exports.
>Petr
because there was a copy&paste bug in diff.
As I wrote in previous mail; new function should not be added
to old version block.

I'm sorry for confusion.

//slightly offtopic
hbac_evaluate could be in oth section IPA_HBAC_0.0.1 and IPA_HBAC_0.1.0.
But it is used mainly in cases if you want to introduce backward incompatible
changes and do not break old behaviour. It is described in dso document.

One of examples is in glibc

sh$ objdump -T /lib64/libc.so.6 | grep " memcpy"
00000000000936d0 g   iD  .text  0000000000000051  GLIBC_2.14  memcpy
000000000008e48b g   iD  .text  0000000000000051 (GLIBC_2.2.5) memcpy


diff --git a/src/providers/ipa/ipa_hbac.exports b/src/providers/ipa/ipa_hbac.exports
index 63b6a5cd673d7b7f3096794648483d280a6bb47f..b7945e139b9ab81b7c1d68eb707acaaff7163a2e 100644
--- a/src/providers/ipa/ipa_hbac.exports
+++ b/src/providers/ipa/ipa_hbac.exports
@@ -1,4 +1,4 @@
-IPA_HBAC_0.0.2 {
+IPA_HBAC_0.0.1 {

     # public functions
     global:
@@ -8,9 +8,13 @@ IPA_HBAC_0.0.2 {
         hbac_error_string;
         hbac_free_info;
         hbac_rule_is_complete;
-        hbac_enable_debug;

     # everything else is local
     local:
         *;
 };
+
+IPA_HBAC_0.1.0 {
+    global:
+        hbac_enable_debug;
+} IPA_HBAC_0.0.1;

LS


More information about the sssd-devel mailing list