mirror of https://github.com/BOINC/boinc.git
- feeder: created shared mem seg with 0666 rather than 0660.
In principle 0660 should work (assuming apache belongs to admin group) but apparently on some Linux systems it doesn't, and the feeder gets "can't attach to shared mem" errors. - scheduler: print uid/gid info if can't attach to shared mem - user web: fix bug in team founder transfer form svn path=/trunk/boinc/; revision=13255
This commit is contained in:
parent
5d2d8dea7a
commit
71fc375d1b
|
@ -7591,3 +7591,18 @@ Charlie 31 July 2007
|
|||
|
||||
api/
|
||||
x_opengl.C
|
||||
|
||||
David 1 Aug 2007
|
||||
- feeder: created shared mem seg with 0666 rather than 0660.
|
||||
In principle 0660 should work (assuming apache belongs to admin group)
|
||||
but apparently on some Linux systems it doesn't,
|
||||
and the feeder gets "can't attach to shared mem" errors.
|
||||
- scheduler: print uid/gid info if can't attach to shared mem
|
||||
- user web: fix bug in team founder transfer form
|
||||
|
||||
sched/
|
||||
main.C
|
||||
html/user/
|
||||
team_founder_transfer_form.php
|
||||
lib/
|
||||
shmem.C
|
||||
|
|
|
@ -39,7 +39,7 @@ if (new_transfer_request_ok($team, $now)) {
|
|||
echo "<p>You have already requested to take over the founder
|
||||
position of $team->name.
|
||||
";
|
||||
if (transfer_ok($team, $now) {
|
||||
if (transfer_ok($team, $now)) {
|
||||
echo "<form method=\"post\" action=\"team_founder_transfer_action.php\">
|
||||
<input type=\"hidden\" name=\"action\" value=\"transfer\">
|
||||
<input type=\"submit\" value=\"Complete team founder transfer\">
|
||||
|
|
14
lib/shmem.C
14
lib/shmem.C
|
@ -162,15 +162,19 @@ int detach_shmem(void* p) {
|
|||
int create_shmem(key_t key, int size, gid_t gid, void** pp) {
|
||||
int id;
|
||||
|
||||
// try 0660, then SHM_R|SHM_W
|
||||
// try 0666, then SHM_R|SHM_W
|
||||
// seems like some platforms require one or the other
|
||||
// (this may be superstition)
|
||||
//
|
||||
#ifdef EINSTEIN_AT_HOME
|
||||
// NOTE: in principle it should be 0660, not 0666
|
||||
// (i.e. Apache should belong to the same group as the
|
||||
// project admin user, and should therefore be able to access the seg.
|
||||
// However, this doesn't seem to work on some Linux systems.
|
||||
// I don't have time to figure this out (31 July 07)
|
||||
// it's a big headache for anyone it affects,
|
||||
// and it's not a significant security issue.
|
||||
//
|
||||
id = shmget(key, size, IPC_CREAT|0666);
|
||||
#else
|
||||
id = shmget(key, size, IPC_CREAT|0660);
|
||||
#endif
|
||||
if (id < 0) {
|
||||
id = shmget(key, size, IPC_CREAT|SHM_R|SHM_W);
|
||||
}
|
||||
|
|
|
@ -266,6 +266,10 @@ void attach_to_feeder_shmem() {
|
|||
"Can't attach shmem: %d (feeder not running?)\n",
|
||||
retval
|
||||
);
|
||||
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
|
||||
"uid %d euid %d gid %d eguid%d\n",
|
||||
getuid(), geteuid(), getgid(), getegid()
|
||||
);
|
||||
} else {
|
||||
ssp = (SCHED_SHMEM*)p;
|
||||
retval = ssp->verify();
|
||||
|
|
Loading…
Reference in New Issue