Package: ecryptfs-utils
Version: 83-2
Severity: normal
Tags: patch

Hello,

ecryptfs-migrate-home currently gets the user's home directory by
grepping for the username in /etc/passwd.  However, on systems where the
user is not in /etc/passwd (for example, systems using LDAP), this
fails.  It would probably be better to use getent passwd (see attached
patch).

Cheers,

Michael


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (700, 'testing'), (601, 'unstable'), (50, 'stable'), (9, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ecryptfs-utils depends on:
ii  gettext-base                  0.18.1.1-1 GNU Internationalization utilities
ii  keyutils                      1.4-1      Linux Key Management Utilities
ii  libc6                         2.11.2-5   Embedded GNU C Library: Shared lib
ii  libecryptfs0                  83-2       ecryptfs cryptographic filesystem 
ii  libgpg-error0                 1.6-1      library for common error values an
ii  libgpgme11                    1.2.0-1.2  GPGME - GnuPG Made Easy
ii  libkeyutils1                  1.4-1      Linux Key Management Utilities (li
ii  libnss3-1d                    3.12.6-3   Network Security Service libraries
ii  libpam-runtime                1.1.1-6    Runtime support for the PAM librar
ii  libpam0g                      1.1.1-6    Pluggable Authentication Modules l

ecryptfs-utils recommends no packages.

Versions of packages ecryptfs-utils suggests:
ii  cryptsetup                    2:1.1.3-3  configures encrypted block devices
pn  opencryptoki                  <none>     (no description available)

-- no debconf information
--- /usr/bin/ecryptfs-migrate-home      2010-09-01 09:39:23.000000000 +0100
+++ ecryptfs-migrate-home.patched       2010-09-17 21:16:43.813458142 +0100
@@ -81,7 +81,7 @@
 # get user home by username
 get_user_home () {
        local USER_NAME="$1"
-       local USER_HOME=$(grep "^$USER_NAME:" /etc/passwd | cut -d":" -f 6)
+       local USER_HOME=$(getent passwd $USER_NAME | cut -d":" -f 6)
        if [ -z "$USER_HOME" ]; then
                error "Cannot find the home directory of $USER_NAME."
        fi

Reply via email to