Merge branch 'master' of git.qubes-os.org:/var/lib/qubes/git/marmarek/core
This commit is contained in:
commit
23f3f424e5
@ -122,21 +122,14 @@ def block_name_to_majorminor(name):
|
|||||||
major = 0
|
major = 0
|
||||||
minor = 0
|
minor = 0
|
||||||
dXpY_style = False
|
dXpY_style = False
|
||||||
|
|
||||||
name_match = re.match(r"([a-z]+)([a-z])([0-9]*)", name)
|
|
||||||
if not name_match:
|
|
||||||
name_match = re.match(r"([a-z]+)([0-9]*)(?:p([0-9]+)?", name)
|
|
||||||
if not name_match:
|
|
||||||
raise QubesException("Invalid device name: %s" % name)
|
|
||||||
else:
|
|
||||||
dXpY_style = True
|
|
||||||
|
|
||||||
disk = True
|
disk = True
|
||||||
if name_match.group(1) == "xvd":
|
|
||||||
|
if name.startswith("xvd"):
|
||||||
major = 202
|
major = 202
|
||||||
elif name_match.group(1) == "sd":
|
elif name.startswith("sd"):
|
||||||
major = 8
|
major = 8
|
||||||
elif name_match.group(1) == "mmcblk":
|
elif name.startswith("mmcblk"):
|
||||||
|
dXpY_style = True
|
||||||
major = 179
|
major = 179
|
||||||
elif name.startswith("scd"):
|
elif name.startswith("scd"):
|
||||||
disk = False
|
disk = False
|
||||||
@ -154,6 +147,13 @@ def block_name_to_majorminor(name):
|
|||||||
# Unknown device
|
# Unknown device
|
||||||
return (0, 0)
|
return (0, 0)
|
||||||
|
|
||||||
|
if not dXpY_style:
|
||||||
|
name_match = re.match(r"^([a-z]+)([a-z])([0-9]*)$", name)
|
||||||
|
else:
|
||||||
|
name_match = re.match(r"^([a-z]+)([0-9]*)(?:p([0-9]+))?$", name)
|
||||||
|
if not name_match:
|
||||||
|
raise QubesException("Invalid device name: %s" % name)
|
||||||
|
|
||||||
if disk:
|
if disk:
|
||||||
if dXpY_style:
|
if dXpY_style:
|
||||||
minor = int(name_match.group(2))*8
|
minor = int(name_match.group(2))*8
|
||||||
@ -191,7 +191,7 @@ def block_find_unused_frontend(vm = None):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def block_list(vm = None, system_disks = False):
|
def block_list(vm = None, system_disks = False):
|
||||||
device_re = re.compile(r"^[a-z0-9]{1,8}$")
|
device_re = re.compile(r"^[a-z0-9]{1,12}$")
|
||||||
# FIXME: any better idea of desc_re?
|
# FIXME: any better idea of desc_re?
|
||||||
desc_re = re.compile(r"^.{1,255}$")
|
desc_re = re.compile(r"^.{1,255}$")
|
||||||
mode_re = re.compile(r"^[rw]$")
|
mode_re = re.compile(r"^[rw]$")
|
||||||
|
@ -554,14 +554,14 @@ int main()
|
|||||||
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
sigprocmask(SIG_BLOCK, &chld_set, NULL);
|
||||||
|
if (child_exited)
|
||||||
|
reap_children();
|
||||||
max = fill_fds_for_select(&rdset, &wrset);
|
max = fill_fds_for_select(&rdset, &wrset);
|
||||||
if (buffer_space_vchan_ext() <=
|
if (buffer_space_vchan_ext() <=
|
||||||
sizeof(struct server_header))
|
sizeof(struct server_header))
|
||||||
FD_ZERO(&rdset);
|
FD_ZERO(&rdset);
|
||||||
|
|
||||||
sigprocmask(SIG_BLOCK, &chld_set, NULL);
|
|
||||||
if (child_exited)
|
|
||||||
reap_children();
|
|
||||||
wait_for_vchan_or_argfd(max, &rdset, &wrset);
|
wait_for_vchan_or_argfd(max, &rdset, &wrset);
|
||||||
sigprocmask(SIG_UNBLOCK, &chld_set, NULL);
|
sigprocmask(SIG_UNBLOCK, &chld_set, NULL);
|
||||||
|
|
||||||
|
@ -400,12 +400,12 @@ fi
|
|||||||
/usr/lib/qubes/qubes_rpc_multiplexer
|
/usr/lib/qubes/qubes_rpc_multiplexer
|
||||||
/usr/lib/qubes/qrexec_policy
|
/usr/lib/qubes/qrexec_policy
|
||||||
%dir /etc/qubes_rpc/policy
|
%dir /etc/qubes_rpc/policy
|
||||||
%attr(0664,root,qubes) /etc/qubes_rpc/policy/qubes.Filecopy
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes_rpc/policy/qubes.Filecopy
|
||||||
%attr(0664,root,qubes) /etc/qubes_rpc/policy/qubes.OpenInVM
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes_rpc/policy/qubes.OpenInVM
|
||||||
%attr(0664,root,qubes) /etc/qubes_rpc/policy/qubes.SyncAppMenus
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes_rpc/policy/qubes.SyncAppMenus
|
||||||
%attr(0664,root,qubes) /etc/qubes_rpc/policy/qubes.NotifyUpdates
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes_rpc/policy/qubes.NotifyUpdates
|
||||||
%attr(0664,root,qubes) /etc/qubes_rpc/policy/qubes.ReceiveUpdates
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes_rpc/policy/qubes.ReceiveUpdates
|
||||||
%attr(0664,root,qubes) /etc/qubes_rpc/policy/qubes.VMShell
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes_rpc/policy/qubes.VMShell
|
||||||
/etc/qubes_rpc/qubes.SyncAppMenus
|
/etc/qubes_rpc/qubes.SyncAppMenus
|
||||||
/etc/qubes_rpc/qubes.NotifyUpdates
|
/etc/qubes_rpc/qubes.NotifyUpdates
|
||||||
/etc/qubes_rpc/qubes.ReceiveUpdates
|
/etc/qubes_rpc/qubes.ReceiveUpdates
|
||||||
|
Loading…
Reference in New Issue
Block a user