[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Autoclean /var/tmp ?



Hallo,

Manfred Schmitt wrote:

> OK, das ganze ist wohl doch etwas komplizierter:
> 
> desktop:/dev/shm# mount -o remount,noexec /dev/shm
> desktop:/dev/shm# mount | grep shm
> tmpfs on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
> desktop:/dev/shm# echo "echo yep" > test5
> desktop:/dev/shm# sh ./test5 

Das ist das gleiche wie

$ echo 'echo yep' | sh

Du willst:

root@denkbrett:/dev/shm # mount -o remount,noexec /dev/shm
root@denkbrett:/dev/shm # mount | grep shm
tmpfs on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
root@denkbrett:/dev/shm # echo -e '#!/bin/sh'\\'necho yep' > test
root@denkbrett:/dev/shm # chmod +x test
root@denkbrett:/dev/shm # ./test
bash: ./test: /bin/sh: bad interpreter: Permission denied
root@denkbrett:/dev/shm # mount -o remount,exec /dev/shm
root@denkbrett:/dev/shm # ./test
yep
root@denkbrett:/dev/shm # 

hth, Wolf

-- 
A distributed system is one in which the failure of a computer you didn't even 
know existed can render your own computer unusable. (Leslie Lamport)


Reply to: