Re: Changing the output of uname -m or -p

2008-01-14 Thread Kris Kennaway

Christian Baer wrote:

On Mon, 14 Jan 2008 01:03:42 +0100 Kris Kennaway wrote:


Can this even be done and if so how?

See the manpage, and the UNAME_* variables.


One other thing: Will that change the way the system reacts in any way?
Apps should run normally (well, a browser may give a wrong plattform
information but that should be it). But what happens if you try to compile
something? Will a wrong plattform or CPU variable screw up what the
compiler spits out? Could be rather unhealthy if the compiler optimizes
code for a sun4u on an i386. :-)


It will confuse some things, yes.  e.g. buildworld and ports, and maybe 
some things at runtime.


Kris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Changing the output of uname -m or -p

2008-01-14 Thread Christian Baer
On Mon, 14 Jan 2008 01:03:42 +0100 Kris Kennaway wrote:

>> Can this even be done and if so how?
> See the manpage, and the UNAME_* variables.

One other thing: Will that change the way the system reacts in any way?
Apps should run normally (well, a browser may give a wrong plattform
information but that should be it). But what happens if you try to compile
something? Will a wrong plattform or CPU variable screw up what the
compiler spits out? Could be rather unhealthy if the compiler optimizes
code for a sun4u on an i386. :-)

Regards,
Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Changing the output of uname -m or -p

2008-01-13 Thread Christian Baer
On Mon, 14 Jan 2008 01:03:42 +0100 Kris Kennaway wrote:

>> Can this even be done and if so how?
> See the manpage, and the UNAME_* variables.

I already did that once and it didn't work out. I just found the reason:
I'm too thick. :-/ I though all the letters had to be capitals, so I set
UNAME_M instead of UNAME_m. The days my brain leaves me... :-)

Thanks for the help!

Regards,
Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Changing the output of uname -m or -p

2008-01-13 Thread Kris Kennaway

Christian Baer wrote:

Hello Folks!

This may be a bit of a hacker's question, but I'll just go for it in here
- at least for starters.

I want to play a prank on a friend of mine. He does a csup at least once a
day and also makes a new world at least once a day. He is pretty nutty
about that which is ok for some -CURRENT system, but he also does that on
production systems.

Now I don't want to judge him about that, but he is a bit sensitive about
the output of uname. The version is very important to him. :-)

The prank I want to pull is to somehow change the output of uname -m to
read something different. The best thing would be to change that to
something ancient like C-64, i286, i8086. Or, if only plattforms that
FreeBSD supports are allowed, then mips, alpha or sparc64 on an i386. That
should keep him thinking for a while. :-)

I don't want to do any damage, so I just want to screw up the output of
uname and the system should work normally apart from that. I realise that
I may have to change some of the OS's code and that's not a problem. I
just don't know where to look for this kind of thing and I don't really
want to do too much reading just for a little prank.

This guy is a really good friend of mine but sometimes get up my neck
because I am much more conservative about updating my production systems.
As you can see on this machine, I go along the lines of RELENG_6_2 which
he can't understand. This should buy me a little peace and quite for a
week or two. Getting access to his machines is no problem as I am often at
his place.

Can this even be done and if so how?


See the manpage, and the UNAME_* variables.

Kris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"