Date: Fri, 03 Apr 2020 15:47:02 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 245319] mq_open does not honor its mode argument Message-ID: <bug-245319-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245319 Bug ID: 245319 Summary: mq_open does not honor its mode argument Product: Base System Version: 12.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: I.N10.2@programmer.net Here is the code: void openMsgQueue(void) { mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; struct mq_attr attributes; bzero(&attributes, sizeof(attributes)); attributes.mq_maxmsg = 100; attributes.mq_msgsize = MSG_MAX_SIZE; mqid = mq_open(QUEUE_NAME, O_RDONLY | O_CREAT, mode, attributes); if ((mqd_t) -1 == mqid) { err(1, "mq_open"); } } Obviously, MSG_MAX_SIZE and QUEUE_NAME are defined elsewhere. After running this function for the first time, the QUEUE_NAME was created, but the permissions on the queue were: -rw-r--r-- Since I specified that every user should have "rw" access, but it didn't happen, I had to use chmod so other users could send messages to this queue. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245319-227>
