Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial
Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under
vendor's standard commercial license.
The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express
warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall
not be liable for technical or editorial errors or omissions contained herein.
Acknowledgements
Microsoft®, Windows XP®, Windows Vista® and Windows 7® are U.S. registered trademarks of Microsoft Corporation.
UNIX® is a registered trademark of The Open Group.
Linux® is a U.S. registered trademark of Linus Torvalds.
Eclipse®® is a trademark of Eclipse Foundation Inc.
Debugging utilities in hpux (for ex: tusc, gdb etc) fails to debug a process which has Fine Grained
Privileges unless; the debugging utility process has the same or higher set of privileges. A process
cannot inherit the privileges of other process at run time. The privileges need to be set for binary
before it is executed. HP-UX has different methods of elevating the privileges which are discussed
in solution section.
4Overview
Page 5
2 Problem statement
Debugging—especially Privileged Process Debugging—has always been important in the customer
environment. If the debugging process is having lesser privileges than the process on which it is
executing, user will encounter the permission denied error message.
5
Page 6
3 Solution
User can set the privileges of debugger binary either manually using setfilexsec command or create
a new debug role in RBAC (Role Based Access Control) roles database with
hpux.security.access.privrun.* authorizations.
This document provides the details on how to provide the required privileges for debugging
processes using RBAC.
What is RBAC?
RBAC (Role-Based Access Control) is an alternative to the all-or-nothing security model of traditional
root user-based systems. With RBAC, an administrator can assign roles to non-root users or UNIX
groups. Each role has authorizations composed of an operation and object, where the operation
is an action that can be performed on an object, and the object is an object the user can access
with a given operation. HP-UX RBAC database files are available in /etc/rbac directory.
For more information on RBAC, we request user to refer the link mentioned below.
The HP-UX FGP (fine-grained privilege) model splits the powers of root users into a set of privileges.
Each privilege grants a process that possesses that privilege the right to a certain set of restricted
services provided by the kernel. Privileges can be managed internally by a process with "privilege
bracketing". Privilege bracketing is the practice of enabling, or "raising", a privilege only while
the privilege is needed, then disabling, or "lowering", the privilege. The privileges that a process
has raised determine which sensitive system call services the process can invoke.
For more information, we request user to refer the privileges man pages
privileges(5) Overview of HP-UX privileges.
privileges(3) Describes fine-grained privileges interfaces.
Problem with debugging a process with elevated privileges
From the Fine Grained Privileges perspective, a process will not be able to adopt the privileges of
already running process. Process should have either same or higher set of privileges to attach to
other process. Without the required privileges debugging process will terminate with permission
denied error.
For example, let us take debugger tool tusc which uses ttrace for listing the system calls on the
running process.
If customer is having more than one application and each one has different privileges, in that case
user need to combine all the privileges using comma separated list and add into cmd_priv database
against tusc.
9
Page 10
5 Summary
Debugging tools should have sufficient privileges to debug the processes whose privileges are
elevated. We can temporarily elevate and drop privileges of debugging tools using RBAC.
For More information,http://h21007.www2.hp.com/portal/download/files/unprot/hpux/