Expanding IUS with external function
Posted in 1999
Topics: Security, Permissions & Auditing
Hello Informix experts and hackers in the online Manuals for Universal Server 9.1 I read about "External Functions" using C-language subroutines. All the doc is talking about is how to declare such an external function in IUS using SQL but there is no simple C example (for UNIX) that would show me the parameter transfer conventions. Here is what I would like to do: The DB-server is running on a SUN, the Clients are mixed Unix and Windows: SQL: INSERT into tabname VALUES(value1, value2, ENCRYPT(password, salt)); The encrypt-function should convert a Password-String and a Salt-Value to a unix encoded password and store the resulting encoded-password in the third field. I do know, that I can allways use the unix system function to directly generate a password, but this works only as long as the program calling the SQL runs on a UNIX-system. Anyone already done this before or does anyone have a simple example of such an external C-function. Any response would be highly appreciated. Regards Thomas
Thomas Forster (fso@ringier.ch) wrote: : in the online Manuals for Universal Server 9.1 I read about "External : Functions" using C-language subroutines. All the doc is talking about is : how to declare such an external function in IUS using SQL but there is : no simple C example (for UNIX) that would show me the parameter transfer : conventions. Here is what I would like to do: : : The DB-server is running on a SUN, the Clients are mixed Unix and : Windows: : SQL: INSERT into tabname VALUES(value1, value2, ENCRYPT(password, : salt)); : http://www.informix.com/answers/oldsite/answers/english/ius91ux.htm Check out the manuals titled: "INFORMIX-Universal Server DataBlade API Programmer's Guide Manual" and "Extending INFORMIX-Universal Server:Data Types" and "Extending INFORMIX-Universal Server: User-defined Routines" Also: http://www.informix.com/idn The INFORMIX Developers Network includes a wealth of information and examples about how to do this kind of thing. I would also recommend that you check out the DataBlade Developer's Kit software, which helps to automate some of the trickier parts of the process; like getting the argument definitions right. Hope this helps! KR Pb