mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
wafsamba.abi: Fix abi_match with both excludes and includes.
This fixes a regression introduced by 9c3e294400
which caused internal symbols in libldb to be exposed.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9357
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
d02c8ba122
commit
ec3cbb6c47
@ -191,12 +191,12 @@ def abi_write_vscript(f, libname, current_version, versions, symmap, abi_match):
|
||||
f.write("\t\t%s;\n" % x)
|
||||
else:
|
||||
f.write("\t\t*;\n")
|
||||
if len(local_abi) > 0:
|
||||
if abi_match != ["*"]:
|
||||
f.write("\tlocal:\n")
|
||||
for x in local_abi:
|
||||
f.write("\t\t%s;\n" % x[1:])
|
||||
elif abi_match != ["*"]:
|
||||
f.write("\tlocal: *;\n")
|
||||
if len(global_abi) > 0:
|
||||
f.write("\t\t*;\n")
|
||||
f.write("};\n")
|
||||
|
||||
|
||||
|
@ -100,4 +100,21 @@ MYLIB_0.1 {
|
||||
\tlocal:
|
||||
\t\texc_*;
|
||||
};
|
||||
""")
|
||||
|
||||
def test_excludes_and_includes(self):
|
||||
f = StringIO()
|
||||
abi_write_vscript(f, "MYLIB", "1.0", [], {
|
||||
"pub_foo": "1.0",
|
||||
"exc_bar": "1.0",
|
||||
"other": "1.0"
|
||||
}, ["pub_*", "!exc_*"])
|
||||
self.assertEquals(f.getvalue(), """\
|
||||
1.0 {
|
||||
\tglobal:
|
||||
\t\tpub_*;
|
||||
\tlocal:
|
||||
\t\texc_*;
|
||||
\t\t*;
|
||||
};
|
||||
""")
|
||||
|
Loading…
Reference in New Issue
Block a user