Commit Graph

243 Commits

Author SHA1 Message Date
Rom Walton c8bea1f7bd - LIB: Fix build break on Linux compat VM.
lib/
        util.C

svn path=/trunk/boinc/; revision=15038
2008-04-10 16:42:09 +00:00
Charlie Fenton 67d62d77b6 Client: Fix build breaks and compiler warnings on Mac
svn path=/trunk/boinc/; revision=14889
2008-03-11 05:31:07 +00:00
David Anderson 671cf8f764 - compile fixes for Win
svn path=/trunk/boinc/; revision=14881
2008-03-10 22:52:43 +00:00
David Anderson 671524df2a - Second pass at the above. We still need run_program() in util.C.
The problem was that there's a lot of extra stuff needed
    for running apps on Windows (e.g. related to sandboxing).
    This needed to be a new function.

svn path=/trunk/boinc/; revision=14879
2008-03-10 22:36:22 +00:00
David Anderson cc2f1a20a0 - lib: moved "run program as user" stuff to a separate file,
so it doesn't screw up the linkage of apps that don't use it
- start of server-side support for coprocessors

svn path=/trunk/boinc/; revision=14878
2008-03-10 21:59:27 +00:00
David Anderson 27491c9d69 - Manager: avoid asserts on Linux
- Lib: compile fixes for MinGW

svn path=/trunk/boinc/; revision=14874
2008-03-09 18:54:33 +00:00
Rom Walton 926659e750 - lib: Remove SEH exception handling from MS sample code.
lib/
        win_util.C
    

svn path=/trunk/boinc/; revision=14865
2008-03-07 04:27:51 +00:00
Rom Walton d504ab4905 - CLI: Make the CreateProcessAsUser process work again on Wndows.
It broke after the change of removing the call to LogonUserEx.

    client/
        app_start.C        
    lib/
        util.C

svn path=/trunk/boinc/; revision=14859
2008-03-06 17:18:59 +00:00
Rom Walton 4409e93f7a Quick Updates
svn path=/trunk/boinc/; revision=14824
2008-02-29 15:21:47 +00:00
Rom Walton e132a808e1 - lib: remove references to LogonUserEx which does not exist on Win2k or
older machines.
    - lib: comment out the CreateProcessAsUser code for graphics apps.
        (this is temporary)
        
    lib/
        util.C
        win_util.C, .h

svn path=/trunk/boinc/; revision=14823
2008-02-29 15:20:19 +00:00
Rom Walton 0a737b6579 - CLI: CreateEnvironmentBlock always creates a Unicode Environment block.
- MGR: CreateProcessAsUser doesn't always error out when the ACLs haven't
        been changed for a specific Desktop and WindowStation so go ahead
        and Modify the ACLs with every call. It appears the ACLs revert
        themselves after CreateProcessAsUser is called anyway.
        
    client/
        app_start.C
    lib/
        util.C

svn path=/trunk/boinc/; revision=14819
2008-02-28 20:37:10 +00:00
Rom Walton 756293008b - MGR/SCR: run_program should explicitly set the desktop
and window station to whichever desktop and window station
        the app launching it belongs. If access is denied then
        change the ACLs on the current desktop and window station
        then attempt to relaunch the application.
        
    lib/
        util.C

svn path=/trunk/boinc/; revision=14812
2008-02-28 05:01:52 +00:00
David Anderson 54519a4ee1 - Server: add "job assignment" feature.
Lets you assign a WU to a particular host,
    to one or all hosts belonging to a user or team, or to all hosts.
    See http://boinc.berkeley.edu/trac/wiki/AssignedWork
    Disabled unless you include <enable_assignment> in config.xml
    Uses a new DB table.
    Tested but only a little.
- Server: code cleanup; moved result-handling to a new file,
    and removed the PLATFORM_LIST arg to everything
    (put it in SCHEDULER_REQUEST instead)

svn path=/trunk/boinc/; revision=14767
2008-02-21 00:47:50 +00:00
Rom Walton 75e334811a - client: prevent information disclosure by creating a new environment
block for applications launched using the 'boinc_project' account.
        
        Windows contains environment variables that describe username,
        domain name, profile directory and even logon server.
        
    - client: correctly parse domain name information from the
        client_auth.xml file when a different account is used for
        'boinc_master'.
    - SCR/MGR: Add two API's to adjust the ACLs on the current users
        desktop and windowstation so that graphics applications can
        properly create controls and dialogs for applications
        launched using 'boinc_project'.
        
    client/
        app_start.C
    lib/
        boinc_win.h
        util.C, .h
    lib/
        win_util.C, .h
    win_build/
        boinc_cli_curl.vcproj

