https://bugzilla.novell.com/show_bug.cgi?id=635365
https://bugzilla.novell.com/show_bug.cgi?id=635365#c16
--- Comment #16 from Michal Vyskocil 2011-01-10 15:10:26 UTC ---
To keep a track - this is the code
in IcedTeaNPPlugin.c/NP_Initialize
2136 Dl_info info;
2137 int filename_size;
2138 if (dladdr ((const void*) ITNP_New, &info) == 0)
2145 filename = (gchar*) malloc(sizeof(gchar)*1024);
2146 filename_size = readlink(info.dli_fname, filename, 1023);
2165 appletviewer_executable = g_strdup_printf ("%s/../../bin/java",
2166 dirname (filename));
2167 PLUGIN_DEBUG(".so is located at: %s and the link points to: %s.
Executing java from dir %s to run %s\n", info.dli_fname, filename, dirname
(filename), appletviewer_executabl
2168
2175 np_error = plugin_test_appletviewer ();
2176 if (np_error != NPERR_NO_ERROR)
2177 {
2178 plugin_display_failure_dialog ();
2179 goto cleanup_appletviewer_executable;
2180 }
2181 g_free (filename);
The path is extracted from dladdr's result in info.dli_fname and it's checked
if it's not a symlink by readlink function. The appletviewer_executable is made
from "%s/../../bin/java".
The point is in some cases dlarrd returns a path with /etc/alternatives/ from
unknown reason. I was not successful to reproduce it, because there are few
problems. One is that I don't know what is the ITNP_New used in dladdr call and
how it's constructed. For future I plan add more debug prints to be able debug
it more, but know don't have an idea.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.