Changeset View
Changeset View
Standalone View
Standalone View
src/backends/mac/kauth-policy-gen-mac.cpp
Show All 27 Lines | |||||
28 | 28 | | |||
29 | void output(QList<Action> actions, const QMap<QString, QString> &domain) | 29 | void output(QList<Action> actions, const QMap<QString, QString> &domain) | ||
30 | { | 30 | { | ||
31 | AuthorizationRef auth; | 31 | AuthorizationRef auth; | ||
32 | AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &auth); | 32 | AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &auth); | ||
33 | 33 | | |||
34 | OSStatus err; | 34 | OSStatus err; | ||
35 | 35 | | |||
36 | foreach (const Action &action, actions) { | 36 | for (const Action &action : qAsConst(actions)) { | ||
37 | 37 | | |||
38 | err = AuthorizationRightGet(action.name.toLatin1().constData(), NULL); | 38 | err = AuthorizationRightGet(action.name.toLatin1().constData(), NULL); | ||
39 | 39 | | |||
40 | if (err != errAuthorizationSuccess) { | 40 | if (err != errAuthorizationSuccess) { | ||
41 | 41 | | |||
42 | QString rule; | 42 | QString rule; | ||
43 | 43 | | |||
44 | if (action.policy == QLatin1String("yes")) { | 44 | if (action.policy == QLatin1String("yes")) { | ||
Show All 22 Lines |