07-30-2008
system() fails
Hi,
I have the following code which fails with return value 1.
sprintf(tmp, "rm -rf %s/* 2>/dev/null\n", dest);
rc = system( tmp );
rc is 1
The files exist and the paths are correct. I can do a manual copy but the application fails. All the calls to system() function fail with the same return code. If I restart the application, this works fine.
On running truss, following is the output.
ioctl is failing with EIO error (Some Physical I/O error).
What could be the reason for this failure?
Thanks!
8287: 14.1724 vfork() = 16381
16381: 14.1724 vfork() (returning as child ...) = 8287
16381: 14.1777 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1778 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0x00020000 [0x00000000]
8287: 14.1783 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1789 execve("/bin/sh", 0xFFBFAA84, 0xFFBFDDAC) argc = 3
16381: rm -rf /usr/Dir_cp/* 2>>/usr/logs/audit080725
.
.
.
16381: 14.1881 getuid() = 110 [110]
16381: 14.1882 getuid() = 110 [110]
16381: 14.1882 getgid() = 110 [110]
16381: 14.1882 getgid() = 110 [110]
16381: 14.1884 ioctl(2, TCGETA, 0xFFBFDB8C) Err#5 EIO
16381: 14.1884 Received signal #1, SIGHUP [caught][/B]
16381: 14.1886 schedctl() = 0xFF26C000
16381: 14.1886 sigfillset(0xFF36FB20) = 0
16381: 14.1887 lwp_sigmask(SIG_SETMASK, 0x00020001, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1887 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1888 sigaction(SIGHUP, 0xFFBFD5C0, 0xFFBFD660) = 0
16381: 14.1888 kill(16381, SIGHUP) = 0
16381: 14.1889 Received signal #1, SIGHUP [default]
16381: siginfo: SIGHUP pid=16381 uid=110
8287: 14.1893 waitid(P_PID, 16381, 0xFFBFA928, WEXITED|WTRAPPED) = 0
8287: 14.1894 sigaction(SIGINT, 0xFFBFA968, 0x00000000) = 0
8287: 14.1895 sigaction(SIGQUIT, 0xFFBFA968, 0x00000000) = 0
8287: 14.1895 schedctl() = 0xFED14000
8287: 14.1896 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I can not understand why my stat() function fails all the time when function tries to go recursevly. Someone suggested that it might be poiter problem. Please, look up my code at: www.donnelly.cc.ks.us/readdir_test.c. How can i solve this problem? Any suggestion are welcome!
Thank you... (3 Replies)
Discussion started by: solvman
3 Replies
2. UNIX for Advanced & Expert Users
Hi Exprts,
There's a critical problem on one of the Workstations that the client reports every morning their system is down.
It seems there's no power failure, as in the next startup the file systems are stable ,so i checked the "messages" file , the last line which i got before failure is :... (2 Replies)
Discussion started by: nikk
2 Replies
3. AIX
# mkvg -y temp_vg hdisk5
0516-1254 mkvg: Changing the PVID in the ODM.
0516-1207 mkvg: An invalid physical volume ID been detected on hdisk5.
0516-862 mkvg: Unable to create volume group.
???
What do I do? AIX 4.3.3
I have seen something like this before but I don't remember the... (2 Replies)
Discussion started by: osee
2 Replies
4. Shell Programming and Scripting
Hello .
Would really like to know why this code fails . I need to edit both the QUESNO : and <\p> tag at the same time .
open(TEXT, "<20030211.txt") || die ("Cannot open the text files");
while (<TEXT>) {
if ($_ =~ m/QUESNO :/) {
if ($_ =~ m/<\/p>/) {
print ($_);
... (0 Replies)
Discussion started by: whatsup
0 Replies
5. UNIX for Advanced & Expert Users
Hi
When im trying to do make --version and make --help in HP-UX
it throws error
Make: Unknown flag argument -. Stop.
a soft link is present in this directory /usr/bin/make
and hard link is in /usr/ccs/bin/make
what could be the reason can any1 ..please tell me how to solve this... (1 Reply)
Discussion started by: vasanthan
1 Replies
6. UNIX for Advanced & Expert Users
Hi,
I am trying to run a shell script on solaris,some time it works fine and some times it fails unexpectedly. There is a script called "autostart.sh" which automatically starts the Application server but some times the script fails to strat the application server. can anyone tell me what... (10 Replies)
Discussion started by: tahir23
10 Replies
7. Solaris
http://i44.tinypic.com/2cmq7vn.jpg
Please help me on this issue i'm using solaris on vmware x86 even i runed fsck on root disk like 'fsck -Y /dev/rdsk/c0d0s0 ' but again after reboot it is going to maintanance mode reply soon (6 Replies)
Discussion started by: knl.sundeep
6 Replies
8. Programming
Not sure in which forum to post this. I'm trying here, in Programming.
I'm working on a PC with Intel Duo processor & 2GB of ram. OS is Ubuntu 10.04.
I'm having problems with a C++ program that makes extensive use of realloc(). It happens that as soon as the overall memory allocated(OS +... (14 Replies)
Discussion started by: mamboknave
14 Replies
9. HP-UX
Hi,
I have written a simple program of 2 lines in C to load a library using SHL_LOAD.
It fails with error "/usr/lib/hpux32/dld.so: Unable to find library 'xyz.sl'.
Load failure for library , ERRNO = 2"
Shlib_PATH,LD_LIBRARY_PATH,PATH,LD_PRELOAD are set correctly and library exists on the... (0 Replies)
Discussion started by: ashwinichavan
0 Replies
10. AIX
Hello All,
I am trying to clone an entire AIX virtual machine to a new virtual machine including all partitions and OS.Can anyone help me on the procedure to follow? I am not really sure on how it can be done.Thanks in advance.
Please use CODE tags for sample input, sample output, and for code... (4 Replies)
Discussion started by: gull05
4 Replies
LEARN ABOUT DEBIAN
audit_class
audit_class(4) File Formats audit_class(4)
NAME
audit_class - audit class definitions
SYNOPSIS
/etc/security/audit_class
DESCRIPTION
/etc/security/audit_class is a user-configurable ASCII system file that stores class definitions used in the audit system. Audit events in
audit_event(4) are mapped to one or more of the defined audit classes. audit_event can be updated in conjunction with changes to
audit_class. See audit_control(4) and audit_user(4) for information about changing the preselection of audit classes in the audit system.
Programs can use the getauclassent(3BSM) routines to access audit class information.
The fields for each class entry are separated by colons. Each class entry is a bitmap and is separated from each other by a newline.
Each entry in the audit_class file has the form:
mask:name:description
The fields are defined as follows:
mask class mask
name class name
description class description
Each class is represented as a bit in the class mask which is an unsigned integer. Thus, there are 32 different classes available. Meta-
classes can also be defined. These are supersets composed of multiple base classes, and thus will have more than 1 bit in its mask. See
EXAMPLES. Two special meta-classes are also pre-defined: all, and no.
all Represents a conjunction of all allowed classes, and is provided as a shorthand method of specifying all classes.
no Is the invalid class, and any event mapped solely to this class will not be audited. Turning auditing on to the all meta class
will not cause events mapped solely to the no class to be written to the audit trail. This class is also used to map obsolete
events which are no longer generated. Obsolete events are retained to process old audit trails files.
EXAMPLES
Example 1: Using an audit_class File
The following is an example of an audit_class file:
0x00000000:no:invalid class
0x00000001:fr:file read
0x00000002:fw:file write
0x00000004:fa:file attribute access
0x00000008:fm:file attribute modify
0x00000010:fc:file create
0x00000020:fd:file delete
0x00000040:cl:file close
0x00000100:nt:network
0x00000200:ip:ipc
0x00000400:na:non-attribute
0x00001000:lo:login or logout
0x00004000:ap:application
0x000f0000:ad:old administrative (meta-class)
0x00070000:am:administrative (meta-class)
0x00010000:ss:change system state
0x00020000:as:system-wide administration
0x00040000:ua:user administration
0x00080000:aa:audit utilization
0x00300000:pc:process (meta-class)
0x00100000:ps:process start/stop
0x00200000:pm:process modify
0x20000000:io:ioctl
0x40000000:ex:exec
0x80000000:ot:other
0xffffffff:all:all classes (meta-class)
FILES
/etc/security/audit_class
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability | See below |
+-----------------------------+-----------------------------+
The file format stability is evolving. The file content is unstable.
SEE ALSO
bsmconv(1M), au_preselect(3BSM), getauclassent(3BSM), audit_control(4), audit_event(4), audit_user(4), attributes(5)
NOTES
It is possible to deliberately turn on the no class in the kernel, in which case the audit trail will be flooded with records for the audit
event AUE_NULL.
This functionality is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information.
SunOS 5.10 6 Jan 2003 audit_class(4)