Thread 'request: let me change hostname/domainname'

Message boards : BOINC Manager : request: let me change hostname/domainname
Message board moderation

To post messages, you must log in.

AuthorMessage
Bart

Send message
Joined: 23 Oct 07
Posts: 2
Message 13228 - Posted: 23 Oct 2007, 21:11:25 UTC

Searching the net, I found out that BOINC uses the system call gethostname() to get the name of the computer which it displays. Could someone please, PLEASE change that to get it from the environment variable $HOSTNAME? This would allow me to 'fake' the hostname without having to mess with the system.

Another solution would be to allow one to define the name of the computer through the command line, though I expect that would be harder to do. The first change would be trivial. Perhaps something like this:
hostname = getenv("HOSTNAME");
if (!strlen(hostname)) {
gethostname(hostname, sizeof(hostname));
}

This change would be very useful for people who want to run BOINC on systems they don't have root access to, or are not at liberty to change the hostname, and who don't want other people to find out where they're running BOINC.

It would also provide an easy solution to all those questions about 'why does BOINC show localhost as my hostname'.

Please?
ID: 13228 · Report as offensive
ProfileJord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15563
Netherlands
Message 13229 - Posted: 23 Oct 2007, 21:35:46 UTC - in response to Message 13228.  

Searching the net, I found out that BOINC uses the system call gethostname() to get the name of the computer which it displays.

Actually, it uses GETHOSTBYNAME() .. See hostinfo_network.c and hostinfo.c

Now on the other hand... only YOU can see the host name when you check your computers on a project. No one else can. Even on those projects that show the communications with your computer, all that shows there is the hostID number. No names, not of computers or domains.

ID: 13229 · Report as offensive
Les Bayliss
Help desk expert

Send message
Joined: 25 Nov 05
Posts: 1654
Australia
Message 13230 - Posted: 23 Oct 2007, 21:50:21 UTC

Bart

A hint: go to one of the help forums on which ever project you're on, click on another posters name, and you'll be able to see the difference in visible information that Ageless mentioned.

ID: 13230 · Report as offensive
Bart

Send message
Joined: 23 Oct 07
Posts: 2
Message 13242 - Posted: 24 Oct 2007, 14:06:15 UTC

Duh, how dumb of me. Thanks.
I'd still like to be able to have control on how my computers are named, if for no other reason than in the event that this information *does* become public one day, through an accident or a hack or something - but it's not a big concern for me anymore.
ID: 13242 · Report as offensive
Eric Myers
Avatar

Send message
Joined: 12 Feb 06
Posts: 232
United States
Message 13244 - Posted: 24 Oct 2007, 15:10:26 UTC

Here's a variation on this idea. Let the user specify a "nickname" for a machine. The name given by gethostname() could well be a long complex string assigned by a DHCP server or based on some cluster network configuration. But the user who owns that machine (and only that user) could specify a nickname for the machine, and that would show up in host listings rather than the default name.

This would require an additional database field in the host table, and an interface to let the user set the name.

-- Eric Myers

"Education is not the filling of a pail, but the lighting of a fire." -- William Butler Yeats
ID: 13244 · Report as offensive

Message boards : BOINC Manager : request: let me change hostname/domainname

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.