- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sending signals to process running as another ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 06:51 AM
тАО08-23-2006 06:51 AM
Let's assume that joe is running process1 and bob is running process2. If process1 needs to send a signal to process2, it will not work since they are not the same user.
I can't wrap the binaries under sudo or rbac because in reality it is more complex than this example, with many processes being forked directly from a spawner.
The only thing that I'm thinking of is changing the ownership of the process1 and process2 binaries to a dummy user, and putting a setuid on it. In theory, everytime they are started their effective uid should be dummy and they'll be able to signal each other.
Are there any other possibilities?
Points will be awarded, TIA.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 06:59 AM
тАО08-23-2006 06:59 AM
Re: Sending signals to process running as another user
Dangerous on the security front, but could work and make you fail a SOX or security audit.
Give the script that does this suid root powers.
Only root can kill processes other than itself.
Any solution to this requires root priviledges.
Or decide not to do it.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 06:59 AM
тАО08-23-2006 06:59 AM
Re: Sending signals to process running as another user
Dangerous on the security front, but could work and make you fail a SOX or security audit.
Give the script that does this suid root powers.
Only root can kill processes other than own.
Any solution to this requires root priviledges.
Or decide not to do it.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:03 AM
тАО08-23-2006 07:03 AM
Re: Sending signals to process running as another user
Your setuid wrapper idea will provide a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:06 AM
тАО08-23-2006 07:06 AM
Re: Sending signals to process running as another user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:16 AM
тАО08-23-2006 07:16 AM
SolutionA few possible thoughts:
The are "group" permissions for execute on the binary, can signals be sent from the same group? If you already know the answer to this one (I don't) you could try that.
A few more possible methods:
A) have a file out there somewhere with a group policy on it wherein a command could be written to it by a group member. You have a process that wakes up every so often and looks at the file contents and if there is a "command" to signal a process, it does so, and then removes the "command" from the file, or marks it as completed (better).
I've done the above for a few processes in the past and this works well if you don't need an immediate response, and it's OK if it takes 3 minutes or so to act on the "command" signal put in the file. The gotcha is careful maintenance of permissions on the "command" file.
B) If this application is hooked to a database, then create a table, and give the users access to it that need it. They can write a record in the file to ask for a signal to be sent to a process. Your program once it sees the "command" can act on it. This is basically the same as the A) option, but just from a database standpoint.
If the above named database is an Oracle database, I'd create a pipe and have a custom program read the pipe for work to be done. This eliminates the whole issue of timing and looping (and therefore waiting). As soon as a request is made to the pipe (via procedure created with AUTHID privelages to the pipe itself), you'd act on it with your pipe processing code.
There is also the possibility of job queueing for Oracle (which is newer) to do the same idea as above (but I'm just getting old apparently).
Keep in mind that the idea of pipes and queues for managing this are probably available in some form for whichever database you may be using already.
If you don't have a database available with pipes or queues, you usually do this with a database sequencer (counter). Create a custom sequencer with a counter which increments by one every time it is read. If a group user needs to signal your program (that the dummy owns) he would just select from the sequencer, your own program could just look at the sequencers.nextval and if it is odd, then send a signal, then read from the sequencer , which would reset the sequencer back to even. Careful control over who can read from the sequencer would be the key to that system.
HTH with some ideas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:32 AM
тАО08-23-2006 07:32 AM
Re: Sending signals to process running as another user
Guess I'll have to go with a setuid bit, which is ok with me as long as it's not owned by root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:38 AM
тАО08-23-2006 07:38 AM
Re: Sending signals to process running as another user
There is also the approach of setting up sockets and using select(). This approach would have the added benefit of working over multiple boxes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:53 AM
тАО08-23-2006 07:53 AM
Re: Sending signals to process running as another user
I think the shared memory approach is better, or IPC if the application is still not written yet.
It gives you the advnatages and disadvantages of using a commonly used technology for communicating within users.
The upside is commonality.
The downside is resource competition with oracle, SAG, apache and many other vendor applications.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:56 AM
тАО08-23-2006 07:56 AM
Re: Sending signals to process running as another user
Thanks for all the replies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 07:57 AM
тАО08-23-2006 07:57 AM
Re: Sending signals to process running as another user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 08:03 AM
тАО08-23-2006 08:03 AM
Re: Sending signals to process running as another user
"When you have a hammer, everything looks like a nail".