bus: make sure we check for "incompatible" flags negotiated with kernel kdbus
This commit is contained in:
parent
8bf9fcf488
commit
f9638db8de
|
@ -1074,6 +1074,13 @@ int bus_kernel_create_bus(const char *name, char **s) {
|
|||
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;
|
||||
|
||||
|
@ -1118,6 +1125,13 @@ int bus_kernel_create_namespace(const char *name, char **s) {
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue