System call module questions.
Hello,
I am trying to create a system call module for solaris 2.6 (sparc).
I am trying to avoid useing the /etc/name_to_sysnum file because I dont want my system calls to be dependant on a userland file. What I have done is this.
static struct modlmisc modlmisc = {
&mod_miscops,
"Einstien system call driver"
static struct modlinkage modlinkage = {
MODREV_1,
&modlmisc,
NULL
int
_init(void)
int error;
if ((error = mod_install(&modlinkage)) < 0)
return error;
sysent[SYS_secctl].sy_narg = 6;
sysent[SYS_secctl].sy_callc = (longlong_t (*)()) test;
sysent[SYS_secctl].sy_flags = SE_LOADED | SE_NOUNLOAD | SE_ARGC;
return 0;
And this works, the only side effect is that my system calls do not have return values. Is there something else that I need to do (without makeing a specfic system call driver that depends on /etc/name_to_sysnum) to have correct return values ?
See the Runtime class.
http://java.sun.com/j2se/1.5.0/docs/api/index.html
Also see the "gotchas" of using that class.
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Similar Messages
-
Unity Connection 9.1 - System Call Handler Question
Hi,
I would like to use Unity Conncetion 9.1 to transfer calls to different extensions depending on the time of day:
For example; between 07.00 and 19.00, do not play a greeting and transfer to an extension (no mailbox), outside of the times above, again do not play a greeting and transfer to a different extension.
I have configured a CTI RP and set the extension to forward all to VM. The system call handler has an active schedule of 07.00-19.00 and has a standard transfer rule set up to transfer the calls to the relevant extension. I have also configured a closed transfer rule to transfer the call to the alternative extension after 19.00. The issue I have is that when dial the original extension I get the standard greeting. How do i get Unity to transfer the call without playing the greeting?
Thanks,
PhilHi Phil,
You need to:
1) enable the closed greeting
2) set the standard and closed greetings to "callers hear nothing"
3) in the standard and closed greetings, after the greeting, set it to call handler, select the same call handler, and set it to attempt transfer.
4) make sure the standard and closed transfer rules are enabled, set the respective extensions to transfer to, set them to release to switch, and uncheck "Play the 'Wait While I Transfer Your Call' Prompt" for both of them. -
How can I use system call in kernel loadable module?
Hi,
I want to use system call (shmat, mmap,...) in kernel module.
When kernel module is loaded, it cause system error (undefined symbol name 'shmat', 'mmap').
How can I use system call in kernel module ?
Thanks in advance.
david jooYou cannot use system calls in the kernel modules.
Read 'Writing Device Drivers' answerbook - it lists the set of interfaces (known as DDI/DDK) that are supposed to be used instead.
Hope this helps...
--I. -
Quick question about making system calls
hello all
i have a simple quick question regarding making system calls. Basically I want to mimic the command "system" for perl. I am not quite sure how to do this for java.
any feedback would be appreciated.look at:
java.lang.RunTime -
How to use system call in assembler
I write codes to display the dictionary using C,
and it can run well,and then I want to use system call
in assembler to realize the same function ,but it doesn't
display the dictionary,how to correct it?
Look:
//C
#include <stdio.h>
int main()
char *name[2];
name[0]="/bin/ls";
name[1]=NULL;
execve(name[0],name,NULL);
return 0;
//Assembler
.data
msg:.string "/bin/ls"
.text
.global _start
_start:
movl $0xb,%eax
movl $msg,%ebx
mov $msg,%ecx
movl $0,%edx
int $0x80
movl $1,%eax
movl $0,%ebx
int $0x80If you compile with -Wwrite-strings, as I like to do for new code, you'll notice it warns about assigning the address of read-only memory to a plain char *. You might want to declare name as follows to avoid accidentally trying to modify it:
char const *name[2];
But as for your question. The execve system call requires a pointer to a list (array) of pointers to strings in %ecx. You are passing it a pointer to a single string, which means it will try to interpret the string ("/bin/ls")as a series of pointers to strings, with potentially disastrous (and certainly weird) results.
Last edited by Trent (2012-12-28 15:31:38) -
Solaris 10: intercepting system calls
Hello,
I have a problem: I don't manage to intercept system calls (as described in this document http://packetstormsecurity.org/groups/thc/slkm-1.0.html). Is it because solaris 10 doesn't use the syscall table ?
Another problem that I have is that I don't manage to perform a simple printf() on the screen when I use a load my kernel module. Has someone got an explanation ?
In fact I need to intercept some syscall like SYS_open, SYS_read, ... to perform custom actions. Do you have another way to do this ?
Thanks in advance for you help.BTW, I'm running 64-bit Solaris as a VirtualBox (3.0.10) guest VM on a 32-bit WinXP host.
-
Hi experts,
When I install additonal dialog instance , the system issue the error:
INFO 2014-12-23 16:34:04.436 [syuxcfile.cpp:218]
CSyFileImpl::removeEx(ISyFSErrorHandler * pErrorHandler)
lib=syslib module=syslib
Removed file /sapmnt/HE5/exe/jdbcconnect.jar.
ERROR 2014-12-23 16:34:04.466 [syuxcfile.cpp:292]
CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
lib=syslib module=syslib
FSL-00009 System call failed. Error 13 (The file access permissions do not allow the specified action.) in execution of system call 'openU' with parameter (/usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR, O_RDONLY), line (291) in file (syuxcfile.cpp), stack trace: EJSController.cpp: 183: EJSControllerImpl::executeScript()
JSExtension.hpp: 1072: CallFunctionBase::call()
iaxxbfile.cpp: 493: CIaOsFile::copyFromPath_impl()
syuxcfile.cpp: 255: CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
WARNING 2014-12-23 16:34:04.488 [syuxcpath.cpp:663]
CSyPath::getOSNodeType(bool false) lib=syslib module=syslib
System call failed. Error 13 (The file access permissions do not allow the specified action.) in execution of system call 'lstat' with parameter (/usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR), line (660) in file (syuxcpath.cpp), stack trace: EJSController.cpp: 183: EJSControllerImpl::executeScript()
JSExtension.hpp: 1072: CallFunctionBase::call()
iaxxbfile.cpp: 493: CIaOsFile::copyFromPath_impl()
syuxcfile.cpp: 255: CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
syuxcpath.cpp: 604: CSyPath::getOSNodeType(bool false)
ERROR 2014-12-23 16:34:04.489 [syuxcfile.cpp:308]
CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
lib=syslib module=syslib
FSL-02015 Node /usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR does not exist.
ERROR 2014-12-23 16:34:04.506
CJSlibModule::writeError_impl()
MUT-03025 Caught ::ESyException in module call: At line 311 file syuxcfile.cpp
Call stack:
EJSController.cpp: 183: EJSControllerImpl::executeScript()
JSExtension.hpp: 1072: CallFunctionBase::call()
iaxxbfile.cpp: 493: CIaOsFile::copyFromPath_impl()
syuxcfile.cpp: 255: CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
System call failed. Error 13 (The file access permissions do not allow the specified action.) in execution of system call 'openU' with parameter (/usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR, O_RDONLY), line (291) in file (syuxcfile.cpp), stack trace: EJSController.cpp: 183: EJSControllerImpl::executeScript()
JSExtension.hpp: 1072: CallFunctionBase::call()
iaxxbfile.cpp: 493: CIaOsFile::copyFromPath_impl()
syuxcfile.cpp: 255: CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
Node /usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR does not exist.
INFO 2014-12-23 16:34:05.31 [syuxccuren.cpp:285]
CSyCurrentProcessEnvironmentImpl::setEffectiveGroup(PSyGroupInt)
lib=syslib module=syslib
Effective group id set to 204.
ERROR 2014-12-23 16:34:06.281 [CSiStepExecute.cpp:1158]
FCO-00011 The step copyScripts with step key |NW_DI|ind|ind|ind|ind|0|0|NW_Unpack2|ind|ind|ind|ind|unpack|0|copyScripts was executed with status ERROR ( Last error reported by the step: System call failed. Error 13 (The file access permissions do not allow the specified action.) in execution of system call 'openU' with parameter (/usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR, O_RDONLY), line (291) in file (syuxcfile.cpp), stack trace: EJSController.cpp: 183: EJSControllerImpl::executeScript()
JSExtension.hpp: 1072: CallFunctionBase::call()
iaxxbfile.cpp: 493: CIaOsFile::copyFromPath_impl()
syuxcfile.cpp: 255: CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
INFO 2014-12-23 16:34:06.962 [syuxcpath.cpp:447]
CSyPath::createFile() lib=syslib module=syslib
Creating file /tmp/sapinst_instdir/BS2005/ERP60SR3/AS-ABAP/ORA/HA/DI/__instana_tmp.xml.
INFO 2014-12-23 16:34:13.663 [syuxcpath.cpp:447]
CSyPath::createFile() lib=syslib module=syslib
Creating file /tmp/sapinst_instdir/BS2005/ERP60SR3/AS-ABAP/ORA/HA/DI/instslana.xml.
Can any expert help me ? Thanks a lot.>>ERROR 2014-12-23 16:34:04.466 [syuxcfile.cpp:292]
CSyFileImpl::copy(const CSyPath & /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar, ISyNode::CopyMoveMode_t 0x3, ISyProgressObserver*) const
lib=syslib module=syslib
FSL-00009 System call failed. Error 13 (The file access permissions do not allow the specified action.) in execution of system call 'openU' with parameter (/usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR, O_RDONLY), line (291) in file (syuxcfile.cpp), stack trace: EJSController.cpp: 183: EJSControllerImpl::executeScript()
JSExtension.hpp: 1072: CallFunctionBase::call()<<
Based on the log it is more likely an issue related to the file permissions. have you tried giving full permissions to the files?
Check these files:
ls -la /usr/sap/HE5/SYS/exe/run/jdbcconnect.jar
ls -la /usr/sap/trans/tmp/AIXinst/swpm/COMMON/INSTALL/JDBCCONNECT.JAR
If possible relax the file permissions (if required) and retry the step in sapinst.
Cheers
RB -
Call Module pool program in report
Dear guys,
i have Module pool program ZSDMODPOOL,which is transaction ZSDORD(ADDON SCREEN),Which creates sales order and shipment.
Now i want, one new screen to display before this ZSDORD Screen. In new screen i will have Table control having Internal table displaying in it.
Now, My requirement is how to pass this New screen internal table datas into Module pool program.
or i can put question as how to call module pool program
from other report program or screen.
Pls give me ideas.
ambichanYou can call the transaction using CALL TRANSACTION, or you can setup a DIALOG and call it using CALL DIALOG. Using CALL DIALOG you will be able to pass values. You create a DIALOG via transation SE35.
Regards,
Rich Heilman -
System Call by Java Application - [change path and run of the other progra]
public class A {
public static void main (String[] args)
System.out.println("Hi");
}I do have above A.java.
I am generating A.class from it.
A.class is in the following directory :
/home/sachin/work/Sample_Directory/bin/hello_filetest/
I have another program which makes System call.
But the problem is B.java is in the different directory :
/home/sachin/work/Sample_Directory/src/hello_filetest/
public class B {
public static void main (String[] args) {
Process p1 = Runtime.getRuntime().exec("java A);
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(p1.getInputStream()));
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
{code}
So, my question is how to change directory by system calls and execute the program
which is lying in other directory ????
Thank you.The following code will call javac on a .java file, which will compile it into a .class file
public static void javacTest() {
JFileChooser jf = new JFileChooser();
if (jf.showOpenDialog(null) != jf.APPROVE_OPTION) return;
File file = jf.getSelectedFile();
File dir = file.getParentFile();
try {
Process p = Runtime.getRuntime().exec("javac " + file.getName(), null, dir);
IOUtils.pipe(p.getInputStream(), System.out);
IOUtils.pipe(p.getErrorStream(), System.out);
catch (IOException iox) {
iox.printStackTrace();
}Is that what you're trying to do, or are you trying to run the compiled (.class) file? Running your .class file should be basically the same as the above, assuming that you are not using any non j2se libraries, except that you need to take into account the package (if package is x.y, you must have file in ...src\x\y\foo.class - call "java x.y.foo" from src) -
"The data area passed to a system call is too small" NFS client Windows 2008 R2 SP1
Hi
I need to map a Hyper-V virtual windows server to a UNIX folder, but when i made de mapping and tried to navigate in to the mapped unit and shows me:
"The data area passed to a system call is too small"
I tried too many things like adding a registry key (and windows 2008 r2 already has)
Use a similar account between Unix and Windows domain
I done the steps in the document:
http://technet.microsoft.com/en-us/library/cc753302(WS.10).aspx
And nothing, this is just frustrating, also I disabled the firewall in the virtual machine and the host server.
I have a Windows 2008 Domain R2 functionality and the virtual machine is Windows 2008 R2 too.
The version of unix are:
AIX6.1 x64
AIX 6.3 x64
AIX 5.1 x86
Any Idea?
Thanks!
Doc MXHi,
You may perform the following troubleshooting suggestions:
l
Change how your NFS servers export the NFS shares and make them allow connections from high ports.
l
Add UseReservedPorts DWORD value under HKLM\Software\Microsoft\Client for NFS\CurrentVersion\Default and set it to 1. Restart the Client for NFS service to allow
the change to take effect.
For more information, please refer to the following Microsoft MSDN blog:
"Network Error 53", "The data area passed to a system call is too small" or "Unknown Error"
http://blogs.msdn.com/b/sfu/archive/2011/07/14/3087987.aspx
Regards,
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
hi guys,
i found in the interface IF_HTTP_ENTITY
the method SET_HEADER_FIELD has the codes like below
<i>system-call ict
did
ihttp_scid_add_header_field " add instead of set!!!
parameters
m_c_msg " > c handle
name " > header field name
value " > header field value
m_last_error. " < return code</i>
i have look at the help of the system-call ,but i cant find the same help about the ICT and did
my question is can somebody give some explanation about
<i>system-call ict
did
parameter</i>
thank youhi
i just only new in BSP application,my question is why after the "system-call" we can use the parameter "did" and "ict".
i have just refer to the help document of the "system-call" but i can't find the information about the code
<i>system-call ict
did
ihttp_scid_add_header_field " add instead of set!!!
parameters
m_c_msg " > c handle
name " > header field name
value " > header field value
m_last_error. " < return code
</i>
so can you give me some explanation about this ?
i wont do something to change them.
thank you -
Hello,
I'd like to update system call CAL_CONVERT_DATE_TO_FDATE or programm new version by myself in case there is no update.
What I want in fact is recognize that certain day is a work day. This could be done by function module DATE_CONVERT_TO_FACTORYDATE which lead to mentioned system call.
This function module doesn't return our new holidays (for factory calendar 'CZ').
Where can I obtain some update? Or, how to program new version?
Concerning programming new version, I read help and found there notice about file sapactab.h, where should be system call noted. I can't find this file in filesystem and either source files and also don't know how to link compiled source files to SAP kernel.
Can anybody help me?
Best regards,
Josef MotlHi Josef,
In our system we have defined several custom calendars 'Z1' - 'Z6', all with their own definitions on holidays. The function module you mentioned works fine even for the custom defined calendars.
So are you sure the calendar CZ has been defined correctly?
Regards,
John. -
1) how can i make a system call question in Java.
2) I have to determine the size of a dir by using du...
the first topic is the important stuff but i wouldn't mind some help on the second either ...1) how can i make a system call question in Java. A "system call question", you say? If you mean how can you execute an external process: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html
>
2) I have to determine the size of a dir by using
du...Using "du..."?
http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html -
-4006 -The data area passed to a system call is too small.
Hi ,everybody.
I would like to add data into SQL Server with VB.net 2005 and i am using object SAPbobsCOM.Payments with BoObjectTypes.oIncomingPayments when i build program and execute then i got error like this "-4006 -The data area passed to a system call is too small." and my code is .....
Private Sub cmdPayment_Click()
On Error GoTo ErrorHandler
Dim vCompany As SAPbobsCOM.Company
'create company object
vCompany = New SAPbobsCOM.Company
'set paras for connection
vCompany.CompanyDB = "TototaData"
vCompany.Password = "acct4"
vCompany.UserName = "acct4"
vCompany.Server = "(local)"
vCompany.DbUserName = "sa"
vCompany.DbPassword = "sa"
'connect to database server
If (0 <> vCompany.Connect()) Then
MsgBox("Failed to connect")
Exit Sub
End If
Dim nErr As Long
Dim errMsg As String
'Set the object's properties
Dim vPay As SAPbobsCOM.Payments
vPay = vCompany.GetBusinessObject(BoObjectTypes.oIncomingPayments)
vPay.Address = "622-7"
vPay.ApplyVAT = 1
vPay.CardCode = "F027-HO"
vPay.CardName = "TMT(GATEWAY)-HO"""
vPay.CashAccount = "288000"
vPay.CashSum = 0 '5620.85
vPay.CheckAccount = "280001"
vPay.ContactPersonCode = 2
vPay.DocCurrency = "Eur"
vPay.DocDate = Now
vPay.DocRate = 0
vPay.DocTypte = 0
vPay.HandWritten = 0
vPay.JournalRemarks = "Incoming - D10004"
vPay.LocalCurrency = 0
'vPay.Printed = 0
vPay.Reference1 = 14
vPay.Series = 0
'vPay.SplitTransaction = 0
vPay.TaxDate = Now
vPay.TransferAccount = "10100"
vPay.TransferDate = Now
vPay.TransferSum = 0 '
vPay.Invoices.AppliedFC = 0
'vPay.Invoices.AppliedSys = ""
'start
'vPay.Invoices.Count = 1
vPay.Invoices.DiscountPercent = 20
vPay.Invoices.InstallmentId = 0
'vPay.Invoices.LinkDate = CDate("31/12/2002")
'vPay.Invoices.PaidSum = "d"
'vPay.Invoices.UserFields = "ddd"
'end
vPay.Invoices.DocEntry = 1
vPay.Invoices.DocLine = 0
'vPay.Invoices.DocRate = 0
vPay.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice
'vPay.Invoices.LineNum = 0
vPay.Invoices.SumApplied = 5031.2
vPay.Checks.AccounttNum = "384838"
vPay.Checks.BankCode = "CB"
vPay.Checks.Branch = "Branch"
vPay.Checks.CheckNumber = 3838383
vPay.Checks.CheckSum = 4031.2
'vPay.Checks.Currency = "Eur"
vPay.Checks.Details = "test1"
vPay.Checks.DueDate = CDate("31/12/2002")
' vPay.Checks.LineNum = 0
vPay.Checks.Trnsfrable = 0
Call vPay.Checks.Add()
Call vPay.Checks.SetCurrentLine(1)
vPay.Checks.AccounttNum = "384838"
vPay.Checks.BankCode = "CB"
vPay.Checks.Branch = "Branch"
vPay.Checks.CheckNumber = "3838383"
vPay.Checks.CheckSum = 1000
'vPay.Checks..Currency = "EUR"
vPay.Checks.Details = "test2"
vPay.Checks.DueDate = Now
'vPay.Checks.LineNum = 1
vPay.Checks.Trnsfrable = 0
If (vPay.Add() <> 0) Then
MsgBox("Failed to add a payment")
End If
'check for errors
Call vCompany.GetLastError(nErr, errMsg)
If (0 <> nErr) Then
MsgBox("Found error:" + Str(nErr) + "," + errMsg)
Else
MsgBox("Succeed in payment.add")
End If
'disconnect the company object, and release resource
Call vCompany.Disconnect()
vCompany = Nothing
Exit Sub
ErrorHandler:
MsgBox("Exception:" + Err.Description)
End Sub
It seem when i add record by use other object such as JournalEntries.It work!!!!!
i need all of your suggestion.Anyone who have been found this error before can help me.
Thank you so much
Nuttaphon(Thailand)Hi
Your question is not clear.. Are you talking about crystal reports results area ? If it is not related to crystal, please mention the tool.
Thanks,
Sastry -
"The data area passed to a system call is too small." Windows 8
I am not a developer - thus many comments do not make sense to me, as I'm just a heavy user. Today, about a year and half after beginning to use Windows 8, hyperlinks in my emails return the error "The data area passed to a system call is too small."
Can you give a layperson (i.e. simple - is it fixable and can I fix it?) answer to this error? If I copy and paste the URL into my IE 10 browser, it works. However, this takes more time than I usually can afford given how often I use email links to continue
my work.
Here's a picture of the error message:
OOPS, just got big RED message: Body text cannot contain images or links until we are able to verify your account.
I seem to have one (logged in automatically as sunwalkermsdn).
Thanks for any help to this newly appearing issue.
(will I get an email if you post an answer? - due to same message above, I cannot enter my email address)This is a developer forum. We cannot help you to fix a web site, unless you own the web site in question and you can release a fix by yourself if you just need some advise on web development.
Contact the web site's owner if you don't own the web site in question.
Visual C++ MVP
Maybe you are looking for
-
I need to access columns defined in an Oracle 9i database as VARRAY in forms 9i. How do I go about this? Any help would be appreciated as the help was no help. Thanks in advance, Joe
-
Single Payment Receipts against multipule customer invoices
Hi All, I need your help to slove this business senario, here i have one payment receipts i need to clear against multiple customer invoice, how to clear the single payment receipt for multiple customer invocies, But customer will not infore which in
-
I can attache up to 50 pictures on hotmail.com,but I cannot attach even 5 of the same size pictures with my verizon Fios email.When I attach two,the third one sometimes take long or never attaches.I have to close without saving and start all over aga
-
WRT54G v.5/Speedstream 5100 problem
I continue losing my internet connection every few days when I have my Speedstream 5100 modem connected to my WRT54G v.5 router. I talked to tech support and they said my computer was not communicating with my router and that their modem was not the
-
Qbittorrent fails to load(solved)
I have installed qbittorrent (fatsobob's repo). The icon shows up, but when I try to start the program: root@archbox tinker]# qbittorrent qbittorrent: error while loading shared libraries: libboost_date_time-mt.so.1.33.1: cannot open shared object fi