[Spread-users] problem with non-root spread -l y
Thomas Seeling
tseeling at de.ibm.com
Fri Apr 27 07:24:42 EDT 2007
Hallo,
I am starting with spread 4.0.0, and I want to configure to run the daemon
non-root.
The daemon starts fine, but then aborts with a strange error message.
I have added some more debug output to log.c and I found out that there's
a status file in the daemon's directory.
This only occurs when the daemon is started with -l y. It runs fine if I
leave out that switch.
in spread.conf I use:
RuntimeDir = /var/run
DaemonUser = spread
DaemonGroup = daemon
I had expected that logfiles, status files etc. are created in the runtime
directory.
Obviously they are not.
Note that the entries are starting with UID==0, and then setuid() happens
(spread is 13 on my system).
After the setuid call the spread user can no longer read the status file.
Is that a setup problem on my system?
070427-124020# Conf_load_conf_file: My name: server, id: 192.168.100.100,
port: 4803
070427-124020# Log_init: using file:
/home/ths/src/spread-src-4.0.0/daemon/server as 0
070427-124020# Log_alive: using file:
/home/ths/src/spread-src-4.0.0/daemon/server as 0
Membership id is ( -1062706076, 1177670428)
070427-124027# --------------------
070427-124027# Configuration at server is:
070427-124027# Num Segments 1
070427-124027# 1 192.168.100.255 4803
070427-124027# server 192.168.100.100
070427-124027# ====================
070427-124027# Log_alive: using file: //server as 13
070427-124027# Log_alive: error (No such file or directory) could not open
file server
Exit caused by Alarm(EXIT)
here is an excerpt from log.c. I have added a getcwd and getuid call in
Log_init as well as Log_alive.
static char curdir[512];
void Log_init()
{
long start_file_pos;
proc my;
Is_inited = 1;
my = Conf_my();
strncpy( My_name, my.name, MAX_PROC_NAME);
getcwd(curdir,sizeof(curdir));
Alarm( PRINT, "Log_init: using file: %s/%s as %d\n",
curdir,My_name,getuid());
...
static void Log_alive(int dummy, void *dummy_p)
{
long file_pos;
if( !Is_inited ) return;
getcwd(curdir,sizeof(curdir));
Alarm( PRINT, "Log_alive: using file: %s/%s as %d\n",
curdir,My_name,getuid());
Tschau...Thomas
--
"Do you wanna be a legend or a passing footprint on the sands of time?"
IBM Deutschland GmbH, GTS ITD SSO ESM2
IBM certified advanced deployment professional Tivoli Enterprise Mgmnt
Wilhelm-Fay-Str. 30-34, 65936-51 A2F, *134-1221, GSM +49-176-45008348
Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian
Diedrich, Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7623 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.spread.org/pipermail/spread-users/attachments/20070427/b224de15/attachment.bin
More information about the Spread-users
mailing list