Hi guys
I've got a small problem here. I want oops to run as user proxy and write
it's pidfile in /var/run/. /var/run/ has permissions of 755 (Debian Linux).
When oops runs it writes in the logfile:
Fatal: Can't create pid file: Permission denied
I am looking at the source code right now. For some reason oops does a
set_euser() right before writing it's pid file and goes back to root right
after. This is around line 776 in oops.c (version 1.4.6).
I've edited the source here so it becomes root right before creating the
pidfile and becomes oops_user again right afterward. I've attached the
patch.
--
------------------
Sarel Botha
[EMAIL PROTECTED]
------------------
99 little bugs in the code, 99 bugs in the code,
fix one bug, compile it again...
101 little bugs in the code....
--- oops.c Fri Jun 9 10:46:08 2000
+++ oops.c.new Sun Aug 6 12:31:22 2000
@@ -785,6 +785,7 @@
return(0);
}
+ if ( oops_user ) set_euser(NULL); /* back to saved uid */
if ( pidfile[0] != 0 ) {
char pid[11];
flock_t fl;
@@ -808,6 +809,7 @@
sprintf(pid, "%-10d", (int)getpid());
write(pid_d, pid, strlen(pid));
}
+ if ( oops_user ) set_euser(oops_user);
next_alloc_storage = NULL;
open_db();
prepare_storages();