Hello community,
here is the log from the commit of package pam_mount for openSUSE:Factory
checked in at Fri Dec 18 15:14:28 CET 2009.
--------
--- pam_mount/pam_mount.changes 2009-11-19 11:16:07.000000000 +0100
+++ pam_mount/pam_mount.changes 2009-12-18 13:16:33.000000000 +0100
@@ -1,0 +2,11 @@
+Fri Dec 18 13:14:17 CET 2009 - mc@suse.de
+
+- update to version 1.32
+ * luserconf: fix skipping luser volume mounting
+ * config: allow arbitrary source paths for tmpfs
+ * fix a potential strlen(NULL) on login
+ * umount.crypt: do not remove entry from /etc/mtab twice
+ * luserconf: delayed parsing and mounting of luserconf volumes
+ * documentation fixes
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
pam_mount-1.27-fix-krb5-env.dif
pam_mount-1.27-fix-mtab-handling.dif
pam_mount-1.27-fix-sudo-crash.dif
pam_mount-1.27-uid_guid-handling.dif
pam_mount-1.27.tar.bz2
New:
----
pam_mount-1.32.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pam_mount.spec ++++++
--- /var/tmp/diff_new_pack.V2TZKD/_old 2009-12-18 15:14:05.000000000 +0100
+++ /var/tmp/diff_new_pack.V2TZKD/_new 2009-12-18 15:14:05.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package pam_mount (Version 1.27)
+# spec file for package pam_mount (Version 1.32)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -22,16 +22,16 @@
BuildRequires: perl-XML-Parser perl-XML-Writer
BuildRequires: libtool pam-devel >= 0.99 pkg-config >= 0.19
BuildRequires: libxml2-devel >= 2.6 openssl-devel >= 0.9.8
-BuildRequires: libHX-devel >= 2.8
+BuildRequires: libHX-devel >= 3.0.1
BuildRequires: linux-kernel-headers >= 2.6
Summary: A PAM Module that can Mount Volumes for a User Session
-Version: 1.27
-Release: 2
+Version: 1.32
+Release: 1
# psmisc: /bin/fuser
Recommends: cryptsetup
Recommends: cifs-mount xfsprogs
Requires: util-linux
-License: LGPL v2.1 or later
+License: LGPLv2.1+
Prefix: /usr
Group: System/Libraries
Source: %{name}-%{version}.tar.bz2
@@ -40,10 +40,6 @@
Source3: mount.crypt
Source4: mount.encfs13
Patch1: pam_mount-0.47-enable-logout-kill.dif
-Patch2: pam_mount-1.27-fix-sudo-crash.dif
-Patch3: pam_mount-1.27-fix-mtab-handling.dif
-Patch4: pam_mount-1.27-uid_guid-handling.dif
-Patch5: pam_mount-1.27-fix-krb5-env.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://pam-mount.sourceforge.net/
PreReq: coreutils, perl-XML-Writer, perl-XML-Parser
@@ -64,10 +60,6 @@
%prep
%setup -q
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
%build
%{suse_update_config -f}
++++++ pam_mount-0.47-enable-logout-kill.dif ++++++
--- /var/tmp/diff_new_pack.V2TZKD/_old 2009-12-18 15:14:05.000000000 +0100
+++ /var/tmp/diff_new_pack.V2TZKD/_new 2009-12-18 15:14:05.000000000 +0100
@@ -1,8 +1,8 @@
-Index: pam_mount-1.27/config/pam_mount.conf.xml
+Index: pam_mount-1.32/config/pam_mount.conf.xml
===================================================================
---- pam_mount-1.27.orig/config/pam_mount.conf.xml
-+++ pam_mount-1.27/config/pam_mount.conf.xml
-@@ -29,7 +29,7 @@
+--- pam_mount-1.32.orig/config/pam_mount.conf.xml
++++ pam_mount-1.32/config/pam_mount.conf.xml
+@@ -33,7 +33,7 @@
<mntoptions require="nosuid,nodev" />
<path>/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</path>
++++++ pam_mount-1.27.tar.bz2 -> pam_mount-1.32.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/config/pam_mount.conf.xml new/pam_mount-1.32/config/pam_mount.conf.xml
--- old/pam_mount-1.27/config/pam_mount.conf.xml 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/config/pam_mount.conf.xml 2009-09-21 21:18:22.000000000 +0200
@@ -6,13 +6,17 @@
+ <!-- debug should come before everything else,
+ since this file is still processed in a single pass
+ from top-to-bottom -->
+
+<debug enable="0" />
<!-- Volume definitions -->
<!-- pam_mount parameters: General tunables -->
-<debug enable="0" />
<!--
<luserconf name=".pam_mount.conf.xml" />
-->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/configure new/pam_mount-1.32/configure
--- old/pam_mount-1.27/configure 2009-07-01 03:09:15.000000000 +0200
+++ new/pam_mount-1.32/configure 2009-09-21 21:57:59.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for pam_mount 1.27.
+# Generated by GNU Autoconf 2.63 for pam_mount 1.32.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@
# Identity of this package.
PACKAGE_NAME='pam_mount'
PACKAGE_TARNAME='pam_mount'
-PACKAGE_VERSION='1.27'
-PACKAGE_STRING='pam_mount 1.27'
+PACKAGE_VERSION='1.32'
+PACKAGE_STRING='pam_mount 1.32'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -1497,7 +1497,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pam_mount 1.27 to adapt to many kinds of systems.
+\`configure' configures pam_mount 1.32 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1567,7 +1567,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pam_mount 1.27:";;
+ short | recursive ) echo "Configuration of pam_mount 1.32:";;
esac
cat <<\_ACEOF
@@ -1683,7 +1683,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pam_mount configure 1.27
+pam_mount configure 1.32
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1697,7 +1697,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pam_mount $as_me 1.27, which was
+It was created by pam_mount $as_me 1.32, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2065,7 +2065,7 @@
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-PACKAGE_RELDATE="2009-07-01"
+PACKAGE_RELDATE="2009-09-21"
ac_config_headers="$ac_config_headers config.h"
@@ -2551,7 +2551,7 @@
# Define the identity of the package.
PACKAGE='pam_mount'
- VERSION='1.27'
+ VERSION='1.32'
cat >>confdefs.h <<_ACEOF
@@ -12095,12 +12095,12 @@
pkg_cv_libHX_CFLAGS="$libHX_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libHX >= 2.8\"") >&5
- ($PKG_CONFIG --exists --print-errors "libHX >= 2.8") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libHX >= 3.0.1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libHX >= 3.0.1") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_libHX_CFLAGS=`$PKG_CONFIG --cflags "libHX >= 2.8" 2>/dev/null`
+ pkg_cv_libHX_CFLAGS=`$PKG_CONFIG --cflags "libHX >= 3.0.1" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12111,12 +12111,12 @@
pkg_cv_libHX_LIBS="$libHX_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libHX >= 2.8\"") >&5
- ($PKG_CONFIG --exists --print-errors "libHX >= 2.8") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libHX >= 3.0.1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libHX >= 3.0.1") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_libHX_LIBS=`$PKG_CONFIG --libs "libHX >= 2.8" 2>/dev/null`
+ pkg_cv_libHX_LIBS=`$PKG_CONFIG --libs "libHX >= 3.0.1" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12134,14 +12134,14 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- libHX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libHX >= 2.8" 2>&1`
+ libHX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libHX >= 3.0.1" 2>&1`
else
- libHX_PKG_ERRORS=`$PKG_CONFIG --print-errors "libHX >= 2.8" 2>&1`
+ libHX_PKG_ERRORS=`$PKG_CONFIG --print-errors "libHX >= 3.0.1" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$libHX_PKG_ERRORS" >&5
- { { $as_echo "$as_me:$LINENO: error: Package requirements (libHX >= 2.8) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements (libHX >= 3.0.1) were not met:
$libHX_PKG_ERRORS
@@ -12152,7 +12152,7 @@
and libHX_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-$as_echo "$as_me: error: Package requirements (libHX >= 2.8) were not met:
+$as_echo "$as_me: error: Package requirements (libHX >= 3.0.1) were not met:
$libHX_PKG_ERRORS
@@ -13170,7 +13170,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by pam_mount $as_me 1.27, which was
+This file was extended by pam_mount $as_me 1.32, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13233,7 +13233,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-pam_mount config.status 1.27
+pam_mount config.status 1.32
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/configure.ac new/pam_mount-1.32/configure.ac
--- old/pam_mount-1.27/configure.ac 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/configure.ac 2009-09-21 21:18:22.000000000 +0200
@@ -7,8 +7,8 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
-AC_INIT([pam_mount], [1.27])
-PACKAGE_RELDATE="2009-07-01"
+AC_INIT([pam_mount], [1.32])
+PACKAGE_RELDATE="2009-09-21"
AC_PREREQ([2.59])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
@@ -55,7 +55,7 @@
[#include ])
AC_CHECK_FUNCS([getmntent getmntinfo])
-PKG_CHECK_MODULES([libHX], [libHX >= 2.8])
+PKG_CHECK_MODULES([libHX], [libHX >= 3.0.1])
PKG_CHECK_MODULES([libxml], [libxml-2.0 >= 2.6])
PKG_CHECK_MODULES([libcrypto], [libcrypto >= 0.9.8],
[AC_DEFINE_UNQUOTED([HAVE_LIBCRYPTO], [1],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/dist/pam_mount.spec new/pam_mount-1.32/dist/pam_mount.spec
--- old/pam_mount-1.27/dist/pam_mount.spec 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/dist/pam_mount.spec 2009-09-21 21:18:22.000000000 +0200
@@ -1,6 +1,6 @@
Name: pam_mount
-Version: 1.27
+Version: 1.32
Release: 0
Group: System/Libraries
Summary: A PAM module that can mount volumes for a user session
@@ -10,7 +10,7 @@
Source: http://downloads.sf.net/pam-mount/%name-%version.tar.bz2
BuildRequires: libtool, pam-devel >= 0.99, pkg-config >= 0.19
BuildRequires: openssl-devel >= 0.9.8, libxml2-devel >= 2.6
-BuildRequires: libHX-devel >= 2.8
+BuildRequires: libHX-devel >= 3.0.1
%if "%_vendor" == "suse"
BuildRequires: linux-kernel-headers >= 2.6
Recommends: cifs-mount xfsprogs
@@ -67,3 +67,5 @@
%policy %_sysconfdir/selinux/strict/src/policy/macros/%{name}_macros.te
%policy %_sysconfdir/selinux/strict/src/policy/file_contexts/misc/%name.fc
%endif
+
+%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/doc/changelog.txt new/pam_mount-1.32/doc/changelog.txt
--- old/pam_mount-1.27/doc/changelog.txt 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/doc/changelog.txt 2009-09-21 21:18:22.000000000 +0200
@@ -2,6 +2,34 @@
For details, see the history as recorded in the git repository.
+v1.32 (September 21 2009)
+=========================
+Fixes:
+- luserconf: fix skipping luser volume mounting
+- config: allow arbitrary source paths for tmpfs
+
+
+v1.31 (September 02 2009)
+=========================
+Fixes:
+- pam_mount: fix a potential strlen(NULL) on login
+
+
+v1.30 (August 27 2009)
+======================
+Fixes:
+- pam_mount: avoid crash in sudo by not calling setenv() with NULL
+- pam_mount: unwind krb5 environment info at the right time
+- umount.crypt: do not remove entry from /etc/mtab twice
+- doc: mount.crypt has no defaults for fsk_cipher and fsk_hash
+- doc: pmt-ehd defaults to using SHA1 hash
+- doc: mention preferred location of <debug>
+Changes:
+- config: move <debug> to top
+Enhancements:
+- luserconf: delayed parsing and mounting of luserconf volumes
+
+
v1.27 (July 01 2009)
====================
Changes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/doc/mount.crypt.8 new/pam_mount-1.32/doc/mount.crypt.8
--- old/pam_mount-1.27/doc/mount.crypt.8 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/doc/mount.crypt.8 2009-09-21 21:18:22.000000000 +0200
@@ -41,10 +41,10 @@
Run fsck on the container before mounting it.
.TP
\fBfsk_cipher\fP
-The OpenSSL cipher used for the filesystem key. The default is "aes\-256\-cbc".
+The OpenSSL cipher used for the filesystem key.
.TP
\fBfsk_hash\fP
-The OpenSSL hash used for producing key and IV. The default is "md5".
+The OpenSSL hash used for producing key and IV.
.TP
\fBfstype\fP
The exact type of filesystem in the encrypted container. The default is to let
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/doc/pam_mount.conf.5.in new/pam_mount-1.32/doc/pam_mount.conf.5.in
--- old/pam_mount-1.27/doc/pam_mount.conf.5.in 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/doc/pam_mount.conf.5.in 2009-09-21 21:18:22.000000000 +0200
@@ -155,7 +155,9 @@
Enables verbose output during login to stderr and syslog. Some programs do not
cope with output sent on stderr, see doc/bugs.txt for a list. \fB0\fP disables
debugging, \fB1\fP enables pam_mount tracing, and \fB2\fP additionally enables
-tracing in mount.crypt. The default is \fB0\fP.
+tracing in mount.crypt. The default is \fB0\fP. As the config file is parsed
+linearly, the <debug> directive takes effect once it is seen - it it thus
+advised to put it near the start of the file, before any <volume> definitions.
.TP
\fB<logout wait="\fP\fImicroseconds\fP\fB" hup="\fP\fIyes/no\fP\fB" term="\fP\fIyes/no\fP\fB" kill="\fP\fIyes/no\fP\fB" />\fP
Programs exist that do not terminate when the session is closed. (This applies
@@ -169,10 +171,13 @@
Individual users may define additional volumes (usually in
~/.pam_mount.conf.xml) to mount if allowed by the master configuration file by
the presence of the \fB<luserconf>\fP element. With it, users may mount and
-unmount \fBany\fP volumes they specify - the mount process is called \fBas
-superuser\fP. On some filesystem configurations this may be a security flaw so
+unmount any volumes they specify that they have ownership of (in case of
+local mounts) - the mount process is called \fBas
+superuser\fP. On some filesystem configurations this may be a security risk so
user-defined volumes are not allowed by the default pam_mount.conf.xml
-distributed with pam_mount.
+distributed with pam_mount. Luserconfigs are parsed after any volumes from
+the global configuration file are mounted, so mounting home directories with a
+global config and then mounting further volumes from luserconfigs is possible.
.TP
\fB<mntoptions allow="\fP\fIoptions,...\fP\fB" />\fP
The <mntoptions> elements determine which options may be specified in per\-user
@@ -370,7 +375,7 @@
Volatile tmpfs mount with restricted size (thanks to Mike Hommey for this
example):
.PP
-
#include
#include
-#include
#include
#include
+#include
#include
#include
#include "pam_mount.h"
@@ -140,7 +140,7 @@
* Expands @arg according to @vinfo and adds it to the @argq list.
*/
void arglist_add(struct HXdeque *argq, const char *arg,
- const struct HXbtree *vinfo)
+ const struct HXformat_map *vinfo)
{
char *filled;
@@ -165,7 +165,7 @@
* and returns the result, suitable for spawn_qstart().
*/
struct HXdeque *arglist_build(const struct HXdeque *cmd,
- const struct HXbtree *vinfo)
+ const struct HXformat_map *vinfo)
{
const struct HXdeque_node *n;
struct HXdeque *aq;
@@ -209,7 +209,7 @@
* part of @v, and hence, will not go out of scope as long as %(DOMAIN_*) is
* in @v.
*/
-void misc_add_ntdom(struct HXbtree *v, const char *user)
+void misc_add_ntdom(struct HXformat_map *v, const char *user)
{
char *ptr, *tmp;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/mount-bsd.c new/pam_mount-1.32/src/mount-bsd.c
--- old/pam_mount-1.27/src/mount-bsd.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/mount-bsd.c 2009-09-21 21:18:22.000000000 +0200
@@ -30,7 +30,7 @@
#endif
int pmt_already_mounted(const struct config *config,
- const struct vol *vpt, struct HXbtree *vinfo)
+ const struct vol *vpt, struct HXformat_map *vinfo)
{
hxmc_t *dev;
bool mounted = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/mount-sysv.c new/pam_mount-1.32/src/mount-sysv.c
--- old/pam_mount-1.27/src/mount-sysv.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/mount-sysv.c 2009-09-21 21:18:22.000000000 +0200
@@ -15,7 +15,7 @@
#include "pam_mount.h"
int pmt_already_mounted(const struct config *const config,
- const struct vol *vpt, struct HXbtree *vinfo)
+ const struct vol *vpt, struct HXformat_map *vinfo)
{
int (*xcmp)(const char *, const char *);
hxmc_t *dev;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/mount.c new/pam_mount-1.32/src/mount.c
--- old/pam_mount-1.27/src/mount.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/mount.c 2009-09-21 21:18:22.000000000 +0200
@@ -21,7 +21,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -31,9 +30,7 @@
#include "pam_mount.h"
/* Functions */
-static int fstype_nodev(const char *);
static inline bool mkmountpoint(struct vol *, const char *);
-static void run_ofl(const struct config * const, struct HXbtree *);
//-----------------------------------------------------------------------------
/**
@@ -49,7 +46,7 @@
*/
static void log_output(int fd, const char *cmsg)
{
- char buf[BUFSIZ + 1];
+ hxmc_t *buf = NULL;
FILE *fp;
if ((fp = fdopen(fd, "r")) == NULL) {
@@ -60,7 +57,7 @@
setvbuf(fp, NULL, _IOLBF, 0);
do {
- if (fgets(buf, sizeof(buf), fp) == NULL)
+ if (HX_getl(&buf, fp) == NULL)
break;
HX_chomp(buf);
if (*buf != '\0' && cmsg != NULL) {
@@ -71,6 +68,7 @@
l0g("%s\n", buf);
} while (true);
fclose(fp);
+ HXmc_free(buf);
}
/**
@@ -81,16 +79,18 @@
* Runs `ofl` on a directory/mountpoint and logs its output, for debugging
* purposes.
*/
-static void run_ofl(const struct config *const config, struct HXbtree *vinfo)
+static void run_ofl(const struct config *const config,
+ struct HXformat_map *vinfo)
{
- const char *mntpt;
+ hxmc_t *mntpt = NULL;
struct stat sb;
- mntpt = HXbtree_get(vinfo, "MNTPT");
- if (stat(mntpt, &sb) < 0 && errno == ENOENT)
- return;
- ofl_printf = misc_warn;
- ofl(mntpt, 0);
+ HXformat_aprintf(vinfo, &mntpt, "%(MNTPT)");
+ if (!(stat(mntpt, &sb) < 0 && errno == ENOENT)) {
+ ofl_printf = misc_warn;
+ ofl(mntpt, 0);
+ }
+ HXmc_free(mntpt);
}
/**
@@ -108,7 +108,7 @@
/* elsewhere */
#else
int pmt_already_mounted(const struct config *const config,
- const struct vol *vpt, struct HXbtree *vinfo)
+ const struct vol *vpt, struct HXformat_map *vinfo)
{
l0g("check for previous mount not implemented on arch.\n");
return -1;
@@ -305,7 +305,7 @@
* Returns zero on error, positive non-zero for success.
*/
int do_unmount(const struct config *config, struct vol *vpt,
- struct HXbtree *vinfo, const char *const password)
+ struct HXformat_map *vinfo, const char *const password)
{
struct HXdeque *argv;
struct HXproc proc;
@@ -365,7 +365,7 @@
}
static int check_filesystem(const struct config *config, const struct vol *vpt,
- struct HXbtree *vinfo)
+ struct HXformat_map *vinfo)
{
/* PRE: config points to a valid struct config
* config->volume[vol] is a valid struct vol
@@ -434,7 +434,7 @@
* @vinfo: variable substituions
*/
static void mount_set_fsck(const struct config *config,
- const struct vol *vol, struct HXbtree *vinfo)
+ const struct vol *vol, struct HXformat_map *vinfo)
{
const struct HXdeque_node *i;
hxmc_t *string, *current;
@@ -462,12 +462,12 @@
* @config: current config
* @vpt: volume descriptor
* @vinfo:
- * @password: login password
+ * @password: login password (may be %NULL)
*
* Returns zero on error, positive non-zero for success.
*/
int do_mount(const struct config *config, struct vol *vpt,
- struct HXbtree *vinfo, const char *password)
+ struct HXformat_map *vinfo, const char *password)
{
const struct HXdeque_node *n;
struct HXdeque *argv;
@@ -476,7 +476,6 @@
int ret;
assert(vinfo != NULL);
- assert(password != NULL);
ret = pmt_already_mounted(config, vpt, vinfo);
if (ret < 0) {
@@ -575,7 +574,7 @@
struct vol *vpt, const char *password)
{
int fnval;
- struct HXbtree *vinfo;
+ struct HXformat_map *vinfo;
struct passwd *pe;
hxmc_t *options;
char real_mpt[PATH_MAX+1];
@@ -643,7 +642,8 @@
* Returns 1 if the filesystem does not require a block device, 0 if it does
* require a block device, -1 if we could not find out.
*/
-static int fstype_nodev(const char *name) {
+int fstype_nodev(const char *name)
+{
char buf[80];
FILE *fp;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/mtcrypt.c new/pam_mount-1.32/src/mtcrypt.c
--- old/pam_mount-1.27/src/mtcrypt.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/mtcrypt.c 2009-09-21 21:18:22.000000000 +0200
@@ -563,9 +563,8 @@
umount_args[argk++] = "umount";
#ifdef __linux__
- umount_args[argk++] = "-i";
- if (opt->no_update)
- umount_args[argk++] = "-n";
+ /* Always pass in -n, as we manually edit /etc/mtab */
+ umount_args[argk++] = "-ni";
#endif
umount_args[argk++] = mountpoint;
umount_args[argk] = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/pam_mount.c new/pam_mount-1.32/src/pam_mount.c
--- old/pam_mount-1.27/src/pam_mount.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/pam_mount.c 2009-09-21 21:18:22.000000000 +0200
@@ -1,7 +1,7 @@
/*
* pam_mount
* Copyright (C) Elvis Pfützenreuter , 2000
- * Copyright © Jan Engelhardt, 2005 - 2008
+ * Copyright © Jan Engelhardt, 2005 - 2009
* Copyright © Bastian Kleineidam, 2005
*
* This file is part of pam_mount; you can redistribute it and/or
@@ -393,7 +393,7 @@
char *operation)
{
FILE *fp = NULL;
- struct HXbtree *vinfo;
+ struct HXformat_map *vinfo;
struct HXdeque *argv;
struct HXproc proc;
int ret = -1, use_count;
@@ -436,6 +436,67 @@
}
/**
+ * grab_authtok - get the password from PAM
+ */
+static char *grab_authtok(pam_handle_t *pamh)
+{
+ char *system_authtok = NULL;
+ int ret;
+
+ ret = pam_get_data(pamh, "pam_mount_system_authtok",
+ static_cast(const void **, static_cast(void *, &system_authtok)));
+ if (ret != PAM_SUCCESS) {
+ if (Args.get_pw_interactive) {
+ ret = read_password(pamh, Config.msg_sessionpw,
+ &system_authtok);
+ if (ret != PAM_SUCCESS)
+ l0g("warning: could not obtain password "
+ "interactively either\n");
+ }
+ /*
+ * Proceed without a password. Some volumes may not need one,
+ * e.g. bind mounts and networked/unencrypted volumes.
+ */
+ }
+ if (system_authtok == NULL)
+ system_authtok = xstrdup("");
+ return system_authtok;
+}
+
+static int process_volumes(struct config *config, const char *authtok)
+{
+ int ret = PAM_SUCCESS;
+ struct vol *vol;
+
+ HXlist_for_each_entry(vol, &config->volume_list, list) {
+ /*
+ * Remember what we processed already - the function can
+ * be called multiple times.
+ */
+ if (vol->mnt_processed)
+ continue;
+ vol->mnt_processed = true;
+ /*
+ * luserconf_volume_record_sane() is called here so that a user
+ * can nest loopback images. otherwise ownership tests will
+ * fail if parent loopback image not yet mounted.
+ * volume_record_sane() is here to be consistent.
+ */
+ if (!volume_record_sane(config, vol))
+ continue;
+ if (!vol->globalconf &&
+ !luserconf_volume_record_sane(config, vol))
+ continue;
+
+ if (!mount_op(do_mount, config, vol, authtok)) {
+ l0g("mount of %s failed\n", znul(vol->volume));
+ ret = PAM_SERVICE_ERR;
+ }
+ }
+ return ret;
+}
+
+/**
* pam_sm_open_session -
* @pamh: PAM handle
* @flags: PAM flags
@@ -449,9 +510,8 @@
PAM_EXTERN EXPORT_SYMBOL int pam_sm_open_session(pam_handle_t *pamh, int flags,
int argc, const char **argv)
{
- struct vol *vol;
int ret;
- unsigned int krb5_set;
+ const char *krb5;
char *system_authtok = NULL;
const void *tmp;
int getval;
@@ -464,11 +524,17 @@
w4rn(PACKAGE_STRING ": entering session stage\n");
/*
+ * Environment variables set with setenv() only last while PAM is
+ * active, i.e. disappear when the shell is started. On the other hand,
+ * variabled fed to pam_putenv() are only visible once the shell
+ * started.
+ */
+ /*
* Get the Kerberos CCNAME so we can make it available to the
* mount command later on.
*/
- krb5_set = getenv("KRB5CCNAME") != NULL;
- if (setenv("KRB5CCNAME", pam_getenv(pamh, "KRB5CCNAME"), 1) < 0)
+ krb5 = pam_getenv(pamh, "KRB5CCNAME");
+ if (krb5 != NULL && setenv("KRB5CCNAME", krb5, true) < 0)
l0g("KRB5CCNAME setenv failed\n");
/* Store initialized config as PAM data */
@@ -482,71 +548,50 @@
}
}
- if (Config.luserconf == NULL || strlen(Config.luserconf) == 0)
- ;
- else if (!pmt_fileop_exists(Config.luserconf))
- ;
- else if (pmt_fileop_owns(Config.user, Config.luserconf)) {
- w4rn("going to readconfig %s\n", Config.luserconf);
- if (!readconfig(Config.luserconf, false, &Config)) {
- ret = PAM_SERVICE_ERR;
- goto out;
- }
- } else
- w4rn("%s does not exist or is not owned by user\n",
- Config.luserconf);
- if (Config.volume_list.items == 0) {
- w4rn("no volumes to mount\n");
- ret = PAM_SUCCESS;
- goto out;
- }
if (!expandconfig(&Config)) {
l0g("error expanding configuration\n");
ret = PAM_SERVICE_ERR;
goto out;
}
-
- ret = pam_get_data(pamh, "pam_mount_system_authtok",
- static_cast(const void **, static_cast(void *, &system_authtok)));
- if (ret != PAM_SUCCESS) {
- if (Args.get_pw_interactive) {
- ret = read_password(pamh, Config.msg_sessionpw, &system_authtok);
- if (ret != PAM_SUCCESS)
- l0g("warning: could not obtain password "
- "interactively either\n");
- }
- /*
- * Proceed without a password. Some volumes may not need one,
- * e.g. bind mounts and networked/unencrypted volumes.
- */
- }
- if (system_authtok == NULL)
- system_authtok = xstrdup("");
+ if (Config.volume_list.items > 0)
+ /* There are some volumes, so grab a password. */
+ system_authtok = grab_authtok(pamh);
misc_dump_id("Session open");
-
envpath_init(Config.path);
- HXlist_for_each_entry(vol, &Config.volume_list, list) {
- /*
- * luserconf_volume_record_sane() is called here so that a user
- * can nest loopback images. otherwise ownership tests will
- * fail if parent loopback image not yet mounted.
- * volume_record_sane() is here to be consistent.
- */
- if (!volume_record_sane(&Config, vol))
- continue;
- if (!vol->globalconf &&
- !luserconf_volume_record_sane(&Config, vol))
- continue;
+ ret = process_volumes(&Config, system_authtok);
- if (!mount_op(do_mount, &Config, vol, system_authtok)) {
- l0g("mount of %s failed\n", znul(vol->volume));
+ /*
+ * Read luserconf after mounting of initial volumes. This makes it
+ * possible to store luserconfs on net volumes themselves.
+ */
+ if (Config.luserconf != NULL && *Config.luserconf != '\0' &&
+ pmt_fileop_exists(Config.luserconf)) {
+ w4rn("going to readconfig %s\n", Config.luserconf);
+ if (!pmt_fileop_owns(Config.user, Config.luserconf)) {
+ w4rn("%s does not exist or is not owned by user\n",
+ Config.luserconf);
+ } else if (!readconfig(Config.luserconf, false, &Config)) {
+ ret = PAM_SERVICE_ERR;
+ } else if (!expandconfig(&Config)) {
ret = PAM_SERVICE_ERR;
+ l0g("error expanding configuration\n");
}
}
- memset(system_authtok, 0, strlen(system_authtok));
- if (krb5_set)
- unsetenv("KRB5CCNAME");
+
+ if (Config.volume_list.items == 0) {
+ w4rn("no volumes to mount\n");
+ ret = PAM_SUCCESS;
+ } else {
+ if (system_authtok == NULL)
+ system_authtok = grab_authtok(pamh);
+ ret = process_volumes(&Config, system_authtok);
+ }
+
+ if (system_authtok != NULL) {
+ memset(system_authtok, 0, strlen(system_authtok));
+ free(system_authtok);
+ }
modify_pm_count(&Config, Config.user, "1");
envpath_restore();
if (getuid() == 0)
@@ -564,6 +609,8 @@
*/
ret = PAM_SUCCESS;
out:
+ if (krb5 != NULL)
+ unsetenv("KRB5CCNAME");
w4rn("done opening session (ret=%d)\n", ret);
common_exit();
return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/pam_mount.h new/pam_mount-1.32/src/pam_mount.h
--- old/pam_mount-1.27/src/pam_mount.h 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/pam_mount.h 2009-09-21 21:18:22.000000000 +0200
@@ -4,7 +4,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -42,8 +41,8 @@
misc_warn(("%s(%s:%u): " fmt), pmtlog_prefix, HX_basename(__FILE__), \
__LINE__, ## __VA_ARGS__)
-struct HXbtree;
struct HXdeque;
+struct HXformatmap;
struct HXproc;
struct loop_info64;
@@ -94,6 +93,10 @@
bool globalconf;
/* set, so that umount can rmdir it */
bool created_mntpt;
+ /* expansion already took place */
+ bool is_expanded;
+ /* was handed off to mount_op() */
+ bool mnt_processed;
const char *user;
char *fstype, *server, *volume, *mountpoint, *cipher;
char *fs_key_cipher, *fs_key_hash, *fs_key_path;
@@ -119,7 +122,7 @@
bool seen_mntoptions_require, seen_mntoptions_allow;
hxmc_t *luserconf;
struct HXdeque *command[_CMD_MAX];
- struct HXbtree *options_require, *options_allow, *options_deny;
+ struct HXmap *options_require, *options_allow, *options_deny;
struct HXclist_head volume_list;
int level;
char *msg_authpw, *msg_sessionpw, *path;
@@ -175,12 +178,12 @@
};
typedef int (mount_op_fn_t)(const struct config *, struct vol *,
- struct HXbtree *, const char *);
+ struct HXformat_map *, const char *);
/*
*
*/
-static inline void format_add(struct HXbtree *table, const char *key,
+static inline void format_add(struct HXformat_map *table, const char *key,
const char *value)
{
if (value == NULL)
@@ -233,16 +236,16 @@
* MISC.C
*/
extern void arglist_add(struct HXdeque *, const char *,
- const struct HXbtree *);
+ const struct HXformat_map *);
extern struct HXdeque *arglist_build(const struct HXdeque *,
- const struct HXbtree *);
+ const struct HXformat_map *);
extern void arglist_log(const struct HXdeque *);
extern void arglist_llog(const char *const *);
extern bool kvplist_contains(const struct HXclist_head *, const char *);
extern char *kvplist_get(const struct HXclist_head *, const char *);
extern void kvplist_genocide(struct HXclist_head *);
extern hxmc_t *kvplist_to_str(const struct HXclist_head *);
-extern void misc_add_ntdom(struct HXbtree *, const char *);
+extern void misc_add_ntdom(struct HXformat_map *, const char *);
extern void misc_dump_id(const char *);
extern int pmt_fileop_exists(const char *);
extern int pmt_fileop_owns(const char *, const char *);
@@ -286,11 +289,12 @@
* MOUNT.C
*/
extern mount_op_fn_t do_mount, do_unmount;
+extern int fstype_nodev(const char *);
extern int mount_op(mount_op_fn_t *, const struct config *, struct vol *,
const char *);
extern void umount_final(struct config *);
extern int pmt_already_mounted(const struct config *,
- const struct vol *, struct HXbtree *);
+ const struct vol *, struct HXformat_map *);
extern hxmc_t *pmt_vol_to_dev(const struct vol *);
extern bool fstype_icase(const char *);
extern bool fstype2_icase(enum command_type);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/rdconf1.c new/pam_mount-1.32/src/rdconf1.c
--- old/pam_mount-1.27/src/rdconf1.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/rdconf1.c 2009-09-21 21:18:22.000000000 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright © Jan Engelhardt, 2006 - 2008
+ * Copyright © Jan Engelhardt, 2006 - 2009
*
* This file is part of pam_mount; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -19,10 +19,10 @@
#elif defined(__linux__)
# include
#endif
-#include
#include
#include
#include
+#include
#include
#include
#include
@@ -52,8 +52,7 @@
};
enum {
- OPT_TREE_FLAGS =
- HXBT_MAP | HXBT_CKEY | HXBT_SCMP | HXBT_CID,
+ OPT_MAP_FLAGS = HXMAP_SCKEY,
};
struct callbackmap {
@@ -126,7 +125,7 @@
* moment due to to-XML transition period.)
*/
static bool expand_user(const char *user, char **dest_pptr,
- const struct HXbtree *vinfo)
+ const struct HXformat_map *vinfo)
{
hxmc_t *tmp = NULL;
@@ -149,7 +148,7 @@
bool expandconfig(const struct config *config)
{
const char *u = config->user;
- struct HXbtree *vinfo;
+ struct HXformat_map *vinfo;
struct passwd *pe;
struct group *ge;
struct kvp *kvp;
@@ -172,6 +171,9 @@
misc_add_ntdom(vinfo, u);
HXlist_for_each_entry(vpt, &config->volume_list, list) {
+ if (vpt->is_expanded)
+ continue;
+ vpt->is_expanded = true;
if (!expand_user(u, &vpt->server, vinfo) ||
!expand_home(u, &vpt->volume) ||
!expand_user(u, &vpt->volume, vinfo) ||
@@ -249,9 +251,9 @@
HXlist_for_each_entry_safe(vol, next, &config->volume_list, list)
volume_free(vol);
- HXbtree_free(config->options_allow);
- HXbtree_free(config->options_require);
- HXbtree_free(config->options_deny);
+ HXmap_free(config->options_allow);
+ HXmap_free(config->options_require);
+ HXmap_free(config->options_deny);
free(config->user);
free(config->msg_authpw);
free(config->msg_sessionpw);
@@ -306,7 +308,7 @@
return false;
}
-static bool str_to_optlist(struct HXbtree *optlist, char *str)
+static bool str_to_optlist(struct HXmap *optlist, char *str)
{
char *value, *ptr;
@@ -317,9 +319,9 @@
value = strchr(ptr, '=');
if (value != NULL) {
*value++ = '\0';
- HXbtree_add(optlist, ptr, value);
+ HXmap_add(optlist, ptr, value);
} else {
- HXbtree_add(optlist, ptr, NULL);
+ HXmap_add(optlist, ptr, NULL);
}
}
@@ -360,9 +362,9 @@
HXdeque_push(cmd, xstrdup(default_command[i].def[j]));
}
- config->options_allow = HXbtree_init(OPT_TREE_FLAGS);
- config->options_require = HXbtree_init(OPT_TREE_FLAGS);
- config->options_deny = HXbtree_init(OPT_TREE_FLAGS);
+ config->options_allow = HXmap_init(HXMAPT_DEFAULT, OPT_MAP_FLAGS);
+ config->options_require = HXmap_init(HXMAPT_DEFAULT, OPT_MAP_FLAGS);
+ config->options_deny = HXmap_init(HXMAPT_DEFAULT, OPT_MAP_FLAGS);
str_to_optlist(config->options_allow, options_allow);
str_to_optlist(config->options_require, options_require);
HXclist_init(&config->volume_list);
@@ -715,8 +717,9 @@
if ((options = xml_getprop(node, "allow")) != NULL) {
if (!config->seen_mntoptions_allow) {
- HXbtree_free(config->options_allow);
- config->options_allow = HXbtree_init(OPT_TREE_FLAGS);
+ HXmap_free(config->options_allow);
+ config->options_allow =
+ HXmap_init(HXMAPT_DEFAULT, OPT_MAP_FLAGS);
config->seen_mntoptions_allow = true;
}
ret = str_to_optlist(config->options_allow, options);
@@ -739,8 +742,9 @@
* "require"s shall be cumulative.
*/
if (!config->seen_mntoptions_require) {
- HXbtree_free(config->options_require);
- config->options_require = HXbtree_init(OPT_TREE_FLAGS);
+ HXmap_free(config->options_require);
+ config->options_require =
+ HXmap_init(HXMAPT_DEFAULT, OPT_MAP_FLAGS);
config->seen_mntoptions_require = true;
}
ret = str_to_optlist(config->options_require, options);
@@ -959,8 +963,7 @@
continue;
ret = __rc_volume_cond_id(signed_cast(const char *,
node->content), pwd->pw_uid);
- if (ret < 0)
- return ret;
+ return ret;
}
l0g("config: empty or invalid content for <%s>\n", "uid");
@@ -981,8 +984,7 @@
continue;
ret = __rc_volume_cond_id(signed_cast(const char *,
node->content), pwd->pw_gid);
- if (ret < 0)
- return ret;
+ return ret;
}
l0g("config: empty or invalid content for <%s>\n", "gid");
@@ -1327,6 +1329,9 @@
vpt->fs_key_path = tmp;
}
+ if (fstype_nodev(vpt->fstype) == 1 && vpt->volume == NULL)
+ vpt->volume = xstrdup("none");
+
return NULL;
out:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pam_mount-1.27/src/rdconf2.c new/pam_mount-1.32/src/rdconf2.c
--- old/pam_mount-1.27/src/rdconf2.c 2009-07-01 03:08:13.000000000 +0200
+++ new/pam_mount-1.32/src/rdconf2.c 2009-09-21 21:18:22.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (C) Elvis Pfützenreuter, 2000
- * Copyright © Jan Engelhardt, 2006 - 2008
+ * Copyright © Jan Engelhardt, 2006 - 2009
* Copyright © Bastian Kleineidam, 2005
*
* This file is part of pam_mount; you can redistribute it and/or
@@ -14,10 +14,10 @@
#include
#include
#include
-#include
-#include
#include
#include
+#include
+#include
#include
#include "pam_mount.h"
@@ -29,16 +29,16 @@
* Check if there are any options in @options that are not in @allowed.
* If so, return false.
*/
-static bool allow_ok(const struct HXbtree *allowed,
+static bool allow_ok(const struct HXmap *allowed,
const struct HXclist_head *options)
{
const struct kvp *kvp;
- if (HXbtree_find(allowed, "*") != NULL || options->items == 0)
+ if (HXmap_find(allowed, "*") != NULL || options->items == 0)
return true;
HXlist_for_each_entry(kvp, options, list)
- if (HXbtree_find(allowed, kvp->key) == NULL) {
+ if (HXmap_find(allowed, kvp->key) == NULL) {
l0g("option \"%s\" not allowed\n", kvp->key);
return false;
}
@@ -54,24 +54,24 @@
* Checks @options whether it contains all options in @required.
* If so, returns true.
*/
-static bool required_ok(const struct HXbtree *required,
+static bool required_ok(const struct HXmap *required,
const struct HXclist_head *options)
{
- const struct HXbtree_node *e;
- void *t;
+ const struct HXmap_node *e;
+ struct HXmap_trav *t;
- if ((t = HXbtrav_init(required)) == NULL)
+ if ((t = HXmap_travinit(required, 0)) == NULL)
return false;
- while ((e = HXbtraverse(t)) != NULL)
+ while ((e = HXmap_traverse(t)) != NULL)
if (!kvplist_contains(options, e->key)) {
l0g("option \"%s\" required\n",
static_cast(const char *, e->key));
- HXbtrav_free(t);
+ HXmap_travfree(t);
return false;
}
- HXbtrav_free(t);
+ HXmap_travfree(t);
return true;
}
@@ -82,32 +82,32 @@
*
* Checks @options whether any of them appear in @deny. If so, returns false.
*/
-static bool deny_ok(const struct HXbtree *denied,
+static bool deny_ok(const struct HXmap *denied,
const struct HXclist_head *options)
{
- const struct HXbtree_node *e;
- void *t;
+ const struct HXmap_node *e;
+ struct HXmap_trav *t;
if (denied->items == 0) {
w4rn("no denied options\n");
return true;
- } else if (HXbtree_find(denied, "*") != NULL && options->items != 0) {
+ } else if (HXmap_find(denied, "*") != NULL && options->items != 0) {
l0g("all mount options denied, user tried to specify one\n");
return false;
}
- if ((t = HXbtrav_init(denied)) == NULL)
+ if ((t = HXmap_travinit(denied, 0)) == NULL)
return false;
- while ((e = HXbtraverse(t)) != NULL)
+ while ((e = HXmap_traverse(t)) != NULL)
if (kvplist_contains(options, e->key)) {
l0g("option \"%s\" denied\n",
static_cast(const char *, e->key));
- HXbtrav_free(t);
+ HXmap_travfree(t);
return false;
}
- HXbtrav_free(t);
+ HXmap_travfree(t);
return true;
}
@@ -126,7 +126,8 @@
vol->volume);
if (vol->type == CMD_LCLMOUNT || vol->type == CMD_CRYPTMOUNT) {
- if (!pmt_fileop_owns(config->user, vol->volume)) {
+ if (strcmp(vol->fstype, "tmpfs") != 0 &&
+ !pmt_fileop_owns(config->user, vol->volume)) {
l0g("user-defined volume (%s), volume not owned "
"by user\n", vol->volume);
return false;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org