RFR: 8074812 More specific error message when the .java_pid well-known file is not secure
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Tue Mar 10 17:53:45 UTC 2015
On 10.3.2015 18:45, Staffan Larsen wrote:
> Hi Martin,
>
>> On 10 mar 2015, at 18:40, Martin Buchholz <martinrb at google.com
>> <mailto:martinrb at google.com>> wrote:
>>
>> It's traditional (at least on Unix) to put the message after a ": "
>> not within parens.
>> http://pubs.opengroup.org/onlinepubs/009695399/functions/perror.html
>
> Good point. I’ll change it to “: “.
>
>> 374 if (sb.st_uid != uid) {
>> 375 msg = "file is not owned by the current user";
>> 376 } else if (sb.st_gid != gid) {
>> 377 msg = "file's group is not the effective group";
>>
>> Why do you use the word "effective" with the gid, but not the uid?
>
> No reason. How do you think I should word it? I’ve been struggling…
IDK, 'effective group' sounds quite reasonable
(http://en.wikipedia.org/wiki/Group_identifier)
This just got me thinking - would including [sb.st_uid, uid] and
[sb.st_gid, gid] in the error message be of any additional benefit?
-JB-
>
> /Staffan
>
>>
>>
>> On Tue, Mar 10, 2015 at 3:21 AM, Staffan Larsen
>> <staffan.larsen at oracle.com <mailto:staffan.larsen at oracle.com>> wrote:
>>
>> During attach, if the .java_pid file is not secure we currently
>> say "well-known file is not secure". This can be enhanced to say
>> _why_ the file is not considered secure.
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8074812
>> webrev: http://cr.openjdk.java.net/~sla/8074812/webrev.00/
>>
>> Note that it is safe to call JNU_ReleaseStringPlatformChars after
>> the calls to JNU_ThrowIOException since the latter don’t actually
>> change the control flow.
>>
>> Thanks,
>> /Staffan
>>
>>
>
More information about the serviceability-dev
mailing list