System Administrator Password

Miscellaneous Forums/MacOS X Discussion/System Administrator Password

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I think it basically comes down to this function that needs to be wrapped:

#include <assert.h>
#include <Carbon/Carbon.h>
#include <Security/Security.h>


extern OSStatus AcquireRight(const char *rightName)
    // This routine calls Authorization Services to acquire 
    // the specified right.
{
    OSStatus                         err;
    static const AuthorizationFlags  kFlags = 
                  kAuthorizationFlagInteractionAllowed 
                | kAuthorizationFlagExtendRights;
    AuthorizationItem   kActionRight = { rightName, 0, 0, 0 };
    AuthorizationRights kRights      = { 1, &kActionRight };

//    assert(gAuthorization != NULL);

    // Request the application-specific right.

    err = AuthorizationCopyRights(
        gAuthorization,         // authorization
        &kRights,               // rights
        NULL,                   // environment
        kFlags,                 // flags
        NULL                    // authorizedRights
    );

    return err;
}



However, this needs to be linked against the security framework, and I don´t know how to explain this to the BlitzMax compiler. In Xcode, they just "add" the core frameworks and it compiles. How would you do that in Max?