Re: getting permission denied with shmat() as non-root

2011-08-29 Thread Timothy Stotts
Thanks Peter. That was the tip I needed for debugging the program on the Debian system. ipcs(1), when run as the same user as the program, did not show any shared memory being created. However, running ipcs(1) as root showed the memory being created by the non-root user with permissions of . Ob

Re: getting permission denied with shmat() as non-root

2011-08-28 Thread Adam Borowski
On Sat, Aug 27, 2011 at 08:44:41PM -0400, Timothy Stotts wrote: > on the Debian system the shmat() function returns -1 with an error code of > EACCES, indicating permission denied. The embedded system does not have > shm_open(), otherwise I would use that. Other folks in this thread provided bett

Re: getting permission denied with shmat() as non-root

2011-08-28 Thread Peter Miller
On Sat, 2011-08-27 at 20:44 -0400, Timothy Stotts wrote: > I am using ftok(), shmget(), shmat() to obtain a small quantity of > shared memory for the application. As root, the shmat() function > succeeds on the embedded system. However, on the Debian system the > shmat() function returns -1 with an

Re: getting permission denied with shmat() as non-root

2011-08-28 Thread Bastian Blank
On Sat, Aug 27, 2011 at 08:44:41PM -0400, Timothy Stotts wrote: > /proc/config.gz reveals that SYSVIPC is indeed compiled into the Linux > kernel of the Debian system. The Debian kernels don't include support for /proc/config.gz. > How can I diagnose the program on the Debian system? strace. Als

getting permission denied with shmat() as non-root

2011-08-27 Thread Timothy Stotts
I am writing software that will execute on a customized Debian Linux and also on an embedded POSIX system. On the embedded system, I execute the code as root. On the Debian system, I execute the code as my non-root user account. This is the normal usage of the application. I am using ftok(), shmge