Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 22, 2014, 00:33   #1
audiodude
Rookie
 
Join Date: Oct 2014
Posts: 11
audiodude is on a distinguished road
Sharing Hall of Fame on multiuser system

Hi!

I've installed angband on a shared Linux system as a fun diversion for the local users. But everyone only sees their own hall of fame! Is there anyway to symlink a file in the filesystem somewhere so that the hall of fames are linked together?

Thanks!
-Travis
audiodude is offline   Reply With Quote
Old October 22, 2014, 01:46   #2
audiodude
Rookie
 
Join Date: Oct 2014
Posts: 11
audiodude is on a distinguished road
So I've tried recompiling with:

$ ./configure --with-setgid=games

But it seems like if you're on a UNIX-y system you end up with PRIVATE_USER_PATH set anyways:

https://github.com/angband/angband/b...c/config.h#L55

So is the solution just to delete those lines?

Thanks,
-Travis
audiodude is offline   Reply With Quote
Old October 22, 2014, 01:55   #3
audiodude
Rookie
 
Join Date: Oct 2014
Posts: 11
audiodude is on a distinguished road
Tried deleting the following lines:

Code:
/*
 * OPTION: Create and use a hidden directory in the users home directory
 * for storing pref files and character dumps.
 */
#if defined(UNIX) && !defined(MACH_O_CARBON) && !defined(PRIVATE_USER_PATH)
# define PRIVATE_USER_PATH "~/.angband"
#endif
and recompiling, but it didn't seem to help. Angband wanted to create a directory when it started up the first time: /usr/local/var/games/angband/user
audiodude is offline   Reply With Quote
Old October 22, 2014, 08:25   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,173
Donated: $60
Nick is on a distinguished road
I'm no expert, but you could try
Code:
./configure --without-private-dirs
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old October 22, 2014, 21:49   #5
audiodude
Rookie
 
Join Date: Oct 2014
Posts: 11
audiodude is on a distinguished road
Quote:
Originally Posted by Nick View Post
I'm no expert, but you could try
Code:
./configure --without-private-dirs
I did try that, but it doesn't work. It still outputs:

Code:
  var path:                               (not used)
  (with private save and score files in ~/.angband/Angband/)
audiodude is offline   Reply With Quote
Old October 22, 2014, 22:20   #6
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,365
AnonymousHero is on a distinguished road
I don't know how to get this working, but I think I ought to point out that there are probably(!) numerous security issues with this even if you get it working. (Angband and C codebases of its age are not exactly known for good security practices.)
AnonymousHero is offline   Reply With Quote
Old October 23, 2014, 10:04   #7
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Quote:
Originally Posted by audiodude View Post
I did try that, but it doesn't work. It still outputs:

Code:
  var path:                               (not used)
  (with private save and score files in ~/.angband/Angband/)
I think you need to specify --with-setgid=<groupname>. I suspect that these code paths are old and not well tested, though.
myshkin is offline   Reply With Quote
Old October 24, 2014, 18:55   #8
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by myshkin View Post
I think you need to specify --with-setgid=<groupname>. I suspect that these code paths are old and not well tested, though.
This is correct. Be warned that this setgid build mode is unmaintained though, as it's deprecated as a security risk.

This is a shame, because shared halls of fame are a neat idea, but you're the first person in about a decade to want one.

Let me know if you're still trying to get it working - I am back to building Angband and may be able to help.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old October 25, 2014, 05:32   #9
audiodude
Rookie
 
Join Date: Oct 2014
Posts: 11
audiodude is on a distinguished road
Quote:
Originally Posted by audiodude View Post
Tried deleting the following lines:

Code:
/*
 * OPTION: Create and use a hidden directory in the users home directory
 * for storing pref files and character dumps.
 */
#if defined(UNIX) && !defined(MACH_O_CARBON) && !defined(PRIVATE_USER_PATH)
# define PRIVATE_USER_PATH "~/.angband"
#endif
and recompiling, but it didn't seem to help. Angband wanted to create a directory when it started up the first time: /usr/local/var/games/angband/user
So it turns out this worked. After I create a random character and let him get killed on level 1 by a Jackal, the dead character showed up on my other user's hall of fame.

When you first start up Angband after doing this hack, it will say
Code:
angband: Cannot create '/usr/local/var/games/angband/user'
This is overcome by the following:

Code:
$ sudo mkdir /usr/local/var/games/angband/user
$ sudo chown root:games /usr/local/var/games/angband/user
Substituting "games" for whatever group you used for setgid in the confgure options of course.

Now what would be really cool is if it read other people's in-progress saves into the Hall of Fame display. I wonder if I could hack that together (I don't know much C, only Python and Javascript yikes!). But I feel I could hack it well enough that it would work on my system, even if it didn't work on others'.
audiodude is offline   Reply With Quote
Old October 25, 2014, 09:57   #10
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by audiodude View Post
So it turns out this worked. After I create a random character and let him get killed on level 1 by a Jackal, the dead character showed up on my other user's hall of fame.

When you first start up Angband after doing this hack, it will say
Code:
angband: Cannot create '/usr/local/var/games/angband/user'
This is overcome by the following:

Code:
$ sudo mkdir /usr/local/var/games/angband/user
$ sudo chown root:games /usr/local/var/games/angband/user
Substituting "games" for whatever group you used for setgid in the confgure options of course.

Now what would be really cool is if it read other people's in-progress saves into the Hall of Fame display. I wonder if I could hack that together (I don't know much C, only Python and Javascript yikes!). But I feel I could hack it well enough that it would work on my system, even if it didn't work on others'.
Thanks for the update - I can probably fix the dir creation issue.

The way to achieve your last idea is to have the game add the in-progress savefile to the Hall of Fame on exit, just as if the character's dead. The difficult bit is to *delete* the previous entry for the same character so that a living character appears only once. To my knowledge the hall of fame code is add-only.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
quest system? Dark v4 20 February 24, 2012 21:02
Resist system Jungle_Boy Development 65 August 30, 2011 03:10
Kill count, hall of fame Raggy Vanilla 10 June 6, 2011 22:07
3.1.1 hall of fame? hitogoroshi Vanilla 2 October 8, 2009 23:49
Hall of Fame stchang Vanilla 1 December 18, 2008 21:36


All times are GMT +1. The time now is 08:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.