To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=74242
Issue #|74242
Summary|Crash when osl_getCurrentSecurity fails
Component|porting
Version|OOo 2.1
Platform|PC
URL|
OS/Version|Linux
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|mh
Reported by|pmladek
------- Additional comments from [EMAIL PROTECTED] Tue Feb 6 20:06:00 +0000
2007 -------
One user had 64-bit environment.
He used 32-bit OOo.
He used ldap.
Unfortunately, he had installed only 64-bit /lib64/libnss_ldap.so.2
After some time, his OOo was unable to start. It seqfaulted, see the attached
back trace and strace.
It crashed in the following code in sal/rtl/source/bootstrap.cxx
--- cut ---
if( ! *ppValue )
{
if (name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("SYSUSERCO
NFIG") ))
{
...
}
else if (name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("SYSU
SERHOME") ))
{
oslSecurity security = osl_getCurrentSecurity();
osl_getHomeDir(security, ppValue);
EnsureNoFinalSlash(ppValue);
osl_freeSecurityHandle(security);
further_macro_expansion = false;
}
--- cut ---
Why?
1. 'ppValue' must have been NULL to reach the code below.
2. osl_getCurrentSecurity() returned NULL because the 32-bit libnss_ldap.so.2
was not installed and the user was not mentioned in /etc/password
3. osl_getHomeDir(security, ppValue) left the 'ppValue' unchanged because
'security == NULL'.
4. EnsureNoFinalSlash(ppValue) tried to access ppValue without any check. It was
NULL => SIGSEGV
Well, I am not sure if there is any reasonable solution for this situation.
It is low a level bug (one library/module is missing). Maybe, an assert would be
the best solution, for example:
--- cut ---
oslSecurity security = osl_getCurrentSecurity();
// password file entry cannot be read only in very strange situations,
for example see i#XXXX <--- number of this issue ;-)
OSL_ASSERT(security);
osl_getHomeDir(security, ppValue);
EnsureNoFinalSlash(ppValue);
...
--- cut ---
It was relatively easy to solve the problem after searching strace.
I think that it would be more complicated if we tried to ignore this problem or
if we tried to print any general user friendly message.
Or we can ignore this problem at all. It is not typical that
osl_getCurrentSecurity fails that the rest of the user desktop is still usable.
I happened this time only because of the strage combination of 64-bit
environment and 32-bit OOo.
What do you think?
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]