Due to modifications made to SDK components in version 1.3, you may need to make changes to the application code that was developed using KasperskyOS Community Edition version 1.2 before using that code with KasperskyOS Community Edition version 1.3.
The following critical changes were made to SDK components in version 1.3:
fork
, exec*
, popen*
, and pclose
. Use of these functions will result in an error during a build.psa_crypto_init()
function before you use the hashing mechanisms for the first time. To ensure correct operation of the Mbed-TLS library, all you have to do is add the psa_crypto_init()
call before calling any Mbed-TLS function for the first time. This function can be called any number of times. If the first call is successful, all other calls will also be successful.KdfGetDeviceFromContainer()
and KdfEnumContainerNames()
functions have been removed.KdfGetDeviceListByTarget()
and KdfGetDeviceListByTargetSet()
functions now return a container with a handle of the KdfDevContainerHandle
type.SecurityDisconnect
method has been removed from the Handle.idl
kernel interface.VFS_BUFFER_SPLIT_SIZE
has been removed. VFS will use VFS_BUFFER_SIZE
as the upper limit when transmitting data in an IPC arena. The new parameter VFS_BUFSIZ
is being implemented to configure the size of the I/O buffer (setbuf
). You will be able to use MDL buffers to read/write large-sized data.S_IRUSR
, S_IWUSR
, and S_IXUSR
) and either allow or deny specific operations. When creating a file and directory, you must verify that all bits are set correctly:open(file, O_RDWR | O_CREAT, (S_IRUSR | S_IWUSR)
(Read | Write | Execute)
. The Execute
bit provides the capability to search for files in the directory: mkdir(dir, S_IRWXU)
The open()
function lets you create files without specifying these bits, therefore you may encounter a situation in which previously created files may stop opening and instead return an EACCESS
error. You can use the chmod()
function to change the file permissions.
Driver.idl
interface, the GetDeviceEvents()
method has been renamed to AwaitDeviceEvents()
.kl_drivers_Driver *KdfServerInit(KdfServerData *data)
has been replaced with kl_drivers_Driver *KdfServerInit(void)
.Task::FreeSelfEnv
has become a stub that returns rcUimplemented
, and the KnTaskFreeEnv
and KnTaskGetEnv
functions are no longer thread-safe.AF_ROUTE
sockets is prohibited. Now, if you attempt to write to the AF_ROUTE
socket, the EACCESS
error is returned. To add/delete routes, you must use ioctl()
and the ortentry
structure.nk_arena_get()
call has changed. RTL_NULL
is returned only if there is an error. Otherwise, the correct memory pointer is returned even if zero-sized data is received.KosString KosCreateStringEx(KosStringRoot *root, const char *str)
was changed to Retcode KosCreateStringEx(KosStringRoot *root, const char *str, KosString *outStr)
;KosString KosCreateString(const char *str)
was changed to Retcode KosCreateString(const char *str, KosString *outStr)
.task.Task
now has a new method named GetPid
, which is always used when a process is created.As a result, the EntityInit(Ex)
call will start to return an error when there is a strictly configured security policy with a rigid restriction on methods. You must add the new method to the permitted methods in the policy.
Example:
request dst=kl.core.Core {
match endpoint=task.Task {
match method=GetPid {
match src=Einit { grant () }
}
}
}
kl.drivers.Driver
type has also been added to each SDK-included EDL file containing the kl.drivers.Block
endpoint.For example, the result will look as follows for ATA.edl
:
entity kl.drivers.ATA
security kl.drivers.block.Security
endpoints {
driver : kl.drivers.Driver
ata: kl.drivers.Block
}
Block.idl
endpoint has been refined:Fini()
method has been removed.EnumPorts()
method has been removed. You should use the GetDeviceList()
method of the kl.drivers.Driver
endpoint.Open()
method has been removed. You should use the OpenDevice()
method of the kl.drivers.Driver
endpoint.Close()
method has been removed. You should use the CloseDevice()
method of the kl.drivers.Driver
endpoint.sysctl()
function has been added. A call with codes that are different from the supported codes is prohibited and returns the ENOSYS
code. All authorized codes have been converted into separate interface methods of the VFS component (VfsNetConfig.idl
). With security policies, you can permit read-only or write-only by using the valOperation
argument of an IPC request (except IpctlForwarding
, RtDump
, and RtIflist
): 0 is for writing, or setting a parameter value, 1 is for reading a parameter, and 2 is for requesting the parameter size)The supported codes are listed in the table below.
Authorized codes of the sysctl() function
Parameter name |
MIB code |
VFS interface method |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|