mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=9274
This commit is contained in:
parent
1f0117c798
commit
c8571103c2
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
void Initialize(void); /* function prototypes */
|
void Initialize(void); /* function prototypes */
|
||||||
void SetUIDBackToUser (void);
|
void SetUIDBackToUser (void);
|
||||||
|
long GetBrandID(void);
|
||||||
OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN);
|
OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN);
|
||||||
pid_t FindProcessPID(char* name, pid_t thePID);
|
pid_t FindProcessPID(char* name, pid_t thePID);
|
||||||
static OSErr QuitBOINCManager(OSType signature);
|
static OSErr QuitBOINCManager(OSType signature);
|
||||||
|
@ -49,6 +50,7 @@ int main(int argc, char *argv[])
|
||||||
long response;
|
long response;
|
||||||
ProcessSerialNumber ourProcess, installerPSN;
|
ProcessSerialNumber ourProcess, installerPSN;
|
||||||
short itemHit;
|
short itemHit;
|
||||||
|
long brandID = 0;
|
||||||
group *grp;
|
group *grp;
|
||||||
char s[256];
|
char s[256];
|
||||||
int NumberOfLoginItems, Counter, i;
|
int NumberOfLoginItems, Counter, i;
|
||||||
|
@ -91,6 +93,14 @@ int main(int argc, char *argv[])
|
||||||
ExitToShell();
|
ExitToShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
brandID = GetBrandID();
|
||||||
|
if (brandID == 1) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Success = false;
|
Success = false;
|
||||||
|
|
||||||
// The BOINC Manager and Core Client have the set-user-ID-on-execution
|
// The BOINC Manager and Core Client have the set-user-ID-on-execution
|
||||||
|
@ -202,6 +212,24 @@ void Initialize() /* Initialize some managers */
|
||||||
ExitToShell();
|
ExitToShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
long GetBrandID()
|
||||||
|
{
|
||||||
|
long iBrandId;
|
||||||
|
OSErr err;
|
||||||
|
|
||||||
|
iBrandId = 0; // Default value
|
||||||
|
|
||||||
|
FILE *f = fopen("/Contents/Resources/Branding", "r");
|
||||||
|
if (f) {
|
||||||
|
fscanf(f, "BrandId=%ld\n", &iBrandId);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
return iBrandId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
/* This runs through the process list looking for the indicated application */
|
/* This runs through the process list looking for the indicated application */
|
||||||
/* Searches for process by file type and signature (creator code) */
|
/* Searches for process by file type and signature (creator code) */
|
||||||
|
|
Loading…
Reference in New Issue