svn path=/trunk/boinc/; revision=14748
2008-02-15 15:52:16 +00:00
David Anderson 51764d5abc compile fixes
svn path=/trunk/boinc/; revision=14726
2008-02-12 20:49:44 +00:00
David Anderson 35dab13859 - client code: my next-to-last checkin was flawed
svn path=/trunk/boinc/; revision=14725
2008-02-12 20:33:05 +00:00
David Anderson cf9b2b7c4a - compile fixes
svn path=/trunk/boinc/; revision=14722
2008-02-12 15:28:31 +00:00
David Anderson ee34cf3ab7 - client: removed sprawl
svn path=/trunk/boinc/; revision=14721
2008-02-12 15:04:27 +00:00
Rom Walton bda057588a - WINSETUP: disable creation of client_auth.xml on Win2k.
Win2k requires any user account that is going to attempt
        to logon as another account to have admin privs.
    - WINSETUP: Give 'boinc_project' the right to be able to
        logon as a service, we denied the right to logon
        interactively.
    - WINSETUP: Disable the 'failed to shutdown BOINC service'
        dialog box.
    - CC: Use the client_auth.xml file if present to launch
        boinc applications as boinc_project if it exists.
    - LIB: Use the client_auth.xml file if present to launch
        boinc graphics applications as boinc_project if it
        exists.
        
    client/
        app_start.C
    lib/
        diagnostics_win.C
    lib/
        util.C, .h
    win_build/installerv2/redist/Windows/src/boinccas/
        boinccas.rc
        CACreateBOINCGroups.cpp
        CACreateClientAuthFile.cpp
        CAGrantBOINCMasterRights.cpp
        CAGrantBOINCProjectRights.cpp
        CAShutdownBOINC.cpp
    win_build/installerv2/redist/Windows/Win32/
        boinccas.dll
        boinccas95.dll
    win_build/installerv2/redist/Windows/x64/
        boinccas.dll
        boinccas95.dll
    win_build/
        boinc_ss.vcproj
        boincmgr_curl.vcproj
        libboinc.vcproj

svn path=/trunk/boinc/; revision=14659
2008-02-01 22:08:48 +00:00
Rom Walton 58e4094892 - MGR: Change the CC startup logic so that more informative error
messages.
        
      Policy Change: When installed as a service or daemon, the service
        or daemon manager should start BOINC, not the BOINC Manager.
        (Windows Only for right now, should eventually be applied
         to all platforms)
    - LIB: Undue my previous change that launched graphics apps as
        an idle process.
    - LIB: Take care of some warnings.
        
    clientgui/
        BOINCBaseFrame.cpp, .h
        BOINCClientManager.cpp, .h (Added)
        BOINCGUIApp.cpp, .h
        MainDocument.cpp, .h
    lib/
        util.C

svn path=/trunk/boinc/; revision=14647
2008-01-30 06:09:34 +00:00
David Anderson f2761c6f68 - scheduler: get FCGI version to compile
svn path=/trunk/boinc/; revision=14621
2008-01-24 20:22:54 +00:00
Rom Walton 38803bc3c6 - LIB: Make sure that the worker and graphics processes are created
using the idle process priority class.

    lib/
        util.C

svn path=/trunk/boinc/; revision=14615
2008-01-24 14:26:19 +00:00
David Anderson fd80e135a0 - client: don't count header in bytes_xferred for file uploads
(this causes confusing output in the Manager,
    bytes xferred greater than file size)
- API and client: make boinc_sleep() work regardless of signals
- some code cleanup in http_curl.C

svn path=/trunk/boinc/; revision=14522
2008-01-10 23:27:42 +00:00
David Anderson d47c5c1e2f - API, Unix: fix bug where boinc_sleep() hangs forever.
This was because SIGALRM always interrupts sleep()
    and keeps boinc_sleep() stuck in its while loop.
    Solution: change boinc_sleep() so that it works even if
    rapid signals (e.g. interval timer) are happening
- API: remove deprecated graphics files from Makefile.
    Old-style graphics are no longer supported.
- web: add empty show_user_donations_private() to donations.inc

svn path=/trunk/boinc/; revision=14513
2008-01-09 17:32:02 +00:00
David Anderson 820eb30596 - compile fixes
svn path=/trunk/boinc/; revision=14373
2007-12-10 22:13:48 +00:00
David Anderson b079d40cb9 - API, Unix: call getrusage() from the timer thread,
not the worker signal handler.
    There's no reason to call it from the signal handler -
    it returns the CPU for the entire process, not the calling thread.
    And it may be asynch-signal-handler-unsafe.
- API: comment out checks for bad CPU times.
    I don't think this is needed now, and in some cases it's wrong
    (multi-threaded apps can accumulate CPU faster than real time)
- API, Unix: in boinc_calling_thread_cpu_time(), don't retry getrusage().
- Bossa: switch to better class structure (suggested by Nicolas Alvarez).
    Haven't switched to mysqli yet, but will later.
    Also various other Bossa fixes

svn path=/trunk/boinc/; revision=13855
2007-10-16 23:02:13 +00:00
David Anderson 028544e184 - API: get rid of getrusage_mutex to synchronize calls to getrusage()
and access to worker_thread_ru.
    This was being used in the worker signal handler,
    which is bad because pthread_mutex_lock() can allocate memory.
    I don't think this matters; at worst we might get
    CPU times off by < 1 sec.

svn path=/trunk/boinc/; revision=13844
2007-10-12 19:28:30 +00:00
David Anderson fde3a60e13 - client/lib: compile fixes for OpenBSD
svn path=/trunk/boinc/; revision=13821
2007-10-10 15:57:59 +00:00
Frank Thomas fbcfeaf456 - Removed the svn:executable property from files that should not be executable,
like source code and text files. I skipped to check most files in html/
  and mac_*/ though.
- Added svn:executable to tools/watch_tcp because it has a shebang.


svn path=/trunk/boinc/; revision=13819
2007-10-10 09:25:40 +00:00
Frank Thomas 3bfc78b511 Updated the postal address of the Free Software Foundation in all license headers. See http://lists.ssl.berkeley.edu/pipermail/boinc_dev/2007-October/008939.html for reference.
svn path=/trunk/boinc/; revision=13804
2007-10-09 11:35:47 +00:00
David Anderson d302a5e107 - client/manager/API: code cleanup to disentangle sandbox code from lib/.
- move client sandbox-specific code to a new file, sandbox.C
    - remove g_use_sandbox from util.C; move to MainDocument.cpp (manager)
        and sandbox.C (client)
    - don't declare check_security() in util.h; it's not in util.C
    - don't call remove_project_owned_file_or_dir() in
        boinc_delete_file_aux() or boinc_rmdir();
        rather, at the points in the client that delete
        dirs that are usually owned by boinc_projects,
        call remove_project_owned_file_or_dir() first,
        then clean_out_dir().
    - rename boinc_exec() to switcher_exec() and move it to sandbox.C

Note: this change was sparked by needing to remove a call to getgrnam()
from boinclib, to avoid requiring the same version of glibc
on both compile and target hosts

svn path=/trunk/boinc/; revision=13784
2007-10-05 16:47:07 +00:00
David Anderson 8a423e83cb - client: fix bug where failure to get project list would result
in an empty project list file.
 - client: if failed to get project list file, retry in an hour, not immediately


svn path=/trunk/boinc/; revision=13753
2007-10-02 18:43:12 +00:00
David Anderson ab09ba8834 - graphics API: redo the code for backwards compatibility with V5 so that
at most one regular and one full-screen graphics window can be open,
    and a "hide" message kills the full-screen window if one exists,
    else a regular window.
    Keep track of the PIDs separately for regular and full-screen.
    Also, don't send a "hide" ack if we don't do graphics.

svn path=/trunk/boinc/; revision=13697
2007-09-28 04:23:34 +00:00
David Anderson 7bdacec895 - API: debug the code for handling V5 graphics messages
in a V6 app (and launching/killing the graphics app)
	- API: start timer thread even if in standalone mode
		(needed to get timer callbacks for V6 graphics)
	- API: remove BOINCSetForegroundWindow stuff
	- API: call DestroyWindow instead of boinc_exit() in WM_CLOSE.
		boinc_exit() is the wrong thing to call - e.g. it tries to delete
		the lock file, resulting in a 5-sec delay on exit

svn path=/trunk/boinc/; revision=13679
2007-09-27 03:34:27 +00:00
David Anderson c0c6cf779d - file upload handler:
in get_file_size() RPC, check if volume has < 1MB available space
    and if so return transient error.
    This prevents client from trying upload,
    which apparently sends entire file even if
    handler fails at the beginning
- API, Win: remove use of GetTickCount(); use dtime() instead
- use new BOINC logo in sample project home page

