KAuth
AuthServicesBackend.cpp
26 AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &s_authRef);
40 // errAuthorizationInteractionNotAllowed = -60007, /* The authorization was denied since no user interaction was possible. */
42 // errAuthorizationExternalizeNotAllowed = -60009, /* The authorization is not allowed to be converted to an external format. */
43 // errAuthorizationInternalizeNotAllowed = -60010, /* The authorization is not allowed to be created from an external format. */
44 // errAuthorizationInvalidFlags = -60011, /* The provided option flag(s) are invalid for this authorization operation. */
45 // errAuthorizationToolExecuteFailure = -60031, /* The specified program could not be executed. */
46 // errAuthorizationToolEnvironmentError = -60032, /* An invalid status was returned during execution of a privileged tool. */
47 // errAuthorizationBadAddress = -60033, /* The requested socket address is invalid (must be 0-1023 inclusive). */
48 static OSStatus GetActionRights(const QString &action, AuthorizationFlags flags, AuthorizationRef auth)
60 OSStatus result = AuthorizationCopyRights(auth, &rights, kAuthorizationEmptyEnvironment, flags, NULL);
88 OSStatus result = GetActionRights(action, kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed, authRef());
89 qCDebug(KAUTH_OSX) << "AuthServicesBackend::authorizeAction(" << action << ") AuthorizationCopyRights returned" << result;
122 OSStatus result = GetActionRights(action, kAuthorizationFlagExtendRights | kAuthorizationFlagPreAuthorize, authRef());
123 qCDebug(KAUTH_OSX) << "AuthServicesBackend::actionStatus(" << action << ") AuthorizationCopyRights returned" << result;
151 bool AuthServicesBackend::isCallerAuthorized(const QString &action, const QByteArray &callerID, const QVariantMap &details)
161 qCWarning(KAUTH_OSX()) << "AuthorizationCreateFromExternalForm(" << action << "," << callerID.constData() << ") failed";
165 OSStatus result = GetActionRights(action, kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed, auth);
168 qCDebug(KAUTH_OSX) << "AuthServicesBackend::isCallerAuthorized(" << action << "," << callerID.constData() << ") AuthorizationCopyRights returned" << result;
@ AuthorizedStatus
The authorization has been granted by the authorization backend.
Definition: action.h:86
QByteArray toUtf8() const const
Definition: action.cpp:18
const char * constData() const const
@ UserCancelledStatus
The user pressed Cancel the authentication dialog. Currently used only on the mac.
Definition: action.h:88
@ DeniedStatus
The authorization has been denied by the authorization backend.
Definition: action.h:83
@ AuthRequiredStatus
The user could obtain the authorization after authentication.
Definition: action.h:87
char * data()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Feb 5 2023 04:14:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Feb 5 2023 04:14:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.