Alan, why?
It's not a security risk, and it's not a real problem as far as I can see.
It's something you can only see if you write a completely unrealistic
program, and even when you see it the worst that happens is that you get a
crap return to a crap program.
Crap programs are _supposed_ to return crap.
End even then you actually have to be root to get the bad behaviour. If
you're root, you can do some _really_ bad things, so I don't see the point
in changing this, adding code that sounds completely unnecessary unless
you give a real-world example.
Usually you set the hostname once, at bootup. Or maybe you're doing system
administration and playing around with it, but when you do so you'd better
be fairly quiescent anyway and restart all your networking deamons etc
after having done so - so we're talking about something that isn't done on
a whim.
In short, give a better reason, because as it stands, this "bug" is not a
bug, but just a case of "let's not add code to take care of a case we
shouldn't care about anyway". It's a "bug" in the same sense as it's a
"bug" that root can write to /dev/kmem and make the system unstable.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu