From: Rainer T. <ta...@ta...> - 2007-08-02 10:05:11
|
Hello, Brian Likosar wrote: > --- Rainer Tammer <ta...@ta...> wrote: > > >> Hello, >> >> hdkutz wrote: >> >>> The commands differ! Check the man page and info >>> >> of /opt/freeware/bin/hostname. >> >>> >>> >> I know. This is not the problem. >> > > Two things I do as a "best practice": > 1. Don't compile code as root, only run the "make > install" step as root. A non-root user should not be > able to run "hostname -s" to successfully rename the > host. > Yes, thats right. This is the cause why it took us over 10 years to find out that we had a bug in our .profile/.env (call to hostname -s without a full path to hostname).... > 2. On AIX, when performing compiles, change your path > so that "/usr/linux/bin" is at the beginning of your > path, so that all GNU utilities find what they expect. > > I can only agree partially with this. I always try to build the packages with the native OS tools. The thing which concerns me the most is that if the root user executes a script with a call to hostname -s with the wrong path it might be possible to "destroy" the hostname. The GNU hostname should reject all hostnames starting or ending with an "-" because this hostname would be illegal (according to the standard RFCs). > Brian > > > Bye Rainer > ____________________________________________________________________________________ > Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. > http://autos.yahoo.com/green_center/ > > > |