Commit Graph

1481 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
f8db065a75 Merge remote-tracking branch 'nrgaway/r3-templates' 2015-02-17 04:58:04 +01:00
Marek Marczykowski-Górecki
e47197569a Adjust permissions of /var/run/qubes 2015-02-17 04:56:35 +01:00
Marek Marczykowski-Górecki
9bbfb4a567 Merge branch 'qrexec-sockets3' 2015-02-17 04:22:11 +01:00
Marek Marczykowski-Górecki
700c240d37 qrexec: add simple "fork server" to spawn new processes inside user session
This process should be started from user session (most likely
qubes-session). New processes (of that user) will be created as
children of that session making logind and such crap happy. This should
also solve problems with EOF transmission (no additional "su" process)
and prevent loading all the environment multiple times.
2015-02-17 04:18:34 +01:00
Marek Marczykowski-Górecki
4b5960daa3 qrexec: reorganise code for upcoming change
Move (qrexec-agent version of) do_exec to qrexec-agent.c, move
handle_handshake to qrexec-agent-data.c (common to all agent binaries).
Fix indentation (tabs -> spaces).
2015-02-17 04:06:19 +01:00
Marek Marczykowski-Górecki
c1cb78e0e8 qrexec: use sockets instead of pipes to communicate with child process
The main advantage is possible use of single socket for both stdin and
stdout. This is strictly required for using USBIP over qrexec.

For compatibility qrexec still creates three socket pairs (instead of
pipes) for stdin/out/err respectively. When qrexec-agent receives
SIGUSR1, it will close stdout socket and use stdin socket for both
directions.

Some additional work is needed here to actually allow child process to
send that signal - qrexec is running as root, but child as "user" in
most cases.
2015-02-17 01:36:09 +01:00
Jason Mehring
923416914d
Merge branch 'master' of git://git.qubes-os.org/marmarek/core-agent-linux into r3-templates 2015-02-14 13:12:21 -05:00
Jason Mehring
567a045bcd
Make sure when user is added to qubes group that the group is appended
added -a option to usermod.
This will prevent other groups from being un-subscribed when qubes group is added
2015-02-13 15:00:54 -05:00
Jason Mehring
197fa604ed
debian: Remove unneeded patch file and README 2015-02-12 11:34:13 -05:00
Jason Mehring
9b35bbdcb4
debian: Remove dist target from Makefile as copy-in is now being used 2015-02-12 11:32:45 -05:00
Jason Mehring
51c94ccc2b
debian: Move creation of directories into debian.dirs configuration file 2015-02-12 11:29:00 -05:00
Jason Mehring
45cbeda244
debian: Revert depends back to use libxen-dev 2015-02-12 11:27:35 -05:00
Marek Marczykowski-Górecki
4dbd9e205c network: fix handling newline in firewall rules
Since the rules are no more directly handed to echo -e, sed needs to
handle all escape sequences used in rules (newline only, but in
different notations).
2015-02-11 14:14:27 +01:00
Jason Mehring
6e3be531c5
Merge branch 'r3-templates' of github.com:nrgaway/core-agent-linux into r3-templates
Conflicts:
	debian/rules
2015-02-11 08:06:45 -05:00
Jason Mehring
2274e65a32 debian: Refactor Debian quilt packaging for xen
- Use copy-in for debian-quilt package in Makefile.builder instead of hook (to be removed) in Makefile.debian
- Remove patches from debian/patches; they are now applied dynamicly from series-debian-vm.conf
2015-02-11 08:02:55 -05:00
Jason Mehring
79650f0c4c debian: Converted debian package to a quilt package to allow patches
Applied patch to qrexec Makefile to prevent compile failure on warnings
  qrexec: Disable all warnings being treated as errors

  gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I. -g -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-xen` -D_FORTIFY_SOURCE=2  -c -o qrexec-agent-data.o qrexec-agent-data.c
  qrexec-agent-data.c: In function 'handle_remote_data':
  qrexec-agent-data.c:217:17: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
                 status = *(unsigned int *)buf;
                 ^
  cc1: all warnings being treated as errors
  <builtin>: recipe for target 'qrexec-agent-data.o' failed
2015-02-11 08:02:55 -05:00
Jason Mehring
f1390c1436 Set permissions to /proc/xen/privcmd, so a user in qubes group can access 2015-02-11 08:02:55 -05:00
Jason Mehring
fe7ba5e9d6 Remove 'xen.evtchn' udev rule
This rule already gets set in linux-utils
linux-utils/udev/udev-qubes-misc.rules:KERNEL=="xen/evtchn", MODE="0660", GROUP="qubes"
2015-02-11 08:02:55 -05:00
Jason Mehring
fc42561586 Add a qubes group and then add the user 'user' to the group
This is to allow permissions to be set on some devices where the user needs
less restrictive permissions.  /etc/udev/rules.d/99-qubes-misc.rules changes
a few xen devices to allow the users in the qubes group access
2015-02-11 08:02:55 -05:00
Jason Mehring
bb850ab95d debian: Remove 'exit 0' in maintainer section scripts to all other debhelpers (if any) to also execute 2015-02-11 08:02:55 -05:00
Marek Marczykowski-Górecki
b40c791914 debian: change systemctl set-default back to manual symlink
systemd in wheezy is old enough to not have this option.
2015-02-10 17:22:04 +01:00
Jason Mehring
0df84c7796
debian: Converted debian package to a quilt package to allow patches
Applied patch to qrexec Makefile to prevent compile failure on warnings
  qrexec: Disable all warnings being treated as errors

  gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I. -g -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-xen` -D_FORTIFY_SOURCE=2  -c -o qrexec-agent-data.o qrexec-agent-data.c
  qrexec-agent-data.c: In function 'handle_remote_data':
  qrexec-agent-data.c:217:17: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
                 status = *(unsigned int *)buf;
                 ^
  cc1: all warnings being treated as errors
  <builtin>: recipe for target 'qrexec-agent-data.o' failed
