Changeset 1787 for trunk/server


Ignore:
Timestamp:
Mar 10, 2011, 2:17:45 AM (11 years ago)
Author:
andersk
Message:
/etc/scripts/modprobe: Tighten binfmt-464c check

Substring matching was sloppy; check that the arguments match the
expected ones exactly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/fedora/config/etc/scripts/modprobe

    r1781 r1787  
    11#!/bin/sh
    2 case "$*" in
    3   *binfmt-464c*) # 464c are the second two bytes of the ELF magic.
    4                  # This module doesn't exist; being called for it
    5                  # indicates the in-kernel binfmt_elf decided to
    6                  # return ENOEXEC for this ELF file for some reason.
    7                  exit 1 ;;
    8 esac
     2if [ $# -eq 3 ] && [ "$1" = "-q" ] && [ "$2" = "--" ] && [ "$3" = "binfmt-464c" ]; then
     3    # 464c are the second two bytes of the ELF magic.  This module
     4    # doesn't exist; being called for it indicates the in-kernel
     5    # binfmt_elf decided to return ENOEXEC for this ELF file for some
     6    # reason.
     7    exit 1
     8fi
    99(
    1010    echo "Ignoring request from kernel: modprobe $*"
Note: See TracChangeset for help on using the changeset viewer.