05-25-06 12:16 AM
joaquin.hmarquez@gmail.com wrote:
> Hi,
>
> Is it posible for a user _who is not the creator_ of a shared memory
> segment delete it ?
>
> For creating, the user A executes:
>
> int iIpckey = 676767;
> int shm_id = shmget( iIpckey, 100, IPC_CREAT | 0666);
>
> I verify that it works with:
>
> m 2229122 0x000a539f --rw-rw-rw- un4567 sytef
>
> ok, and then, the user B tries to delete it with :
>
> struct shmid_ds shm_desc;
> int iIpckey = 676767;
> int shm_id = shmget( iIpckey, 100, IPC_CREAT | 0666);
#include <errno.h>
if (shm_id == -) {
fprintf(stderr, "error = %d (%s)\n", errno, strerror(errno);
exit (1);
}
> shmctl(shm_id, IPC_RMID, &shm_desc);
>
> but it doesn't work (i think because user B is not the creator).
>
> Can someone help me, please ?
> Thanks in advance.
>
> PS : I am working on AIX 5.3 and... sorry for my english :-)
HTH,
AvK
[ Post a follow-up to this message ]
|