[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sh and file permissions
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: sh and file permissions
- From: Matteo Cavalleri <shiva_(_dot_)_brahma_(_at_)_inwind_(_dot_)_it>
- Date: Wed, 20 Feb 2002 17:18:46 +0100
1) I started to write a sh script for a couple of things i would like to
automate, and i've discovered a strange thing. a command like
host www.foo.bar | sed -e "s/.*\ \([0-9\.]*\)$/\1/"
works perfectly in linux, but does not give the desired result in
openbsd. however if i do:
echo $xx | sed -e "s/.*\ \([0-9\.]*\)$/\1/"`
it works perfectly (i can use the backtick too, but I don't know how to
write a backtick under windows ;)
that seems really strange to me, and i wonder if someone has an answer...
2) I got my first "daily insecurity" mail and it had a long list with a
lot of files with the setuid/setgid bit set, e.g.
Checking setuid/setgid files and devices:
-r-sr-xr-x 1 root bin [...] /sbin/ping
I've always known that setuid/setgid bits are dangerous and should be
used only when really necessary, so why ping should be setuid root?!?!
I really can't understand that... I've used just linux until now, and
this is my first experience with a *bsd unix, so this maybe due to the
way bsd works, but that really seems strange to me... what's the need to
give ping root privileges?
well... this can even be a list of files that should have that bit
removed, but the afterboot manpage talks only about the
"Checking special files and directories." list. I don't know what's the
purpose of the prior list...
"Better true to yourself
Than a perfect shadow
Of somebody else
An empty shell"
(MrBig, My new religion)
Visit your host, monkey.org