Reduce duplicate symbols, merge server_id
Andrew Bartlett
abartlet at samba.org
Mon May 2 06:42:41 MDT 2011
In my merge-test branch I have some changes to bring down the duplicate
symbol count in the top level build.
http://git.samba.org/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/merge-test
Ronnie, in particular I would like your comment on:
s3-server_id Add id2 to server_id to match Samba4
http://git.samba.org/?p=abartlet/samba.git/.git;a=commitdiff;h=b7d019d745b015154085b1f16db6c7269bc4d61d
Here I've changed server_id to include an id2 additional component that
Samba4 uses in it's single and prefork process modal for internal task
within a pid. This changes the server_id structure, which will as I
understand it mean that a future Samba 3.6 will not talk to a future
Samba 4.0 in a ctdb cluster, but otherwise it should be harmless. Are
there any other impacts on CTDB I should be aware of?
I've not chosen simply to reuse the .unique_id element as that was added
for a very good reason, and I think that check element should be
maintained in a project-wide server_id.
The reason I've done this now is that the ndr pull/push functions for
server_id.idl and the notify.idl were causing duplicate symbols, and
because I hope to have a common interprocess messaging system in future,
and a common server_id would be the basis for that.
I've also couple of other Samba3 functions in common:
get_interfaces
set_socket_options
and renamed or removed:
iface_count
iface_n_bcast
load_interfaces
ndr_print_notify_array
ndr_print_notify_depth
ndr_print_notify_entry
ndr_print_notify_event
ndr_print_server_id
ndr_pull_notify_array
ndr_pull_notify_entry
ndr_pull_notify_event
ndr_pull_server_id
ndr_push_notify_array
ndr_push_notify_entry
ndr_push_notify_event
ndr_push_server_id
packet_init
packet_send
resolve_name
The list of duplicates is now just 30 (down from 51):
allow_access
d_fprintf
d_printf
d_vfprintf
gen_fnmatch
get_friendly_nt_error_msg
get_nt_error_c_code
map_nt_error_from_unix
messaging_deregister
messaging_init
messaging_register
messaging_send
ms_fnmatch
nt_errstr
nt_status_squash
nt_status_string_to_code
ntstatus_to_dos
ntstatus_to_werror
push_string
secrets_init
strequal
strlower_m
strlower_talloc
strupper_m
strupper_talloc
talloc_strdup_upper
tdb_wrap_open
unix_perms_to_wire
unix_to_werror
werror_to_ntstatus
Each duplicate symbol is a potential segfault, particularly if the
prototypes or behaviours are different. I hope to sort out the
remainder of these symbols shortly.
The merges so far have almost entirely been to copy the source3
implementation of a function into Samba4, and to then copy it to the top
level. Given the minor and one-off nature of the affected code, I
haven't put any talloc_stackframe() or talloc_tos() calls into the top
level code until we resolve as a team how we consistently wish to deal
with that.
I'm still working to ensure the interfaces code does exactly what we
want, but I hope to work with tridge to have this reviewed soon.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical
mailing list