- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: normal user core dumping after calling setresu...
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
Forums
Discussions
Discussions
Discussions
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
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
02-25-2009 01:01 AM
02-25-2009 01:01 AM
normal user core dumping after calling setresuid
Can anyone please tell me how to force child process to dump core.
I'm using setresuid inside the signal handler.
Regards
-Avinash
- Tags:
- setresuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 02:16 AM
02-25-2009 02:16 AM
Re: normal user core dumping after calling setresuid
Once a process is pink, then it won't generate core even if the resuid is made to set it back to a normal user
there are some way to generate it in that case,
removing that security.- the way to do it depends of hpux revision-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 08:32 AM - edited 09-03-2011 10:15 PM
02-25-2009 08:32 AM - edited 09-03-2011 10:15 PM
Re: normal user core dumping after calling setresuid
This looks like a continuation of your other thread. It is better to continue your related questions in the same thread.
http://h30499.www3.hp.com/t5/Languages-and-Scripting/problem-with-setresuid-in-child-process-Pink-Process/td-p/4362801
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 08:43 PM
02-25-2009 08:43 PM
Re: normal user core dumping after calling setresuid
Please describe in little more details..
also how this is achieved on hp-ux different versions..
Regards
-Avinash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 01:54 AM
02-26-2009 01:54 AM
Re: normal user core dumping after calling setresuid
on 11.31 look at man coreadm
on 11.23
echo dump_all/W 1| adb -o /stand/vmunix /dev/kmem
on 11.11
echo dump_all/W 1| adb /stand/vmunix /dev/kmem
limit this to your debug session because it opens security holes on your system.
- Tags:
- coreadm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 01:56 AM
02-26-2009 01:56 AM
Re: normal user core dumping after calling setresuid
- pink process don't generate core-
11.11
echo dump_all/W 0 | adb /stand/vmunix /dev/kmem
11.23
echo dump_all/W 0 | adb -o /stand/vmunix /dev/kmem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 02:01 AM
02-26-2009 02:01 AM
Re: normal user core dumping after calling setresuid
# echo dump_all/W 1| adb -o /stand/vmunix /dev/kmem
dump_all: 0 =
adb: error: /dev/kmem: Bad file number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 02:07 AM
02-26-2009 02:07 AM
Re: normal user core dumping after calling setresuid
echo dump_all | adb -o /stand/vmunix /dev/kmem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 02:15 AM
02-26-2009 02:15 AM
Re: normal user core dumping after calling setresuid
it is
echo dump_all/W 1 | adb -o -w /stand/vmunix /dev/kmem
and to revert back
echo dump_all/W 0|adb -o -w /stand/vmunix /dev/kmem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 02:20 AM
02-26-2009 02:20 AM
Re: normal user core dumping after calling setresuid
currently my build machine is down..!!!!!
Thanks for your efforts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 02:23 AM
02-26-2009 02:23 AM
Re: normal user core dumping after calling setresuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2009 12:23 AM
02-27-2009 12:23 AM
Re: normal user core dumping after calling setresuid
But this can only be used temporarily for the debugging purpose, as it breaches the unix security...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2009 02:06 AM
02-27-2009 02:06 AM
Re: normal user core dumping after calling setresuid
promoter.c
main()
{
setreuid(0,0);
execl("/mypath/commandtopromote","commandtopromore","param1",....,0);
}
I am not sure that the commandtopromote will be pink too.
or the other way if you need promotion just temporarily:
1 simple process with promotion to perform restricted ops.
1 process as normal user which makes the main operations
and the 2 processes talk using unix domain sockets, pipes, or other
- or simply launching it if it is really occasionnally. - like grandpt() does for instance.
Else if you are happy, don't forget points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 02:24 AM
03-03-2009 02:24 AM
Re: normal user core dumping after calling setresuid
Can you please tell me how hp-ux login/shell does the same thing.
Because the normal user sometimes are given root permission(like passwd file updation), yet they dump core..!!!
Regards
-Avinash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 02:26 AM
03-03-2009 02:26 AM
Re: normal user core dumping after calling setresuid
Normal users can generate core from his login shell..
Then why not Pink Processes.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 03:43 AM
03-03-2009 03:43 AM
Re: normal user core dumping after calling setresuid
no, passwd, login generate a core dump only if they are started by root user.
so a way to do it:
main(c,v)
int c;
char**v;
{
if(getuid()!=0)
{
printf("need to recall");
setreuid(0,0);
execvp(v[0],v); /* restart the process as really root user */
}
printf ("%d\n",getuid());
kill(getpid(),10);
sleep(10);
}
it will generate a core, but all the process is executed as root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 04:08 AM
03-03-2009 04:08 AM
Re: normal user core dumping after calling setresuid
main(c,v)
int c;
char**v;
{
if(getuid()!=10)
{
printf("need to recall");
setreuid(10,10);
execvp("./r",v);
}
printf ("%d\n",getuid());
kill(getpid(),10);
sleep(10);
}
cc k.c -o k
cp k r
chmod 6555 k
chmod 555 r
./k setuid to 10 10 then exec r which is the same program but without setuid bit set.
so not pink
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 10:57 PM
03-03-2009 10:57 PM
Re: normal user core dumping after calling setresuid
when we connect to this server(daemon) using non-root id it forks a copy of itself to serve the request.
we are using setresuid in our code and inside the signal handler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2009 08:49 PM
03-04-2009 08:49 PM
Re: normal user core dumping after calling setresuid
I have some confusion over the concept of Pink process..
a process is called a pink process when it becomes a privileged user or if it executes setresuid ..??
Please clarify on this..
Regards
-Avinash
- Tags:
- pink
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2009 09:35 PM
03-04-2009 09:35 PM
Re: normal user core dumping after calling setresuid
Don explained what it (pinko) meant in your other thread.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1315932#tdIdName5
(This is why you shouldn't have created another related thread.)