09-17-2003
Core File Not Being Generated in AIX
I have created an executable using my login session in an AIX Version 5 Unix system. After to which I have change the file mode to set uid and rwsrwx--x and ownership to root:system by using the following Standard C Library functions.
chmod (name, S_ISUID|S_IRWXU|S_IRWXG|S_IXOTH|S_IROTH)
chown (name, 0, 1)
where name is the name of the executable whose permissions needs to be changed. When I execute my executable using my login session, the executable gives a segmentation fault but the core file is not being generated. When I saw the man page of core in the system it said that "A process with a saved user ID that differs from the real user ID does not produce a memory image. The same holds true for the group ID (GID) and effective
group ID" .
Is it possible that we can generate a core file through some technique which would aid me in tracing the cause of the segmentation fault.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all,
I've got a strange problem here that is not documented in AIX FAQs and tech docs, and I was wondering if somebody out there encountered the same issue or had an idea to help me out.
I'm using a script to create users with the "mkuser" command. I can set up any options I want (like... (1 Reply)
Discussion started by: dfrangidis
1 Replies
2. AIX
Whenever i send a mail like: mail <mail id>, a core file is created under /var/spool/mqueue/ path. This is increasing the space of the file system. Why is that core file get created. Does it happens normally. I am getting an errpt error as:
LABEL: CORE_DUMP
IDENTIFIER: B6048838
... (0 Replies)
Discussion started by: sreereddy
0 Replies
3. AIX
Please tell me some methods to analyse core dump in AIX.:) (2 Replies)
Discussion started by: Mythili
2 Replies
4. Programming
My program is not dumping core when hitting a segmentation violation inside a thread.
However, it dumps core when the segv occurs within main.
Any ideas on how to diagnose this?
AIX 5.3 (4 Replies)
Discussion started by: bean66
4 Replies
5. AIX
is there command which will display no of core per cpu in aix?
Regads,
Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies
6. Solaris
Hi,
We have an application ASPA . The application related processes are running in /ASPA/bin directory . now whenever a process terminates abruptly , a core file should be generated (correct me if i am wrong) in the
/ASPA/bin directory . But i am not able to see any such files . The... (4 Replies)
Discussion started by: asalman.qazi
4 Replies
7. Linux
Some strange behavior.
Process is receiving Segmentation Fault. But no core files getting generated.
I have checked ulimit.
coredumpsize = unlimited.
In console, process is printing Segmentation Fault even through gdb also same behavior But No corefile.
Any possible reason ?
... (3 Replies)
Discussion started by: ashokd001
3 Replies
8. AIX
Hi All ,
I am trying to pull out below things from AIX machine (any type)
1. number of physical processor
2. number of logical processsors
3. Total number of processors (physical plus logical)
4. total number of cores
5. list of installed applications with versions and vendor name
... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies
9. Programming
Hello,
Suppose there are large number of binaries are executing on a system. Meanwhile, we find a dump, now how can we know from core dump that which binary file it is related to?
Thanks
---------- Post updated at 02:01 PM ---------- Previous update was at 01:53 PM ----------
I have got... (1 Reply)
Discussion started by: ezee
1 Replies
10. AIX
I desperately need help converting ascii data file generated on AIX platform that contains dollar sign ($) at the end of each line in the data file as shown below.
ME570^0128237^HG278999^20140805:21:00:00^BEENZ001^$
This is the AWK command for adding CR to the new line.
awk... (1 Reply)
Discussion started by: cumeh1624
1 Replies
LEARN ABOUT OPENSOLARIS
seteuid
setuid(2) System Calls setuid(2)
NAME
setuid, setegid, seteuid, setgid - set user and group IDs
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
int setuid(uid_t uid);
int setgid(gid_t gid);
int seteuid(uid_t euid);
int setegid(gid_t egid);
DESCRIPTION
The setuid() function sets the real user ID, effective user ID, and saved user ID of the calling process. The setgid() function sets the
real group ID, effective group ID, and saved group ID of the calling process. The setegid() and seteuid() functions set the effective group
and user IDs respectively for the calling process. See Intro(2) for more information on real, effective, and saved user and group IDs.
At login time, the real user ID, effective user ID, and saved user ID of the login process are set to the login ID of the user responsible
for the creation of the process. The same is true for the real, effective, and saved group IDs; they are set to the group ID of the user
responsible for the creation of the process.
When a process calls one of the exec(2) family of functions to execute a file (program), the user and/or group identifiers associated with
the process can change. If the file executed is a set-user-ID file, the effective and saved user IDs of the process are set to the owner of
the file executed. If the file executed is a set-group-ID file, the effective and saved group IDs of the process are set to the group of
the file executed. If the file executed is not a set-user-ID or set-group-ID file, the effective user ID, saved user ID, effective group
ID, and saved group ID are not changed.
If the {PRIV_PROC_SETID} privilege is asserted in the effective set of the process calling setuid(), the real, effective, and saved user
IDs are set to the uid argument. If the uid argument is 0 and none of the saved, effective or real UID is 0, additional restrictions
apply. See privileges(5).
If the {PRIV_PROC_SETID} privilege is not asserted in the effective set, but uid is either the real user ID or the saved user ID of the
calling process, the effective user ID is set to uid.
If the {PRIV_PROC_SETID} privilege is asserted in the effective set of the process calling setgid(), the real, effective, and saved group
IDs are set to the gid argument.
If the {PRIV_PROC_SETID} privilege is not asserted in the effective set, but gid is either the real group ID or the saved group ID of the
calling process, the effective group ID is set to gid.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The setuid() and setgid() functions will fail if:
EINVAL The value of uid or gid is out of range.
EPERM For setuid() and seteuid(), the {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling process and the
uid argument does not match either the real or saved user IDs, or an attempt is made to change to UID 0 and none of the existing
UIDs is 0, in which case additional privileges are required.
For setgid() and setegid(), the {PRIV_PROC_SETID} privilege is not asserted in the effective set and the gid argument does not
match either the real or saved group IDs.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
Intro(2), exec(2), getgroups(2), getuid(2), stat.h(3HEAD), attributes(5), privileges(5), standards(5)
SunOS 5.11 20 Jan 2003 setuid(2)