svn path=/trunk/boinc/; revision=13574
2007-09-12 08:25:22 +00:00
Charlie Fenton 902b5a4597 Fx a compiler warning
svn path=/trunk/boinc/; revision=13545
2007-09-05 11:12:32 +00:00
David Anderson dabba949a4 - client: when a job finishes, read last (not first) 63KB of stderr
- client: parse <cpid_time> in scheduler reply;
        add cpid_time field to PROJECT.
        This defaults to the user_create_time.
        In deciding which CPID to send in a scheduler request,
        use the one with oldest cpid_time (not user_create_time).
        This is the client half of fixing a bug that causes
        CPID to flip/flop between to values in a certain case.

svn path=/trunk/boinc/; revision=13531
2007-09-03 23:00:22 +00:00
David Anderson 9debbe3b4f screensaver fix
svn path=/trunk/boinc/; revision=13395
2007-08-16 23:52:40 +00:00
Rom Walton 05cee3eb0d - SCR: Fix the new screensaver so that it doesn't start a new
graphics window every second.
    - LIB: CreateProcess always returns a 1 on success, which means
           the last part of the run_program function was never being
           executed.
    
    clientscr/
        screensaver_win.cpp
    lib/
        util.C

svn path=/trunk/boinc/; revision=13323
2007-08-15 15:25:52 +00:00
David Anderson e1a0c552e2 - compile fixes for Win
client/
		acct_setup.C
		cs_prefs.C
		cs_trickle.C
	lib/
		filesys.C
		str_util.C,h
		util.C,h
	tools/
		updater.C
	win_build/
		sim.vcproj

svn path=/trunk/boinc/; revision=12985
2007-06-22 20:17:08 +00:00
David Anderson 7b74befedc - client: when you read a file into a string with:
loop
            read a line X
            S += X
    it performs real bad if the file is large
    (allocation of std::string seems to stupid)
    So I changed this to
        find file size n
        read file into malloced buf size n
        S = buf
        free buf
- lib: moved functions to appropriate file
        
client/
    acct_setup.C
    cs_prefs.C
lib/
    parse.C,h
    str_util.C,h
    util.C,h

svn path=/trunk/boinc/; revision=12983
2007-06-22 18:53:55 +00:00
David Anderson 6b4e912b27 - random compile warning fixes
client/
    auto_update.C
    file_names.h
    scheduler_op.C
    time_stats.C
lib/
    util.C,h
tools/
    create_work.C
    updater.C

svn path=/trunk/boinc/; revision=12971
2007-06-20 23:16:30 +00:00
David Anderson f5d94818dd - added "census", a program that counts up how much RAC
there is for each HR class, and writes it to a file.
    This will be used soon for HR support in the feeder.
- split the HR code into hr.C,h (stuff used by both census and scheduler)
    and sched_hr.C (stuff used only by the scheduler)
- database: change DB_CREDITED_JOB to treat workunitid
    as a double (which it is) rather than a long.
    BTW, long == int.
- fixed lots of compile warnings in the server code

db/
    boinc_db.C,h
lib/
    boinc_cmd.C
    miofile.C
    util.C
sched/
    Makefile.am
    census.C (new)
    feeder.C
    file_deleter.C
    file_upload_handler.C
    handle_request.C
    hr.C,h (new)
    main.C
    sample_assimilator.C
    sample_work_generator.C
    sched_array.C
    sched_hr.C,h
    sched_send.C
    server_types.C
    transitioner.C
    validator.C

svn path=/trunk/boinc/; revision=12970
2007-06-20 22:34:06 +00:00
David Anderson 55a060a003 - manager: v6 graphics fixes.
Works now, with a few problems

	clientgui/
		ViewWork.cpp
	lib/
		util.C

svn path=/trunk/boinc/; revision=12966
2007-06-20 03:35:16 +00:00
David Anderson b7fad32d14 svn path=/trunk/boinc/; revision=12960 2007-06-19 15:46:53 +00:00
David Anderson 90374052f2 - debug version 6-style graphics on Windows.
New example app works now!

	api/
		graphics2.C,h
		graphics2_util.C
		graphics2_win.C
	lib/
		util.C,h

svn path=/trunk/boinc/; revision=12735
2007-05-23 21:02:19 +00:00
David Anderson f3f11e7b81 svn path=/trunk/boinc/; revision=12403 2007-04-17 18:55:20 +00:00
David Anderson c276918e96 *** empty log message ***
svn path=/trunk/boinc/; revision=12334
2007-04-09 15:40:37 +00:00
David Anderson 11869bc0be *** empty log message ***
svn path=/trunk/boinc/; revision=12333
2007-04-09 02:17:26 +00:00
David Anderson 52793262e1 *** empty log message ***
svn path=/trunk/boinc/; revision=12257
2007-03-20 23:12:22 +00:00