MGR: fix another bug due to changes for Snow Leopard compatibility

svn path=/trunk/boinc/; revision=19967
This commit is contained in:
Charlie Fenton 2009-12-18 12:17:06 +00:00
parent 3e88efcd3f
commit c383ababdc
2 changed files with 13 additions and 1 deletions

View File

@ -10281,3 +10281,13 @@ Rom 18 Dec 2009
clientgui/msw/
taskbarex.cpp, .h
Charlie 5 Dec 2009
- MGR: fix another bug due to changes for Snow Leopard compatibility:
on OS 10.4.11 (Tiger) and perhaps others, when Automatic Login is
set, getlogin() returns "root" for a time after the system is first
booted, causing the Manager to think the user is not a member of
group boinc_master. So check "USER" environment variable instead.
client/
check_security.cpp

View File

@ -673,7 +673,9 @@ bool IsUserInGroupBM() {
return true; // User's primary group is boinc_master
}
userName = getlogin();
// On some systems with Automatic Login set, getlogin() returns "root" for a
// time after the system is first booted, so we check "USER" environment variable.
userName = getenv("USER");
if (userName) {
for (i=0; ; i++) { // Step through all users in group boinc_master
groupMember = grp->gr_mem[i];