~ubuntu-branches/debian/jessie/cryptsetup/jessie

« back to all changes in this revision

Viewing changes to debian/cryptdisks.functions

  • Committer: Package Import Robot
  • Author(s): Jonas Meurer
  • Date: 2012-11-01 15:34:09 UTC
  • Revision ID: package-import@ubuntu.com-20121101153409-hdk014rf7sr74x8y
Tags: 2:1.4.3-3
* add recommends for 'kbd, console-setup' to cryptsetup package. Both are
  necessary to support local keymap in initramfs. Thanks to Raphaël Hertzog
  for the bugreport. (closes: #689722)
* move suggestion for 'initramfs-tools (>= 0.91) | linux-initramfs-tool,
  busybox' to recommends. Both are required for encrypted root fs.
* remove suggestion for udev, most debian systems have it installed anyway.
* mention option to use UUID=<luks_uuid> for source device in crypttab(5).
  Thanks to Felicitus for the bug report. (closes: #688786)
* add a paragraph in README.initramfs: Describe, why renaming the target
  name is not supported for encrypted root devices. Thanks to Adam Lee for
  bugreport and proposed workaround for this limitation. (closes: #671037)
* fix keyfile permission checks in cryptdisks init scripts to follow
  symlinks. Thanks to intrigeri for the bugreport. (closes: #691517)
* fix owner group check for keyfile in cryptdisks init scripts to really
  check owner group.
* update debconf translations:
  - brasilian portuguese, thanks to Adriano Rafael Gomes. (closes: #685762)
  - japanese, thanks to victory. (closes: #690784)
* fix typo in manpages: s/passphase/passphrase. Thanks to Milan Broz for
  the bugreport. (closes: #684086)

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
        fi
220
220
 
221
221
        # Check ownership of $key
222
 
        OWNER="$(ls -l "$key" | sed 's/^.\{10\}[+\.]\?.[^[:space:]]* \([^[:space:]]*\).*/\1/')"
 
222
        OWNER="$(/bin/ls -l "$(readlink -f $key)" | sed 's/^.\{10\}[+\.]\?.[^[:space:]]* \([^[:space:]]*\).*/\1/')"
223
223
        if [ "$OWNER" != "root" ]; then
224
224
                log_warning_msg "$dst: INSECURE OWNER FOR $key, see /usr/share/doc/cryptsetup/README.Debian."
225
225
        fi
230
230
        fi
231
231
 
232
232
        # Check owner group of $key
233
 
        GROUP="$(ls -l "$key" | sed 's/^.\{10\}[+\.]\?.[^[:space:]]* \([^[:space:]]*\).*/\1/')"
 
233
        GROUP="$(/bin/ls -l "$(readlink -f $key)" | sed 's/^.\{12\}[+\.]\?.[^[:space:]]* \([^[:space:]]*\).*/\1/')"
234
234
        if [ "$GROUP" != "root" ]; then
235
235
                log_warning_msg "$dst: INSECURE OWNER GROUP FOR $key, see /usr/share/doc/cryptsetup/README.Debian."
236
236
        fi
237
237
 
238
238
        # Check group and other permissions
239
 
        GMODE="$(ls -l "$key" | sed 's/[[:space:]].*//;s/^.\{4\}\(.\{3\}\).*/\1/')"
240
 
        OMODE="$(ls -l "$key" | sed 's/[[:space:]].*//;s/^.\{7\}\(.\{3\}\).*/\1/')"
 
239
        GMODE="$(/bin/ls -l "$(readlink -f $key)" | sed 's/[[:space:]].*//;s/^.\{4\}\(.\{3\}\).*/\1/')"
 
240
        OMODE="$(/bin/ls -l "$(readlink -f $key)" | sed 's/[[:space:]].*//;s/^.\{7\}\(.\{3\}\).*/\1/')"
241
241
        if [ "$GMODE" != "---" ] && [ "$OMODE" != "---" ]; then
242
242
                log_warning_msg "$dst: INSECURE MODE FOR $key, see /usr/share/doc/cryptsetup/README.Debian."
243
243
        fi