[Samba] unsafe_string_function_usage_here when linking smbd
Bengt Nilsson
bengt.nilsson at mc2.chalmers.se
Sat Jun 7 11:16:39 GMT 2008
Please know that I am NOT an experienced programmer,
In safe_string.h, there are 6 usages of
"__unsafe_string_function_usage_here_size_t__"
(I am not sure where trans2.c is coming into this.)
Anyway, to find out which one that fails, I created the single
prototype with
size_t __unsafe_string_function_usage_here_size_t__1(void);
size_t __unsafe_string_function_usage_here_size_t__2(void);
size_t __unsafe_string_function_usage_here_size_t__3(void);
size_t __unsafe_string_function_usage_here_size_t__4(void);
size_t __unsafe_string_function_usage_here_size_t__5(void);
size_t __unsafe_string_function_usage_here_size_t__6(void);
and renamed the corresponding #defines
#define push_pstring_base(dest, src, pstring_base) \
(CHECK_STRING_SIZE(pstring_base, sizeof(pstring)) \
? __unsafe_string_function_usage_here_size_t__1() \
: push_ascii(dest, src, sizeof(pstring)-
PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE))
.....
#define srvstr_push_fn2(fn_name, fn_line, base_ptr, dest, src,
dest_len, flags) \
(CHECK_STRING_SIZE(dest, dest_len) \
? __unsafe_string_function_usage_here_size_t__6() \
: srvstr_push_fn(fn_name, fn_line, base_ptr, dest, src, dest_len,
flags))
And now the unresolved function was
Linking bin/smbd
ld:
Unresolved:
__unsafe_string_function_usage_here_size_t__6
make: *** [bin/smbd] Error 1
Is this of any help or is it just bull*?
For myself, I do not know what to do with this information, even if
would be useful.
6 jun 2008 kl. 19.31 skrev Kai Lanz:
>
> On Jun 6, 2008, at 10:10 AM, Herb Lewis wrote:
>
>> try doing an nm on the suspected .o file and see if the reference
>> to the function is there. That will prove which file(s) is comes
>> from than maybe you can determine which function it comes from.
>
> Thanks, but I've already done that; I used "nm" to confirm that the
> call to an undefined external function called
> "unsafe_string_function_usage_here_size_t" was present in
> trans2.o and in no other object file under source/smbd. The
> trouble is there are 27 calls in trans2.c that have been
> wrapped by safe_string.h and I haven't thought of a way to
> determine which one is getting replaced by the "unsafe_"
> marker.
>
> --
> Kai Lanz
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list