| Last change
                  on this file since 2086 was
                  1787,
                  checked in by andersk, 15 years ago | 
        
          | /etc/scripts/modprobe: Tighten binfmt-464c check
Substring matching was sloppy; check that the arguments match the
expected ones exactly. | 
        
          | 
              
                  Property svn:executable set to
                  * | 
        | File size:
            601 bytes | 
      
      
        
  | Line |  | 
|---|
| 1 | #!/bin/sh | 
|---|
| 2 | if [ $# -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 | 
|---|
| 8 | fi | 
|---|
| 9 | ( | 
|---|
| 10 | echo "Ignoring request from kernel: modprobe $*" | 
|---|
| 11 | stacks=$(grep -ls request_module /proc/*/stack) | 
|---|
| 12 | if [ "$stacks" ]; then | 
|---|
| 13 | ps -Lfwp $(for stack in $stacks; do | 
|---|
| 14 | proc="${stack%/stack}" | 
|---|
| 15 | echo "${proc#/proc/}"; | 
|---|
| 16 | done) | 
|---|
| 17 | fi | 
|---|
| 18 | ) | logger -p authpriv.info | 
|---|
| 19 | false | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.