forked from pool/pam_mount
This commit is contained in:
parent
934bcc0eb5
commit
c5d11fc1d1
@ -1,12 +1,11 @@
|
|||||||
diff -ur ./src/private.h ../pam_mount-new/src/private.h
|
--- src/private.h
|
||||||
--- ./src/private.h 2006-08-06 12:52:46.000000000 -0400
|
+++ src/private.h 2007/10/08 11:36:20
|
||||||
+++ ../pam_mount-new/src/private.h 2007-01-17 14:47:38.000000000 -0500
|
@@ -3,7 +3,7 @@
|
||||||
@@ -36,7 +36,7 @@
|
|
||||||
l0g("pam_mount: %s\n", "I don't like failed system calls -- I quit"); \
|
#include <stdbool.h>
|
||||||
exit(EXIT_FAILURE); \
|
|
||||||
} } while(0)
|
|
||||||
-#define MAX_PAR 127
|
-#define MAX_PAR 127
|
||||||
+#define MAX_PAR 1024
|
+#define MAX_PAR 1024
|
||||||
#define PMPREFIX "pam_mount(" __FILE__ ":" __STRINGIFY(__LINE__) ") "
|
|
||||||
#ifndef S_IRUGO
|
#ifndef S_IRUGO
|
||||||
# define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
|
# define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
|
||||||
|
#endif
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff -ur ./config/pam_mount.conf ../pam_mount-new/config/pam_mount.conf
|
|
||||||
--- ./config/pam_mount.conf 2006-08-07 14:19:45.000000000 -0400
|
|
||||||
+++ ../pam_mount-new/config/pam_mount.conf 2007-01-17 17:03:02.000000000 -0500
|
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
#
|
|
||||||
# Format: debug [ 1 | 0 ]
|
|
||||||
# Local user configuration can override this.
|
|
||||||
-debug 1
|
|
||||||
+debug 0
|
|
||||||
# pmvarrun's debug variable is dictated by the 'pmvarrun' setting below.
|
|
||||||
# to enable pmvarrun debugging, add the -d option to it.
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
diff -ur ../pam_mount-0.18/src/pam_mount.c ./src/pam_mount.c
|
|
||||||
--- src/pam_mount.c 2007-03-12 12:01:49.000000000 -0400
|
|
||||||
+++ src/pam_mount.c 2007-03-12 11:01:53.000000000 -0400
|
|
||||||
@@ -328,7 +328,7 @@
|
|
||||||
log_argv(_argv);
|
|
||||||
|
|
||||||
if(!spawn_apS(NULL, _argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, set_myuid,
|
|
||||||
- user, &pid, NULL, &cstdout, NULL, &err)) {
|
|
||||||
+ NULL, &pid, NULL, &cstdout, NULL, &err)) {
|
|
||||||
l0g(PMPREFIX "error executing /usr/sbin/pmvarrun\n");
|
|
||||||
fnval = -1;
|
|
||||||
goto _return;
|
|
||||||
diff -ur ../pam_mount-0.18/src/pmvarrun.c ./src/pmvarrun.c
|
|
||||||
--- src/pmvarrun.c 2006-07-28 18:43:41.000000000 -0400
|
|
||||||
+++ src/pmvarrun.c 2007-03-12 12:02:22.000000000 -0400
|
|
||||||
@@ -95,6 +95,11 @@
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int user_sanity_check (const char *user)
|
|
||||||
+{
|
|
||||||
+ size_t len = strlen(user);
|
|
||||||
+ return strstr(user, "../") || user[0] == '-' || user[len - 1] == '/';
|
|
||||||
+}
|
|
||||||
|
|
||||||
/* parse_args
|
|
||||||
@argc: number of elements in @argv
|
|
||||||
@@ -129,6 +134,11 @@
|
|
||||||
usage(EXIT_FAILURE, "count string is not valid");
|
|
||||||
break;
|
|
||||||
case 'u':
|
|
||||||
+ if (user_sanity_check (optarg)) {
|
|
||||||
+ fprintf(stderr, "Invalid user name\n");
|
|
||||||
+ exit (EXIT_FAILURE);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
g_strlcpy(settings->user, optarg,
|
|
||||||
sizeof(settings->user));
|
|
||||||
break;
|
|
@ -1,7 +1,9 @@
|
|||||||
--- scripts/umount.crypt
|
Index: scripts/umount.crypt
|
||||||
+++ scripts/umount.crypt 2007/09/21 09:14:07
|
===================================================================
|
||||||
@@ -57,9 +57,19 @@
|
--- scripts/umount.crypt.orig
|
||||||
exit 1;
|
+++ scripts/umount.crypt
|
||||||
|
@@ -54,9 +54,20 @@ if [ -z "$DMDEVICE" ]; then
|
||||||
|
exit 1;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
+# kill remaining user processes if we're unmounting a user's home dir
|
+# kill remaining user processes if we're unmounting a user's home dir
|
||||||
@ -12,24 +14,25 @@
|
|||||||
+ lsof -t $1 | xargs kill -9 &> /dev/null
|
+ lsof -t $1 | xargs kill -9 &> /dev/null
|
||||||
+ sleep 1
|
+ sleep 1
|
||||||
+fi
|
+fi
|
||||||
|
+
|
||||||
+
|
+
|
||||||
# ask cryptsetup about the underlying device
|
# ask cryptsetup about the underlying device
|
||||||
#
|
#
|
||||||
REALDEVICE=` "$CRYPTSETUP" status "$DMDEVICE" | sed -n '/device/s/[ ]*device:[ ]*//p'`;
|
REALDEVICE=`cryptsetup status "$DMDEVICE" | sed -n '/device/s/[ ]*device:[ ]*//p'`;
|
||||||
+IMGDEVICE=`"$LOSETUP" -a | grep "$REALDEVICE" | awk -F\( '{ print $2 }' | sed 's/)//'`
|
+IMGDEVICE=`"$LOSETUP" -a | grep "$REALDEVICE" | awk -F\( '{ print $2 }' | sed 's/)//'`
|
||||||
|
|
||||||
"$UMOUNT" "$1";
|
for ((x = 5; x >= 0; --x)); do
|
||||||
if [ $? -ne 0 ]; then
|
fuser -m "$1" || break;
|
||||||
@@ -69,7 +79,7 @@
|
@@ -72,7 +83,7 @@ fi
|
||||||
|
|
||||||
# Check for LUKS
|
# Check for LUKS
|
||||||
#
|
#
|
||||||
-if "$CRYPTSETUP" isLuks "$DEVICE" 2>/dev/null; then
|
-if cryptsetup isLuks "$DEVICE" 2>/dev/null; then
|
||||||
+if "$CRYPTSETUP" isLuks "$REALDEVICE" 2>/dev/null; then
|
+if cryptsetup isLuks "$REALDEVICE" 2>/dev/null; then
|
||||||
"$CRYPTSETUP" luksClose "$DMDEVICE";
|
cryptsetup luksClose "$DMDEVICE";
|
||||||
else
|
else
|
||||||
"$CRYPTSETUP" remove "$DMDEVICE";
|
cryptsetup remove "$DMDEVICE";
|
||||||
@@ -87,3 +97,12 @@
|
@@ -90,3 +101,12 @@ if echo "$REALDEVICE" | grep ^/dev/loop
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:efaac862ccc18ebd49a2f4c10d78bbb6f15a47fb3f6426c07cee51497d5b9797
|
|
||||||
size 294620
|
|
3
pam_mount-0.29.tar.bz2
Normal file
3
pam_mount-0.29.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a36f7493563cf2b4f9b801d830ae084d380af174e28efce9ee3cdda710fbe1fd
|
||||||
|
size 292007
|
@ -1,11 +0,0 @@
|
|||||||
--- src/pam_mount.c
|
|
||||||
+++ src/pam_mount.c
|
|
||||||
@@ -328,7 +328,7 @@
|
|
||||||
log_argv(_argv);
|
|
||||||
|
|
||||||
if(!spawn_apS(NULL, _argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, set_myuid,
|
|
||||||
- NULL, &pid, NULL, &cstdout, NULL, &err)) {
|
|
||||||
+ user, &pid, NULL, &cstdout, NULL, &err)) {
|
|
||||||
l0g(PMPREFIX "error executing /usr/sbin/pmvarrun\n");
|
|
||||||
fnval = -1;
|
|
||||||
goto _return;
|
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 8 13:47:45 CEST 2007 - mc@suse.de
|
||||||
|
|
||||||
|
- update to version 0.29
|
||||||
|
* pam_mount switched to an XML configuration.
|
||||||
|
* added truecrypt support
|
||||||
|
* add an "invert" attribute
|
||||||
|
* split group matching into multiple attributes
|
||||||
|
* properly detect loop64 support
|
||||||
|
* NT domain placeholders
|
||||||
|
* Implement the "soft_try_pass" option
|
||||||
|
* add "nullok" option
|
||||||
|
* --keyfile option added to mount.crypt
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 21 11:39:03 CEST 2007 - mc@suse.de
|
Fri Sep 21 11:39:03 CEST 2007 - mc@suse.de
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package pam_mount (Version 0.18)
|
# spec file for package pam_mount (Version 0.29)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
@ -11,23 +11,21 @@
|
|||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
Name: pam_mount
|
Name: pam_mount
|
||||||
BuildRequires: glib2-devel openssl-devel pam-devel zlib-devel
|
BuildRequires: glib2-devel libHX10-devel libxml2-devel openssl-devel pam-devel perl-XML-Writer zlib-devel
|
||||||
Summary: A PAM Module that can Mount Volumes for a User Session.
|
Summary: A PAM Module that can Mount Volumes for a User Session
|
||||||
Version: 0.18
|
Version: 0.29
|
||||||
Release: 83
|
Release: 1
|
||||||
Requires: lsof coreutils util-linux
|
Requires: lsof coreutils util-linux
|
||||||
Recommends: cryptsetup
|
Recommends: cryptsetup
|
||||||
License: LGPL v2 or later
|
License: LGPL v2 or later
|
||||||
Prefix: /usr
|
Prefix: /usr
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Patch0: pam_mount-chownuid-fix.diff
|
|
||||||
Patch1: pam_mount-0.18-umount-home-dir.dif
|
Patch1: pam_mount-0.18-umount-home-dir.dif
|
||||||
Patch2: pam_mount-0.18-bump-max-par.diff
|
Patch2: pam_mount-0.18-bump-max-par.diff
|
||||||
Patch3: pam_mount-0.18-disable-debug.diff
|
|
||||||
Patch4: pam_mount-0.18-fix-pmvarrun-ref-count.dif
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Url: http://pam-mount.sourceforge.net/
|
Url: http://pam-mount.sourceforge.net/
|
||||||
|
PreReq: coreutils, perl-XML-Writer
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This module is aimed at environments with SMB (Samba or Windows NT) or
|
This module is aimed at environments with SMB (Samba or Windows NT) or
|
||||||
@ -60,34 +58,43 @@ include it and send me patches.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
%patch3
|
|
||||||
%patch4
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure \
|
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure \
|
||||||
--prefix=%{_prefix} --with-slibdir=/%{_lib} --mandir=%{_mandir}
|
--prefix=%{_prefix} --with-slibdir=/%{_lib} --mandir=%{_mandir} \
|
||||||
|
--sysconfdir=%{_sysconfdir}
|
||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make install DESTDIR=${RPM_BUILD_ROOT}
|
make install DESTDIR=${RPM_BUILD_ROOT}
|
||||||
# Remove static and libtool version
|
# Remove static and libtool version
|
||||||
rm ${RPM_BUILD_ROOT}/%{_lib}/security/pam_mount.{a,la}
|
rm -f ${RPM_BUILD_ROOT}/%{_lib}/security/pam_mount.{a,la}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/security
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/security
|
||||||
cp config/pam_mount.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/security
|
|
||||||
# remove mount_ehd, it's only for OpenBSD
|
# remove mount_ehd, it's only for OpenBSD
|
||||||
rm $RPM_BUILD_ROOT%{_prefix}/bin/mount_ehd
|
rm $RPM_BUILD_ROOT%{_prefix}/bin/mount_ehd
|
||||||
rm $RPM_BUILD_ROOT%{_mandir}/man8/mount_ehd.8
|
rm $RPM_BUILD_ROOT%{_mandir}/man8/mount_ehd.8
|
||||||
|
#install the docs
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}/%_docdir/%{name}/examples
|
||||||
|
cp doc/bugs.txt doc/changelog.txt LICENSE* doc/faq.txt doc/todo.txt doc/options.txt doc/pam_mount.txt ${RPM_BUILD_ROOT}/%_docdir/%name/
|
||||||
|
install -m 755 scripts/convert_pam_mount_conf.pl ${RPM_BUILD_ROOT}/%_docdir/%{name}/examples/
|
||||||
|
|
||||||
|
%post
|
||||||
|
if [ -e etc/security/pam_mount.conf ]
|
||||||
|
then
|
||||||
|
cp etc/security/pam_mount.conf.xml %_docdir/%{name}/examples/
|
||||||
|
%_docdir/%{name}/examples/convert_pam_mount_conf.pl \
|
||||||
|
-i etc/security/pam_mount.conf -o etc/security/pam_mount.conf.xml
|
||||||
|
fi
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc AUTHORS COPYING NEWS README FAQ
|
%docdir %_docdir/%name
|
||||||
|
%_docdir/%name
|
||||||
/%{_lib}/security/pam_mount*.so
|
/%{_lib}/security/pam_mount*.so
|
||||||
%{_prefix}/bin/mkehd
|
%{_prefix}/bin/mkehd
|
||||||
%{_prefix}/bin/autoehd
|
%{_prefix}/bin/autoehd
|
||||||
@ -95,7 +102,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/sbin/mount.crypt
|
/sbin/mount.crypt
|
||||||
/sbin/umount.crypt
|
/sbin/umount.crypt
|
||||||
%{_sbindir}/pmvarrun
|
%{_sbindir}/pmvarrun
|
||||||
%config(noreplace) %{_sysconfdir}/security/pam_mount.conf
|
%config(noreplace) %{_sysconfdir}/security/pam_mount.conf.xml
|
||||||
%doc %{_mandir}/man1/mkehd.1.gz
|
%doc %{_mandir}/man1/mkehd.1.gz
|
||||||
%doc %{_mandir}/man8/autoehd.8.gz
|
%doc %{_mandir}/man8/autoehd.8.gz
|
||||||
%doc %{_mandir}/man8/mount.crypt.8.gz
|
%doc %{_mandir}/man8/mount.crypt.8.gz
|
||||||
@ -104,6 +111,17 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc %{_mandir}/man8/pmvarrun.8.gz
|
%doc %{_mandir}/man8/pmvarrun.8.gz
|
||||||
%doc %{_mandir}/man8/umount.crypt.8.gz
|
%doc %{_mandir}/man8/umount.crypt.8.gz
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 08 2007 - mc@suse.de
|
||||||
|
- update to version 0.29
|
||||||
|
* pam_mount switched to an XML configuration.
|
||||||
|
* added truecrypt support
|
||||||
|
* add an "invert" attribute
|
||||||
|
* split group matching into multiple attributes
|
||||||
|
* properly detect loop64 support
|
||||||
|
* NT domain placeholders
|
||||||
|
* Implement the "soft_try_pass" option
|
||||||
|
* add "nullok" option
|
||||||
|
* --keyfile option added to mount.crypt
|
||||||
* Fri Sep 21 2007 - mc@suse.de
|
* Fri Sep 21 2007 - mc@suse.de
|
||||||
- remove the loopdevice for the image too
|
- remove the loopdevice for the image too
|
||||||
[#326802]
|
[#326802]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user