2015-02-10 10:40:51 -05:00
Matt McCutchen
b37d391f91 Make qvm-run bidirectional and document its limitations. 2015-02-09 06:37:32 +01:00
Matt McCutchen
377e0b4cd4 Switch to preset file for systemd units to disable. 2015-02-09 06:35:05 +01:00
Jason Mehring
87bf833368
Set permissions to /proc/xen/privcmd, so a user in qubes group can access 2015-02-07 06:26:51 -05:00
Jason Mehring
4366dd9ba7
Remove 'xen.evtchn' udev rule
This rule already gets set in linux-utils
linux-utils/udev/udev-qubes-misc.rules:KERNEL=="xen/evtchn", MODE="0660", GROUP="qubes"
2015-02-07 06:18:13 -05:00
Jason Mehring
ccff1f3149
Add a qubes group and then add the user 'user' to the group
This is to allow permissions to be set on some devices where the user needs
less restrictive permissions.  /etc/udev/rules.d/99-qubes-misc.rules changes
a few xen devices to allow the users in the qubes group access
2015-02-07 06:07:35 -05:00
Jason Mehring
328430d3bf
debian: Remove 'exit 0' in maintainer section scripts to all other debhelpers (if any) to also execute 2015-02-07 04:51:45 -05:00
Marek Marczykowski-Górecki
ea47dfbd5d Merge remote-tracking branch 'woju/master' 2015-02-06 08:07:47 +01:00
HW42
97dd21bcff debian: preinst: cleanup user creation
Generate user-groups via -U instead of explicit via groupadd. This also
fix the problem that the tinyproxy group were not gererated as
"system"-group.

Also suppress unneeded output of the existence test.
2015-02-05 05:42:08 +01:00
HW42
166ec3323f debian: prerm: remove obsolete code
this code has been obsoleted by commit 56607800, eb18af4c and 707be87a.
2015-02-05 05:42:08 +01:00
HW42
5c54d48c36 debian: preinst: don't force the default shell to bash 2015-02-05 05:42:08 +01:00
HW42
dad5bfbd18 remove 'bashisms' or explicit use bash 2015-02-05 05:42:08 +01:00
HW42
77392fd3a9 debian: preinst: remove modification of /etc/modules
modules are already handled by systemd and /lib/modules-load/qubes-*
2015-02-05 01:23:00 +01:00
HW42
6ff749a13a debian: install fstab as normal config file 2015-02-05 01:23:00 +01:00
HW42
641c516d76 debian: postinst: remove redundant and misleading trigger output 2015-02-05 01:22:21 +01:00
HW42
60a181b3f4 debian: postinst: enable haveged only if installed 2015-02-05 01:22:21 +01:00
HW42
05da6e6379 debian: postinst: don't start systemd services
Starting services in the postinst script doesn't make much sense since
the package is normally installed in the template. In addition the start
can fail when executed through a trigger.
2015-02-05 01:22:20 +01:00
HW42
e8f25bfac8 debian: postinst: cleanup 2015-02-05 01:22:20 +01:00
HW42
de53e1d0bb debian: postinst: enable netfilter-persistent service 2015-02-05 01:22:20 +01:00
HW42
5080c7c2d3 debian: postinst: remove fedora specific code
/etc/iptables/rules.* are already part of the packet.
The removed code has never done something in debian (since
/etc/iptables/rules.* already exists).
2015-02-05 01:22:20 +01:00
HW42
07c2f2a5f4 debian: postinst: use systemctl to set default target 2015-02-05 01:22:20 +01:00
HW42
a5fbbea98d debian: postinst: don't create /rw - it is already part of the package 2015-02-05 01:22:20 +01:00
HW42
b2307cfee6 debian: postinst: don't remove /etc/udev/rules.d/*
removing /etc/udev/rules.d/* in debian makes no sense since this folder
is only for custom udev rules.
2015-02-05 01:22:20 +01:00
HW42
47550ee2b6 debian: don't generate regular conf files in postinst 2015-02-05 01:22:19 +01:00
HW42
8a9d2378f6 debian: postinst: use dpkg-divert
dpkg-divert is not ideal for config files but should work better than
direct cp/mv.
2015-02-05 01:22:19 +01:00
HW42
4faece9e89 debian: postinst: use systemctl mask 2015-02-05 01:22:19 +01:00
HW42
d7fac08792 debian: fix for QSB #014 requires up to date qubes-utils 2015-02-05 01:22:19 +01:00
Marek Marczykowski-Górecki
490176f180 rpm: add missing R: pygobject3-base 2015-02-05 01:19:33 +01:00
Wojtek Porczyk
591b95a81b spec: require linux-utils-3.0.1 2015-02-02 19:04:02 +01:00