From 7099005f38ff72fa5de5f245eb15077d8708efd6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 7 Dec 2017 10:52:54 +0100 Subject: Continue development of libpam-freerdp under the name libpam-freerdp2 (with support of FreeRDPv2 API). --- .bzr-builddeb/default.conf | 2 -- .bzrignore | 7 ------- autogen.sh | 6 +++--- configure.ac | 20 +++----------------- debian/changelog | 7 +++++++ debian/control | 29 +++++++++++++---------------- debian/copyright | 8 +++++++- debian/rules | 8 ++++++-- src/Makefile.am | 40 ++++++++++++++++++++-------------------- src/pam-freerdp-children.c | 2 +- src/pam-freerdp.c | 2 +- 11 files changed, 61 insertions(+), 70 deletions(-) delete mode 100644 .bzr-builddeb/default.conf delete mode 100644 .bzrignore diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf deleted file mode 100644 index 6c96a98..0000000 --- a/.bzr-builddeb/default.conf +++ /dev/null @@ -1,2 +0,0 @@ -[BUILDDEB] -split = True diff --git a/.bzrignore b/.bzrignore deleted file mode 100644 index 2e03d57..0000000 --- a/.bzrignore +++ /dev/null @@ -1,7 +0,0 @@ -libpam-freerdp-[0-9].[0-9].[0-9].tar.gz -libpam-freerdp-[0-9].[0-9].[0-9].tar.gz.asc -src/pam_freerdp.la -src/pam_freerdp_la-pam-freerdp.lo -src/pam_freerdp_la-pam-freerdp.o -src/pam-freerdp.la -freerdp-auth-check diff --git a/autogen.sh b/autogen.sh index 5164b66..26c48a5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,9 +1,9 @@ #!/bin/sh -which gnome-autogen.sh || { - echo "Could not find 'gnome-autgen.sh'. Is gnome-common installed?" +which mate-autogen || { + echo "Could not find 'mate-autogen'. Is mate-common installed?" exit 1 } -. gnome-autogen.sh +. mate-autogen diff --git a/configure.ac b/configure.ac index 424c5f9..68656f6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([libpam-freerdp], [1.0.1]) +AC_INIT([libpam-freerdp2], [1.0.1]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.11 -Wno-portability]) @@ -25,27 +25,13 @@ fi # FreeRDP ########################### -PKG_CHECK_MODULES(FREERDP, freerdp) - -########################### -# Local Install -########################### - -with_localinstall="no" -AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], - [install all files locally (for distcheck)]), - with_localinstall=$enableval, - with_localinstall=no) +PKG_CHECK_MODULES(FREERDP2, freerdp2) ########################### # PAM Module dir ########################### -if test "x$with_localinstall" = "xyes"; then - PAMMODULEDIR="${libdir}/security/" -else - PAMMODULEDIR="/lib/security" -fi +PAMMODULEDIR="/lib/security" AC_SUBST(PAMMODULEDIR) ########################### diff --git a/debian/changelog b/debian/changelog index 3c1ef72..3e4bf87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libpam-freerdp2 (1.0.2-0) UNRELEASED; urgency=medium + + * Continue libpam-freerdp under a slightly new name and make things + work and build against freerdp2-dev. + + -- Mike Gabriel Thu, 07 Dec 2017 10:41:09 +0100 + libpam-freerdp (1.0.1+15.04.20141111-0ubuntu1) vivid; urgency=low [ Iain Lane ] diff --git a/debian/control b/debian/control index 67c9908..86457da 100644 --- a/debian/control +++ b/debian/control @@ -1,27 +1,24 @@ -Source: libpam-freerdp +Source: libpam-freerdp2 Section: misc -Priority: extra -Maintainer: Ubuntu Developers +Priority: optional +Maintainer: Artica Project +Uploaders: + Mike Gabriel Build-Depends: debhelper (>= 9), dh-autoreconf, - gnome-common, - libfreerdp-dev (>= 1.1.0~), + mate-common, + freerdp2-dev (>= 2~), libgtest-dev, libpam0g-dev, pkg-config, -Standards-Version: 3.9.4 -Homepage: http://launchpad.net/libpam-freerdp/ -# If you aren't a member of ~freerdp-remote-team but need to upload packaging -# changes, just go ahead. ~freerdp-remote-team will notice and sync up the -# code again. -Vcs-Bzr: https://code.launchpad.net/~freerdp-remote-team/libpam-freerdp/trunk +Standards-Version: 4.1.1 -Package: libpam-freerdp +Package: libpam-freerdp2 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - freerdp-x11, -Description: PAM Module to auth against an RDP server using FreeRDP - Auth and session PAM module that uses FreeRDP to authenticate against - an RDP server as the remote hosts and user. Local account required. + freerdp2-x11, +Description: PAM Module to auth against an RDP server using FreeRDPv2 + Auth and session PAM module that uses FreeRDPv2 to authenticate against + an RDP server as the remote host and user. Local account required. Most useful with the pam-temp-account module. diff --git a/debian/copyright b/debian/copyright index 7446b52..0365099 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,6 +4,13 @@ Source: http://launchpad.net/libpam-freerdp Files: * Copyright: 2012, Canonical Ltd. +License: GPL-3 + +Files: debian/* +Copyright: 2012, Canonical Ltd. + 2017, Mike Gabriel +License: GPL-3 + License: GPL-3 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,4 +26,3 @@ License: GPL-3 . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - diff --git a/debian/rules b/debian/rules index c96a9f0..6aab1ce 100755 --- a/debian/rules +++ b/debian/rules @@ -3,9 +3,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + override_dh_install: - find debian/libpam-freerdp -name '*.a' -delete - find debian/libpam-freerdp -name '*.la' -delete + find debian/libpam-freerdp2 -name '*.a' -delete + find debian/libpam-freerdp2 -name '*.la' -delete dh_install --fail-missing %: diff --git a/src/Makefile.am b/src/Makefile.am index ed9087c..ab46225 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,47 +1,47 @@ - pamlibdir = $(PAMMODULEDIR) -pamlib_LTLIBRARIES = pam_freerdp.la +pamlib_LTLIBRARIES = pam_freerdp2.la -pam_freerdp_la_SOURCES = \ +pam_freerdp2_la_SOURCES = \ auth-check-path.c auth-check-path.h -pam_freerdp_la_LDFLAGS = \ +pam_freerdp2_la_LDFLAGS = \ -no-undefined \ -module \ -avoid-version \ $(COVERAGE_LDFLAGS) -pam_freerdp_la_CFLAGS = \ +pam_freerdp2_la_CFLAGS = \ -Wall -Werror \ - -DAUTH_CHECK="\"$(pkglibexecdir)/freerdp-auth-check\"" \ + -DAUTH_CHECK="\"$(pkglibexecdir)/freerdp2-auth-check\"" \ $(COVERAGE_CFLAGS) -pam_freerdp_la_LIBADD = \ - $(builddir)/libfreerdpcore.la +pam_freerdp2_la_LIBADD = \ + $(builddir)/libfreerdp2core.la noinst_LTLIBRARIES = \ - libfreerdpcore.la + libfreerdp2core.la -libfreerdpcore_la_SOURCES = \ +libfreerdp2core_la_SOURCES = \ pam-freerdp.c \ pam-freerdp-children.c -libfreerdpcore_la_CFLAGS = \ +libfreerdp2core_la_CFLAGS = \ -Wall -Werror \ $(COVERAGE_CFLAGS) -libfreerdpcore_la_LIBADD = \ +libfreerdp2core_la_LIBADD = \ -lpam -libfreerdpcore_la_LDFLAGS = \ +libfreerdp2core_la_LDFLAGS = \ $(COVERAGE_LDFLAGS) pkglibexec_PROGRAMS = \ - freerdp-auth-check + freerdp2-auth-check -freerdp_auth_check_SOURCES = \ +freerdp2_auth_check_SOURCES = \ freerdp-auth-check.c -freerdp_auth_check_CFLAGS = \ - $(FREERDP_CFLAGS) \ +freerdp2_auth_check_CFLAGS = \ + $(FREERDP2_CFLAGS) \ $(COVERAGE_CFLAGS) -freerdp_auth_check_LDADD = \ - $(FREERDP_LIBS) -freerdp_auth_check_LDFLAGS = \ +freerdp2_auth_check_LDADD = \ + $(FREERDP2_LIBS) +freerdp2_auth_check_LDFLAGS = \ + $(FREERDP2_LDFLAGS) \ $(COVERAGE_LDFLAGS) diff --git a/src/pam-freerdp-children.c b/src/pam-freerdp-children.c index ea29c14..3adc068 100644 --- a/src/pam-freerdp-children.c +++ b/src/pam-freerdp-children.c @@ -172,7 +172,7 @@ session_socket_handler (struct passwd * pwdent, int readypipe, const char * ruse memset(&socket_addr, 0, sizeof(struct sockaddr_un)); socket_addr.sun_family = AF_UNIX; strncpy(socket_addr.sun_path, pwdent->pw_dir, sizeof(socket_addr.sun_path) - 1); - strncpy(socket_addr.sun_path + strlen(pwdent->pw_dir), "/.freerdp-socket", (sizeof(socket_addr.sun_path) - strlen(pwdent->pw_dir)) - 1); + strncpy(socket_addr.sun_path + strlen(pwdent->pw_dir), "/.freerdp2-socket", (sizeof(socket_addr.sun_path) - strlen(pwdent->pw_dir)) - 1); /* We bind the socket before forking so that we ensure that there isn't a race condition to get to it. Things will block diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c index ff09ce4..d411f56 100644 --- a/src/pam-freerdp.c +++ b/src/pam-freerdp.c @@ -432,7 +432,7 @@ pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv) #ifdef PAM_STATIC struct pam_module _pam_freerdp_modstruct = { - "pam_freerdp", + "pam_freerdp2", pam_sm_authenticate, pam_sm_setcred, NULL, -- cgit v1.2.3