/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to initramfs-tools-hook

  • Committer: Teddy Hogeborn
  • Date: 2018-08-15 09:26:02 UTC
  • Revision ID: teddy@recompile.se-20180815092602-xoyb5s6gf8376i7u
mandos-client: Set system clock if necessary

* plugins.d/mandos-client.c (init_gpgme/import_key): If the system
  clock is not set, or set to january 1970, set the system clock to
  the more plausible value that is the mtime of the key file.  This is
  required by GnuPG to be able to import the keys.  (We can't pass the
  --ignore-time-conflict or the --ignore-valid-from options though
  GPGME.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
        --mode=u=rwx "${DESTDIR}${PLUGINDIR}" \
81
81
        "${DESTDIR}${PLUGINHELPERDIR}"
82
82
 
83
 
copy_exec "$libdir"/mandos/mandos-to-cryptroot-unlock "${MANDOSDIR}"
84
 
 
85
83
# Copy the Mandos plugin runner
86
84
copy_exec "$libdir"/mandos/plugin-runner "${MANDOSDIR}"
87
85
 
252
250
# initrd; it is intended to affect the initrd.img file itself, since
253
251
# it now contains secret key files.  There is, however, no other way
254
252
# to set the permission of the initrd.img file without a race
255
 
# condition.  This umask is set by "initramfs-tools-conf", installed
256
 
# as "/usr/share/initramfs-tools/conf.d/mandos-conf".)
 
253
# condition.  This umask is set by "initramfs-tools-hook-conf",
 
254
# installed as "/usr/share/initramfs-tools/conf-hooks.d/mandos".)
257
255
258
256
for full in "${MANDOSDIR}" "${CONFDIR}"; do
259
257
    while [ "$full" != "/" ]; do