Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
This page was last modified 16:45, 31 October 2008.

KIS001077 - Open C: Proper permission checks for creating IPC resources

From Forum Nokia Wiki



ID KIS001077 Creation date August 20, 2008
Platform S60 3rd Edition Devices All (S60 3rd Edition devices)
Category Open C Subcategory IPC, Compatibility


Keywords (APIs, classes, methods, functions):

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.

Related Discussions
Thread Thread Starter Forum Replies Last Post
Re: problem of file download not solved manan_the_one General Browsing 18 2007-09-14 19:28
JSR-75 permission spieri Mobile Java Networking & Messaging & Security 4 2006-10-21 00:43
PIM access (s40/s60) vichoty Mobile Java General 1 2005-12-20 12:10
Problem with permission prompts!! biberaffe Mobile Java General 2 2008-05-18 21:31
I can't modify the SMS sample gianni_balzarini Multimodecards 3 2003-09-02 04:29
 
Powered by MediaWiki
RDF Facets: qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZKnowledgeBaseContentQ qfnZtypeQUqfnTypeZKnownIssueQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX