Fix wrong test

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>

Cherry-picked from bf1893c828669f3a58e206d7b4cbedea1b640ebf

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Add developer target py-tests

Add a target to manually run the python tests, and no other
tests. In the same way as the hs-tests target simplifies testing
Haskell changes while developing Haskell code, this target
simplifies developing python code.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>

Cherry-picked from 5b8754f4f

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Fix Xen's NIC file

Xen exports all environment variables to a file so that an
external script (see vif_script hvparam) can source it.
In case of multiple values per variable (e.g. TAGS), we
should use XXX="a b c" instead of XXX=a b c. Fix this.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
LXC: Drop CAP_SYS_ADMIN by default

Considering the safety of an LXC container, it is prefered to drop the
SYS_ADMIN capability from a container to prevent allowing various systems
calls that can be escalate privileges of a container.
This patch adds sys_admin to the default value of the
lxc_drop_capabilities hvparam and add additional lxc.mount.entry lines
to an LXC configuration file which required to run a container with
dropping the SYS_ADMIN capability.

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Fix order of arguments for key check

Due to a bug in python-openssl 0.14, no exception is
thrown when checking a certificate against a private
key if they are given to the context in the wrong
order. This patch fixes the order and also removes
some unnecessarily convoluted code.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Fix order of arguments for key check
  Add developer target py-tests
  Fix wrong test

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Merge branch 'stable-2.13' into master

* stable-2.13
  LXC: Drop CAP_SYS_ADMIN by default
  Fix Xen's NIC file

* stable-2.12
  Fix order of arguments for key check
  Add developer target py-tests
  Fix wrong test

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>