×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Binary-incompatible change in Open C to require proper permission checks for creating IPC resources (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
Forum Nokia KB (Talk | contribs)
extkbeditor2 (Talk | contribs)
m
Line 6: Line 6:
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
{{KnowledgeBase
|-
+
|id=KIS001077
|'''ID''' ||KIS001077
+
|platform=S60 3rd Edition
|'''Creation date''' ||August 20, 2008
+
|devices=All (S60 3rd Edition devices)
|-
+
|category=Open C
|'''Platform''' ||S60 3rd Edition
+
|subcategory=IPC, Compatibility
|'''Devices''' ||All (S60 3rd Edition devices)
+
|creationdate=August 20, 2008
|-
+
|keywords=
|'''Category''' ||Open C
+
}}
|'''Subcategory''' ||IPC, Compatibility
+
|}
+
  
 
==Overview==
 
==Overview==
 
 
To improve the performance and better adhere to POSIX standards, the next release of Open C will undergo some changes in the architecture. Some of the changes will also affect the binary compatibility with previous releases.
 
To improve the performance and better adhere to POSIX standards, the next release of Open C will undergo some changes in the architecture. Some of the changes will also affect the binary compatibility with previous releases.
  
== Description ==
+
==Description==
 
+
 
Proper permissions must now be defined when creating IPC (inter-process communication) resources (<tt>shm</tt>, <tt>semaphore</tt, and <tt>msgqueue</tt>). The flag argument (value) can no longer be just <tt>IPC_CREAT</tt>. Specifying only <tt>IPC_CREAT</tt> means that the IPC resource is created with absolutely no permissions, and will result in <tt>EACCESS</tt> error.
 
Proper permissions must now be defined when creating IPC (inter-process communication) resources (<tt>shm</tt>, <tt>semaphore</tt, and <tt>msgqueue</tt>). The flag argument (value) can no longer be just <tt>IPC_CREAT</tt>. Specifying only <tt>IPC_CREAT</tt> means that the IPC resource is created with absolutely no permissions, and will result in <tt>EACCESS</tt> error.
  
== How to reproduce ==
+
==How to reproduce==
 
+
 
<code cpp>
 
<code cpp>
 
  int msgid;       
 
  int msgid;       
Line 34: Line 29:
 
</code>
 
</code>
  
== Solution ==
+
==Solution==
 
+
 
Starting from the next Open C release, <tt>IPC_CREAT</tt> has to be OR-ed with <tt>READ (0400)</tt> or/and <tt>WRITE (0200)</tt> permission.
 
Starting from the next Open C release, <tt>IPC_CREAT</tt> has to be OR-ed with <tt>READ (0400)</tt> or/and <tt>WRITE (0200)</tt> permission.

Revision as of 19:45, 31 October 2008

Template:KBKI


Article Metadata
Tested with
Devices(s): All (S60 3rd Edition devices)
Compatibility
Platform(s): S60 3rd Edition
Symbian
S60 3rd Edition (initial release)
Article
Created: (20 Aug 2008)
Last edited: extkbeditor2 (31 Oct 2008)

Overview

To improve the performance and better adhere to POSIX standards, the next release of Open C will undergo some changes in the architecture. Some of the changes will also affect the binary compatibility with previous releases.

Description

Proper permissions must now be defined when creating IPC (inter-process communication) resources (shm, semaphore</tt, and <tt>msgqueue). The flag argument (value) can no longer be just IPC_CREAT. Specifying only IPC_CREAT means that the IPC resource is created with absolutely no permissions, and will result in EACCESS error.

How to reproduce

 int msgid;      
struct msqid_ds buf = {0};
msgid = msgget(1000, 512); /* returns with errno = 13 */

Solution

Starting from the next Open C release, IPC_CREAT has to be OR-ed with READ (0400) or/and WRITE (0200) permission.

114 page views in the last 30 days.
×