---1463799052-1438333447-893126901=:2315
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 20 Apr 1998, Adam J. Richter wrote:
> How about trying the following:
(snip)
Actually, needs to be:
#!/bin/sh
echo logging_modprobe $* > /tmp/modprobe.log.$$
/usr/bin/strace /sbin/modprobe $* >> /tmp/modprobe.log.$$ 2>&1
as 'strace' writes to stderr.
Interestingly enough, it starts working when run indirectly <g>. The
trace is attached for loading of the SCSI tape driver.
> You might also try modifying that shell script to echo something
> to standard output, so that you can verify that modprobe has gotten
> init's file descriptors.
I did this. Nothing makes it to the screen or logs.
The success of modprobe under the shell script started me thinking. I
renamed /sbin/modprobe to /sbin/modprobe.real and created a stub
/sbin/modprobe like this:
#!/bin/sh
shift
/sbin/modprobe.real $*
Lo and behold, this does the trick. Sort of bizarre (and possibly a
security hole?), but functional. The question of the hour is:
What is so different about the environment under a subshell?
Perhaps those more knowledgeable can glean some clues from the strace
output.
Steve
---1463799052-1438333447-893126901=:2315
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="modprobe.log.545"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.95.980420224821.2315B@air.steve.net>
Content-Description:
bG9nZ2luZ19tb2Rwcm9iZSAtcyAtayBjaGFyLW1ham9yLTkNCmV4ZWN2ZSgi
L3NiaW4vbW9kcHJvYmUiLCBbIi9zYmluL21vZHByb2JlIiwgIi1zIiwgIi1r
IiwgImNoYXItbWFqb3ItOSJdLCBbLyogOCB2YXJzICovXSkgPSAwDQpicmso
MCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPSAweDEyMDEw
ODU3Yw0Kb3BlbigiL2V0Yy9sZC5zby5wcmVsb2FkIiwgT19SRE9OTFkpICAg
ID0gLTEgRU5PRU5UIChObyBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5KQ0Kb3Bl
bigiL2V0Yy9sZC5zby5jYWNoZSIsIE9fUkRPTkxZKSAgICAgID0gMA0KZnN0
YXQoMCwge3N0X21vZGU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dJTlQsIHtTSUdfREZMfSwgTlVMTCkgICAgICA9IDANCnNpZ2FjdGlvbihT
SUdRVUlULCB7U0lHX0RGTH0sIE5VTEwpICAgICA9IDANCnNpZ3Byb2NtYXNr
KFNJR19TRVRNQVNLLCBbXSkgICAgICAgICAgICA9IDB4ODAwMDAgKG9sZCBt
YXNrIFtDSExEXSkNCi0tLSBTSUdDSExEIChDaGlsZCBleGl0ZWQpIC0tLQ0K
ZXhpdCgwKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID0gPw0K
---1463799052-1438333447-893126901=:2315--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu