This file is indexed.

/usr/sbin/ndiswrapper-buginfo is in ndiswrapper 1.59-6.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/bin/sh
#set -ex

# Copyright (c) 2004 Torbjörn Svensson <azoff@se.linux.org>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

LOGFILE=`mktemp /tmp/ndiswrapper.XXXXXX`
KVERS=`uname -r`

log()
{
    echo -e "$*" 2>&1 >> $LOGFILE
}

log_cmd()
{
    /bin/sh -c "$*" 2>&1 >> $LOGFILE
}

newblock()
{
    log "------------------------------------\n"
}

if [ $# -eq 1 -a "$1" = "-full" ]; then
    FULL=1
else
    FULL=0
fi

# utils
log "utils:"
log_cmd 'ls -l /sbin/loadndisdriver'
log_cmd 'ls -l /usr/sbin/ndiswrapper'

# the kernel
newblock
log "kernel:"
log_cmd 'cat /proc/version'
if [ -d /lib/modules/$KVERS/build/include ]; then
    log "kernel sources are in /lib/modules/$KVERS/build"
else
    log "kernel sources missing"
fi

newblock
log "module information:"
log_cmd 'modprobe -c | grep ndis'
log "module(s):"
log_cmd "find /lib/modules/$KVERS/ -name ndiswrapper\* | xargs ls -l"
log ""

# the version of gcc
newblock
log "gcc --version:"
log_cmd 'gcc --version'

newblock
log "ndiswrapper -v:"
log_cmd 'ndiswrapper -v'

# installed drivers
newblock
log "installed drivers:"
log_cmd 'ls -lR /etc/ndiswrapper'

while :; do
    echo "Is it okay to shutdown 'wlan0' interface and reload the module?"
    echo "If loading the module crashes kernel, then say N here"
    echo -n "Reload ndiswrapper module? [N/y]:"
    read res

    # default to N, (nothing entered)
    if [ "$res" == "" ]; then
	res="N"
    fi

    case $res in
	y|Y)
	    log "Reloading ndiswrapper..."
	    if [ $FULL -eq 1 ]; then
		log_cmd 'ifconfig wlan0 down;  rmmod ndiswrapper;
			 modprobe ndiswrapper;
			 dmesg | grep ndiswrapper | tail -n 500'
	    else
		log_cmd 'ifconfig wlan0 down;  rmmod ndiswrapper;
			 modprobe ndiswrapper;
			 dmesg | grep ndiswrapper | tail -n 50'

	    fi
	    break
	    ;;
	n|N)
	    log "Not reloading ndiswrapper..."
	    log ""
	    if [ $FULL -eq 1 ]; then
		log_cmd 'dmesg | grep ndiswrapper | tail -n 100'
	    else
		log_cmd 'dmesg | grep ndiswrapper | tail -n 20'
	    fi
	    break
	    ;;
	*)
	    echo "No input.. retry."
	    ;;
    esac
done

if [ $FULL -eq 1 ]; then
    # module information
    newblock

    # pci devices
    newblock
    log "PCI devices:"
    log_cmd "lspci -n"
    log ""
    log "USB devices:"
    log_cmd "lsusb"
    log ""

    # try to get kernelconfig
    newblock
    log "kernel configuration:"
    if [ -r /proc/config.gz ]; then
	    log_cmd 'gzip -d < /proc/config.gz'
    else
	    if [ -r /lib/modules/$KVERS/build/.config ]; then
		    log_cmd "cat /lib/modules/$KVERS/build/.config"
	    else
		    log "kernel config missing"
	    fi
    fi
fi

gzip -c $LOGFILE > /tmp/ndiswrapper-buginfo.gz

echo "please attach /tmp/ndiswrapper-buginfo.gz to your bugreport!"
\rm -f $LOGFILE