/mandos/release

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

« back to all changes in this revision

Viewing changes to initramfs-tools-hook

  • Committer: Teddy Hogeborn
  • Date: 2016-02-21 12:55:39 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 331.
  • Revision ID: teddy@recompile.se-20160221125539-wi1n8ci0ldbdxrar
plugins.d/mandos-client.c (get_flags): Use strncpy(), not strcpy().

* plugins.d/mandos-client.c (get_flags): Use strncpy() instead of
  strcpy().  Note that as the code works currently, this is never a
  problem in practice, since only interface names which were valid
  existing interface names (and therefore had names with lengths below
  IF_NAMESIZE) is ever passed to the get_flags() function.  But it
  doesn't hurt to check, anyway.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
    esac
233
233
done
234
234
# Use Diffie-Hellman parameters file if available
235
 
if [ -e "${DESTDIR}${CONFDIR}"/client-dhparams.pem ]; then
 
235
if [ -e "${DESTDIR}${CONFDIR}"/dhparams.pem ]; then
236
236
    sed --in-place \
237
 
        --expression="1i--options-for=mandos-client:--dh-params=${CONFDIR}/client-dhparams.pem" \
 
237
        --expression="1i--options-for=mandos-client:--dh-params=${CONFDIR}/dhparams.pem" \
238
238
        "${DESTDIR}/${CONFDIR}/plugin-runner.conf"
239
239
fi
240
240
 
266
266
done
267
267
for dir in "${DESTDIR}"/lib* "${DESTDIR}"/usr/lib*; do
268
268
    if [ -d "$dir" ]; then
269
 
        find "$dir" \! -perm -u+rw,g+r -prune -or -print0 \
270
 
            | xargs --null --no-run-if-empty chmod a+rX
 
269
        find "$dir" \! -perm -u+rw,g+r -prune -or \! -type l -print0 \
 
270
            | xargs --null --no-run-if-empty chmod a+rX --
271
271
    fi
272
272
done