return -errno;
}
+ /* The higher 32bit of the flags field are considered
+ * 'incompatible flags'. Refuse them all for now. */
+ if (make->flags > 0xFFFFFFFFULL) {
+ close_nointr_nofail(fd);
+ return -ENOTSUP;
+ }
+
if (s) {
char *p;
n->type = KDBUS_MAKE_NAME;
make->size = ALIGN8(offsetof(struct kdbus_cmd_ns_make, items) + n->size);
- make->flags = KDBUS_MAKE_POLICY_OPEN;
+ make->flags = KDBUS_MAKE_POLICY_OPEN | KDBUS_MAKE_ACCESS_WORLD;
if (ioctl(fd, KDBUS_CMD_NS_MAKE, make) < 0) {
close_nointr_nofail(fd);
return -errno;
}
+ /* The higher 32bit of the flags field are considered
+ * 'incompatible flags'. Refuse them all for now. */
+ if (make->flags > 0xFFFFFFFFULL) {
+ close_nointr_nofail(fd);
+ return -ENOTSUP;
+ }
+
if (s) {
char *p;
- p = strappend("/dev/kdbus/", name);
+ p = strappend("/dev/kdbus/ns/", name);
if (!p) {
close_nointr_nofail(fd);
return -ENOMEM;