From 1ab1c7dafaef78c472b5f67a1fefe450f87e4ccb Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 9 Oct 2016 01:38:43 +0200 Subject: lightdm-remote-session-arctica: Fork from latest known version of lightdm-remote-session-x2go. --- Makefile.am | 32 +++++++-------- README.md | 6 +-- arctica-session-wrapper.c | 34 ++++++++++++++++ arctica-session.in | 30 ++++++++++++++ arctica.desktop.in | 8 ++++ configure.ac | 2 +- debian/changelog | 44 ++------------------ debian/control | 22 +++++----- debian/copyright | 8 ++-- debian/watch | 3 +- lightdm-remote-arctica | 7 ++++ lightdm-remote-session-arctica.in | 85 +++++++++++++++++++++++++++++++++++++++ lightdm-remote-session-x2go.in | 85 --------------------------------------- lightdm-remote-x2go | 8 ---- x2go-session-wrapper.c | 34 ---------------- x2go-session.in | 30 -------------- x2go.desktop.in | 8 ---- 17 files changed, 205 insertions(+), 241 deletions(-) create mode 100644 arctica-session-wrapper.c create mode 100755 arctica-session.in create mode 100644 arctica.desktop.in create mode 100644 lightdm-remote-arctica create mode 100644 lightdm-remote-session-arctica.in delete mode 100644 lightdm-remote-session-x2go.in delete mode 100644 lightdm-remote-x2go delete mode 100644 x2go-session-wrapper.c delete mode 100755 x2go-session.in delete mode 100644 x2go.desktop.in diff --git a/Makefile.am b/Makefile.am index 1081752..ca50aa2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,48 +1,48 @@ pam_sessiondir = $(sysconfdir)/pam.d/ pam_session_DATA = \ - lightdm-remote-x2go + lightdm-remote-arctica lightdm_sessiondir = $(datadir)/lightdm/remote-sessions lightdm_session_DATA = \ - x2go.desktop + arctica.desktop %.desktop: %.desktop.in @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ session_startdir = $(pkgdatadir) session_start_SCRIPTS = \ - x2go-session + arctica-session -x2go-session: x2go-session.in +arctica-session: arctica-session.in @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ @chmod +x $@ apparmordir = $(sysconfdir)/apparmor.d/ apparmor_DATA = \ - lightdm-remote-session-x2go + lightdm-remote-session-arctica -lightdm-remote-session-x2go: lightdm-remote-session-x2go.in +lightdm-remote-session-arctica: lightdm-remote-session-arctica.in @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ libexec_PROGRAMS = \ - x2go-session-wrapper + arctica-session-wrapper -x2go_session_wrapper_SOURCES = \ - x2go-session-wrapper.c -x2go_session_wrapper_CFLAGS = \ +arctica_session_wrapper_SOURCES = \ + arctica-session-wrapper.c +arctica_session_wrapper_CFLAGS = \ -DPKGDATADIR="\"$(pkgdatadir)\"" \ -Wall -Werror EXTRA_DIST = \ $(pam_session_DATA) \ - x2go.desktop.in \ - x2go-session.in \ - lightdm-remote-session-x2go.in + arctica.desktop.in \ + arctica-session.in \ + lightdm-remote-session-arctica.in CLEANFILES = \ - x2go.desktop \ - x2go-session \ - lightdm-remote-session-x2go + arctica.desktop \ + arctica-session \ + lightdm-remote-session-arctica DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall diff --git a/README.md b/README.md index adfbc2e..04f4e8c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# LightDM (Arctica Greeter) Remote Logon: X2Go # +# LightDM (Arctica Greeter) Remote Logon: Arctica # -Configuration for LightDM / Arctica Greeter to launch remote X2Go sessions. +Configuration for LightDM / Arctica Greeter to launch remote Arctica Sessions. This code project was originally started by Canonical Ltd. and has been adapted by various authors with the purpose of making Remote Logon -against X2Go via Arctica Greeter (formerly known as Unity Greeter) +against Arctica via Arctica Greeter (formerly known as Unity Greeter) available on Ubuntu and non-Ubuntu systems alike. diff --git a/arctica-session-wrapper.c b/arctica-session-wrapper.c new file mode 100644 index 0000000..ef4687e --- /dev/null +++ b/arctica-session-wrapper.c @@ -0,0 +1,34 @@ +/* + * Copyright © 2012-2016 Mike Gabriel + * Copyright © 2012 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Author: Mike Gabriel + * Author libpam-freerdp (where we forked from): Ted Gould + */ + +#include +#include + +int +main (int argc, char * argv[]) +{ + char * args[2]; + args[0] = PKGDATADIR "/arctica-session"; + args[1] = NULL; + + execvp(args[0], args); + + return 0; +} diff --git a/arctica-session.in b/arctica-session.in new file mode 100755 index 0000000..1caec66 --- /dev/null +++ b/arctica-session.in @@ -0,0 +1,30 @@ +#!/bin/bash + +# +# Copyright © 2012-2016 Mike Gabriel +# Copyright © 2012 Canonical Ltd. +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 3, as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranties of +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# Author: Mike Gabriel +# Author lightdm-remote-session-freerdp (where we forked from): Ted Gould +# + +socket="$HOME/.arctica-socket"; +if [ -e "$socket" ]; then + socat unix-connect:"$socket" - | /usr/bin/arctica-cli --from-stdin 2>&1 | logger -t lightdm-remote-session-arctica -- +else + zenity --warning --text="Unable to locate Arctica Session socket" +fi; + +rm -f "$socket" diff --git a/arctica.desktop.in b/arctica.desktop.in new file mode 100644 index 0000000..df9b913 --- /dev/null +++ b/arctica.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Arctica +Comment=Full Screen Arctica Session +Exec=@libexecdir@/arctica-session-wrapper +TryExec=@libexecdir@/arctica-session-wrapper +Icon= +Type=Application +X-LightDM-PAM-Service=lightdm-remote-arctica diff --git a/configure.ac b/configure.ac index c6e68c3..5c2c5ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([lightdm-remote-session-x2go], [0.0.1.1]) +AC_INIT([lightdm-remote-session-arctica], [0.0.1.1]) AM_INIT_AUTOMAKE([1.11 -Wno-portability]) AM_SILENT_RULES([yes]) diff --git a/debian/changelog b/debian/changelog index 56f837b..a52b12a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,42 +1,6 @@ -lightdm-remote-session-x2go (0.0.1.1-0) UNRELEASED; urgency=low +lightdm-remote-session-arctica (0.0.1.1-0) UNRELEASED; urgency=low - * New upstream version (0.0.1.1): - - Add apparmor rule that grants read access to the kernel's random UUID - generator. - - Another apparmor rule: allow rw access to /var/lib/libuuid/clock.txt". - * debian/source/format: - + Switch to format 1.0. + * Upstream-provided Debian package for lightdm-remote-session-arctica. + See upstream ChangeLog for recent changes. - -- Mike Gabriel Tue, 30 Apr 2013 17:04:25 +0200 - -lightdm-remote-session-x2go (0.0.1.0-0~x2go1) unstable; urgency=low - - * New upstream version (0.0.1.0): - - Stop being a drop-in replacement for lightdm-remote-login-freerdp. - Become an independent package that provides server type »x2go« to - the remote-login-service. - - Prepare for becoming able to use PyHoca-CLI _or_ X2Go Client for - handling the X2Go session being launched via remote login. - - -- Mike Gabriel Sat, 27 Apr 2013 13:49:02 +0200 - -lightdm-remote-session-x2go (0.0.0.2-0~x2go1) unstable; urgency=low - - [ Jan Engelhardt ] - * New upstream version (0.0.0.2): - - Use socat instead of socket-sucker.c from lightdm-remote-session-freerdp. - - -- Mike Gabriel Wed, 24 Apr 2013 17:52:15 +0200 - -lightdm-remote-session-x2go (0.0.0.1-0~x2go1) unstable; urgency=low - - * Initial upstream release. Forked from Canonical's - lightdm-remote-session-freerdp (by Ted Gould ). - * /debian/control: - + Be a drop-in replacement for lightdm-remote-session-freerdp for now - until Canonical offers X2Go sessions on - https://uccs.landscape.canonical.com. - -> Thus, conflict with and replace lightdm-remote-session-freerdp. - + Versioned dependency on pyhoca-cli (>= 0.2.1.0). - - -- Mike Gabriel Sat, 10 Nov 2012 22:19:55 +0100 + -- Mike Gabriel Sun, 09 Nov 2016 01:19:55 +0200 diff --git a/debian/control b/debian/control index 596f83c..590b876 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ -Source: lightdm-remote-session-x2go +Source: lightdm-remote-session-arctica Section: misc Priority: extra -Maintainer: X2Go Developers +Maintainer: Arctica Developers Uploaders: Mike Gabriel Build-Depends: @@ -10,23 +10,23 @@ Build-Depends: cdbs, dh-autoreconf, Standards-Version: 3.9.4 -Homepage: http://wiki.x2go.org -Vcs-Git: git://code.x2go.org/lightdm-remote-session-x2go -Vcs-Browser: http://code.x2go.org/gitweb?p=lightdm-remote-session-x2go.git;a=summary +Homepage: http://wiki.arctica.org +Vcs-Git: https://github.com/ArcticaProject/lightdm-remote-session-arctica +Vcs-Browser: https://github.com/ArcticaProject/lightdm-remote-session-arctica -Package: lightdm-remote-session-x2go +Package: lightdm-remote-session-arctica Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, socat, zenity, - pyhoca-cli (>= 0.2.1.0-0~) | x2goclient (>= 4.0.1.1-0~), - libpam-x2go, + arctica-cli, + libpam-arctica, lightdm (>= 1.3.3-0~), Suggests: apparmor, -Description: Log into X2Go sessions via LightDM +Description: Log into Arctica Sessions via LightDM The configuration files needed and scripts required to login - to a full screen X2Go session using LightDM and PyHoca / Python X2Go - or X2Go Client. + to a full screen Arctica Session using LightDM and the + Arctica Client (command line version). diff --git a/debian/copyright b/debian/copyright index 9ab1749..71e9d7c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,16 +1,16 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: lightdm-remote-session-x2go -Source: http://code.x2go.org/gitweb?p=lightdm-remote-session-x2go.git;a=summary +Upstream-Name: lightdm-remote-session-arctica +Source: https://github.com/ArcticaProject/lightdm-remote-session-arctica Files: * Copyright: - 2012-2013, Mike Gabriel (X2Go Project) + 2012-2016, Mike Gabriel 2012, Canonical Ltd. License: GPL-3 Files: debian/* Copyright: - 2012-2013, Mike Gabriel (X2Go Project) + 2012-2016, Mike Gabriel 2012, Canonical Ltd. License: GPL-3 diff --git a/debian/watch b/debian/watch index 3ca055a..b2965a5 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,3 @@ version=3 -http://code.x2go.org/releases/source/lightdm-remote-session-x2go/lightdm-remote-session-x2go-(.+)\.tar\.gz +opts=filenamemangle=s/.*\/.*?([\d\.-]+)\.tar\.gz/lightdm-remote-session-arctica-$1.tar.gz/ \ +https://github.com/ArcticaProject/lightdm-remote-session-arctica/tags .*/archive/.*?([\d\.]+).tar.gz diff --git a/lightdm-remote-arctica b/lightdm-remote-arctica new file mode 100644 index 0000000..4b62cf6 --- /dev/null +++ b/lightdm-remote-arctica @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth required pam_env.so readenv=1 +auth required pam_env.so readenv=1 envfile=/etc/default/locale +auth required pam_arctica.so +session required pam_limits.so +session required pam_arctica.so diff --git a/lightdm-remote-session-arctica.in b/lightdm-remote-session-arctica.in new file mode 100644 index 0000000..25fe133 --- /dev/null +++ b/lightdm-remote-session-arctica.in @@ -0,0 +1,85 @@ +# vim:syntax=apparmor +# Profile for restricting lightdm remote session for X2Go +# Based on the Guest Account Apparmor script from: +# Author: Martin Pitt +# Mike Gabriel + +#include + +@libexecdir@/arctica-session-wrapper { + #include + #include + #include + /etc/compizconfig/config rw, # bug in compiz https://launchpad.net/bugs/697678 + + / r, + /bin/ rmix, + /bin/fusermount Px, + /bin/** rmix, + /cdrom/ rmix, + /cdrom/** rmix, + /dev/ r, + /dev/** rmw, # audio devices etc. + owner /dev/shm/** rmw, + /etc/ r, + /etc/** rmk, + /etc/gdm/Xsession ix, + /lib/ r, + /lib/** rmixk, + /lib32/ r, + /lib32/** rmixk, + /lib64/ r, + /lib64/** rmixk, + owner /media/ r, + owner /media/** rmwlixk, # we want access to USB sticks and the like + /opt/ r, + /opt/** rmixk, + @{PROC}/ r, + @{PROC}/* rm, + @{PROC}/asound rm, + @{PROC}/asound/** rm, + @{PROC}/ati rm, + @{PROC}/ati/** rm, + owner @{PROC}/** rm, + # needed for gnome-keyring-daemon + @{PROC}/*/status r, + /sbin/ r, + /sbin/** rmixk, + /sys/ r, + /sys/** rm, + /tmp/ rw, + owner /tmp/** rwlkmix, + /usr/ r, + /usr/** rmixk, + /var/ r, + /var/** rmixk, + /var/guest-data/** rw, # allow to store files permanently + /var/tmp/ rw, + owner /var/tmp/** rwlkm, + /{,var/}run/ r, + # necessary for writing to sockets, etc. + /{,var/}run/** rmkix, + /{,var/}run/shm/** wl, + # access to kernel's UUID generator (required by pyhoca-cli) + @{PROC}/sys/kernel/random/uuid r, + /var/lib/libuuid/clock.txt rw, + /run/systemd/journal/dev-log w, + /tmp/**/.arctica-socket r, + /tmp/.X11-unix/X[0-9]* wr, + /run/uuidd/request w, + /proc/sys/kernel/ngroups_max r, + + network, + + dbus(send) bus=session, + dbus(send, receive) bus=accessibility, + + capability ipc_lock, + + # silence warnings for stuff that we really don't want to grant + deny capability dac_override, + deny capability dac_read_search, + #deny /etc/** w, # re-enable once LP#697678 is fixed + deny /usr/** w, + deny /var/crash/ w, +} diff --git a/lightdm-remote-session-x2go.in b/lightdm-remote-session-x2go.in deleted file mode 100644 index db225c3..0000000 --- a/lightdm-remote-session-x2go.in +++ /dev/null @@ -1,85 +0,0 @@ -# vim:syntax=apparmor -# Profile for restricting lightdm remote session for X2Go -# Based on the Guest Account Apparmor script from: -# Author: Martin Pitt -# Mike Gabriel - -#include - -@libexecdir@/x2go-session-wrapper { - #include - #include - #include - /etc/compizconfig/config rw, # bug in compiz https://launchpad.net/bugs/697678 - - / r, - /bin/ rmix, - /bin/fusermount Px, - /bin/** rmix, - /cdrom/ rmix, - /cdrom/** rmix, - /dev/ r, - /dev/** rmw, # audio devices etc. - owner /dev/shm/** rmw, - /etc/ r, - /etc/** rmk, - /etc/gdm/Xsession ix, - /lib/ r, - /lib/** rmixk, - /lib32/ r, - /lib32/** rmixk, - /lib64/ r, - /lib64/** rmixk, - owner /media/ r, - owner /media/** rmwlixk, # we want access to USB sticks and the like - /opt/ r, - /opt/** rmixk, - @{PROC}/ r, - @{PROC}/* rm, - @{PROC}/asound rm, - @{PROC}/asound/** rm, - @{PROC}/ati rm, - @{PROC}/ati/** rm, - owner @{PROC}/** rm, - # needed for gnome-keyring-daemon - @{PROC}/*/status r, - /sbin/ r, - /sbin/** rmixk, - /sys/ r, - /sys/** rm, - /tmp/ rw, - owner /tmp/** rwlkmix, - /usr/ r, - /usr/** rmixk, - /var/ r, - /var/** rmixk, - /var/guest-data/** rw, # allow to store files permanently - /var/tmp/ rw, - owner /var/tmp/** rwlkm, - /{,var/}run/ r, - # necessary for writing to sockets, etc. - /{,var/}run/** rmkix, - /{,var/}run/shm/** wl, - # access to kernel's UUID generator (required by pyhoca-cli) - @{PROC}/sys/kernel/random/uuid r, - /var/lib/libuuid/clock.txt rw, - /run/systemd/journal/dev-log w, - /tmp/**/.x2go-socket r, - /tmp/.X11-unix/X[0-9]* wr, - /run/uuidd/request w, - /proc/sys/kernel/ngroups_max r, - - network, - - dbus(send) bus=session, - dbus(send, receive) bus=accessibility, - - capability ipc_lock, - - # silence warnings for stuff that we really don't want to grant - deny capability dac_override, - deny capability dac_read_search, - #deny /etc/** w, # re-enable once LP#697678 is fixed - deny /usr/** w, - deny /var/crash/ w, -} diff --git a/lightdm-remote-x2go b/lightdm-remote-x2go deleted file mode 100644 index 4a524d1..0000000 --- a/lightdm-remote-x2go +++ /dev/null @@ -1,8 +0,0 @@ -#%PAM-1.0 -auth requisite pam_nologin.so -auth required pam_env.so readenv=1 -auth required pam_env.so readenv=1 envfile=/etc/default/locale -auth required pam_x2go.so -session required pam_limits.so -session required pam_x2go.so - diff --git a/x2go-session-wrapper.c b/x2go-session-wrapper.c deleted file mode 100644 index a640e5c..0000000 --- a/x2go-session-wrapper.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright © 2012-2013 Mike Gabriel - * Copyright © 2012 Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - * Author: Mike Gabriel - * Author libpam-freerdp (where we forked from): Ted Gould - */ - -#include -#include - -int -main (int argc, char * argv[]) -{ - char * args[2]; - args[0] = PKGDATADIR "/x2go-session"; - args[1] = NULL; - - execvp(args[0], args); - - return 0; -} diff --git a/x2go-session.in b/x2go-session.in deleted file mode 100755 index 787f163..0000000 --- a/x2go-session.in +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# -# Copyright © 2012-2013 Mike Gabriel -# Copyright © 2012 Canonical Ltd. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 3, as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranties of -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# Author: Mike Gabriel -# Author lightdm-remote-session-freerdp (where we forked from): Ted Gould -# - -socket="$HOME/.x2go-socket"; -if [ -e "$socket" ]; then - socat unix-connect:"$socket" - | /usr/bin/pyhoca-cli --from-stdin --add-to-known-hosts --kbd-type auto --sound pulse 2>&1 | logger -t lightdm-remote-session-x2go -- -else - zenity --warning --text="Unable to locate X2GoSession/PyHoca socket" -fi; - -rm -f "$socket" diff --git a/x2go.desktop.in b/x2go.desktop.in deleted file mode 100644 index d3c9609..0000000 --- a/x2go.desktop.in +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=X2Go -Comment=Full Screen X2Go Session -Exec=@libexecdir@/x2go-session-wrapper -TryExec=@libexecdir@/x2go-session-wrapper -Icon= -Type=Application -X-LightDM-PAM-Service=lightdm-remote-x2go -- cgit v1.2.3