Skip to content

Commit 429e873

Browse files
committed
Uploading Privileges 1.5.4 source code
Uploading Privileges 1.5.4 source code, which includes security updates to address CVE-2023-40307.
1 parent 5ab148e commit 429e873

40 files changed

+146
-123
lines changed

source/Constants.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Constants.h
3-
Copyright 2022 SAP SE
3+
Copyright 2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -15,28 +15,28 @@
1515
limitations under the License.
1616
*/
1717

18-
#define kMTAdminGroupID 80
19-
#define kMTDockTimeoutDefault 20
20-
#define kMTReasonMinLengthDefault 10
21-
#define kMTReasonMaxLengthDefault 100
22-
#define kMTFixedTimeoutValues @[@0, @5, @10, @20, @60]
18+
#define kMTAdminGroupID 80
19+
#define kMTDockTimeoutDefault 20
20+
#define kMTReasonMinLengthDefault 10
21+
#define kMTReasonMaxLengthDefault 100
22+
#define kMTFixedTimeoutValues @[@0, @5, @10, @20, @60]
2323

24-
#define kMTDefaultsToggleTimeout @"DockToggleTimeout"
25-
#define kMTDefaultsToggleMaxTimeout @"DockToggleMaxTimeout"
26-
#define kMTDefaultsEnforcePrivileges @"EnforcePrivileges"
27-
#define kMTDefaultsAuthRequired @"RequireAuthentication"
28-
#define kMTDefaultsLimitToUser @"LimitToUser"
29-
#define kMTDefaultsLimitToGroup @"LimitToGroup"
30-
#define kMTDefaultsRequireReason @"ReasonRequired"
31-
#define kMTDefaultsReasonMinLength @"ReasonMinLength"
32-
#define kMTDefaultsReasonMaxLength @"ReasonMaxLength"
33-
#define kMTDefaultsReasonPresets @"ReasonPresetList"
34-
#define kMTDefaultsRemoteLogging @"RemoteLogging"
35-
#define kMTDefaultsRLServerType @"ServerType"
36-
#define kMTDefaultsRLServerAddress @"ServerAddress"
37-
#define kMTDefaultsRLServerPort @"ServerPort"
38-
#define kMTDefaultsRLEnableTCP @"EnableTCP"
39-
#define kMTDefaultsRLSyslogOptions @"SyslogOptions"
40-
#define kMTDefaultsRLSyslogFacility @"LogFacility"
41-
#define kMTDefaultsRLSyslogSeverity @"LogSeverity"
42-
#define kMTDefaultsRLSyslogMaxSize @"MaximumMessageSize"
24+
#define kMTDefaultsToggleTimeout @"DockToggleTimeout"
25+
#define kMTDefaultsToggleMaxTimeout @"DockToggleMaxTimeout"
26+
#define kMTDefaultsEnforcePrivileges @"EnforcePrivileges"
27+
#define kMTDefaultsAuthRequired @"RequireAuthentication"
28+
#define kMTDefaultsLimitToUser @"LimitToUser"
29+
#define kMTDefaultsLimitToGroup @"LimitToGroup"
30+
#define kMTDefaultsRequireReason @"ReasonRequired"
31+
#define kMTDefaultsReasonMinLength @"ReasonMinLength"
32+
#define kMTDefaultsReasonMaxLength @"ReasonMaxLength"
33+
#define kMTDefaultsReasonPresets @"ReasonPresetList"
34+
#define kMTDefaultsRemoteLogging @"RemoteLogging"
35+
#define kMTDefaultsRLServerType @"ServerType"
36+
#define kMTDefaultsRLServerAddress @"ServerAddress"
37+
#define kMTDefaultsRLServerPort @"ServerPort"
38+
#define kMTDefaultsRLEnableTCP @"EnableTCP"
39+
#define kMTDefaultsRLSyslogOptions @"SyslogOptions"
40+
#define kMTDefaultsRLSyslogFacility @"LogFacility"
41+
#define kMTDefaultsRLSyslogSeverity @"LogSeverity"
42+
#define kMTDefaultsRLSyslogMaxSize @"MaximumMessageSize"

source/MTAuthCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
MTAuthCommon.h
3-
Copyright 2016-2022 SAP SE
3+
Copyright 2016-2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

source/MTAuthCommon.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
MTAuthCommon.m
3-
Copyright 2016-2022 SAP SE
3+
Copyright 2016-2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

source/MTIdentity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
MTIdentity.h
3-
Copyright 2016-2022 SAP SE
3+
Copyright 2016-2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

source/MTIdentity.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
MTIdentity.m
3-
Copyright 2016-2022 SAP SE
3+
Copyright 2016-2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

source/Privileges.xcodeproj/project.pbxproj

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,8 @@
524524
ADA960591C905F36002AEFEA /* Project object */ = {
525525
isa = PBXProject;
526526
attributes = {
527-
LastUpgradeCheck = 1400;
527+
BuildIndependentTargetsInParallel = YES;
528+
LastUpgradeCheck = 1500;
528529
ORGANIZATIONNAME = "SAP SE";
529530
TargetAttributes = {
530531
AD703CF22385361700A8D946 = {
@@ -822,8 +823,8 @@
822823
ENABLE_HARDENED_RUNTIME = YES;
823824
GCC_C_LANGUAGE_STANDARD = gnu11;
824825
INFOPLIST_FILE = PrivilegesXPC/Info.plist;
825-
MACOSX_DEPLOYMENT_TARGET = 10.12;
826-
MARKETING_VERSION = 1.5.3;
826+
MACOSX_DEPLOYMENT_TARGET = 10.13;
827+
MARKETING_VERSION = 1.5.4;
827828
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
828829
MTL_FAST_MATH = YES;
829830
PRODUCT_BUNDLE_IDENTIFIER = corp.sap.privileges.xpc;
@@ -849,8 +850,8 @@
849850
ENABLE_HARDENED_RUNTIME = YES;
850851
GCC_C_LANGUAGE_STANDARD = gnu11;
851852
INFOPLIST_FILE = PrivilegesXPC/Info.plist;
852-
MACOSX_DEPLOYMENT_TARGET = 10.12;
853-
MARKETING_VERSION = 1.5.3;
853+
MACOSX_DEPLOYMENT_TARGET = 10.13;
854+
MARKETING_VERSION = 1.5.4;
854855
MTL_FAST_MATH = YES;
855856
PRODUCT_BUNDLE_IDENTIFIER = corp.sap.privileges.xpc;
856857
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -985,13 +986,14 @@
985986
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
986987
);
987988
INFOPLIST_FILE = Privileges/Info.plist;
989+
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
988990
LD_RUNPATH_SEARCH_PATHS = (
989991
"$(inherited)",
990992
"@loader_path/../Frameworks",
991993
"@executable_path/../Frameworks",
992994
);
993-
MACOSX_DEPLOYMENT_TARGET = 10.12;
994-
MARKETING_VERSION = 1.5.3;
995+
MACOSX_DEPLOYMENT_TARGET = 10.13;
996+
MARKETING_VERSION = 1.5.4;
995997
PRODUCT_BUNDLE_IDENTIFIER = corp.sap.privileges;
996998
PRODUCT_NAME = "$(TARGET_NAME)";
997999
};
@@ -1016,13 +1018,14 @@
10161018
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
10171019
);
10181020
INFOPLIST_FILE = Privileges/Info.plist;
1021+
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
10191022
LD_RUNPATH_SEARCH_PATHS = (
10201023
"$(inherited)",
10211024
"@loader_path/../Frameworks",
10221025
"@executable_path/../Frameworks",
10231026
);
1024-
MACOSX_DEPLOYMENT_TARGET = 10.12;
1025-
MARKETING_VERSION = 1.5.3;
1027+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1028+
MARKETING_VERSION = 1.5.4;
10261029
PRODUCT_BUNDLE_IDENTIFIER = corp.sap.privileges;
10271030
PRODUCT_NAME = "$(TARGET_NAME)";
10281031
};
@@ -1038,7 +1041,8 @@
10381041
DEVELOPMENT_TEAM = 7R5ZEU67FQ;
10391042
ENABLE_HARDENED_RUNTIME = YES;
10401043
INFOPLIST_FILE = "PrivilegesHelper/PrivilegesHelper-Info.plist";
1041-
MARKETING_VERSION = 1.5.3;
1044+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1045+
MARKETING_VERSION = 1.5.4;
10421046
OTHER_LDFLAGS = (
10431047
"-sectcreate",
10441048
__TEXT,
@@ -1061,7 +1065,8 @@
10611065
DEVELOPMENT_TEAM = 7R5ZEU67FQ;
10621066
ENABLE_HARDENED_RUNTIME = YES;
10631067
INFOPLIST_FILE = "PrivilegesHelper/PrivilegesHelper-Info.plist";
1064-
MARKETING_VERSION = 1.5.3;
1068+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1069+
MARKETING_VERSION = 1.5.4;
10651070
OTHER_LDFLAGS = (
10661071
"-sectcreate",
10671072
__TEXT,
@@ -1085,7 +1090,8 @@
10851090
DEVELOPMENT_TEAM = 7R5ZEU67FQ;
10861091
ENABLE_HARDENED_RUNTIME = YES;
10871092
INFOPLIST_FILE = "$(SRCROOT)/PrivilegesCLI/PrivilegesCLI-Info.plist";
1088-
MARKETING_VERSION = 1.5.3;
1093+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1094+
MARKETING_VERSION = 1.5.4;
10891095
OTHER_LDFLAGS = "";
10901096
PRODUCT_BUNDLE_IDENTIFIER = corp.sap.privileges.cli;
10911097
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1104,7 +1110,8 @@
11041110
DEVELOPMENT_TEAM = 7R5ZEU67FQ;
11051111
ENABLE_HARDENED_RUNTIME = YES;
11061112
INFOPLIST_FILE = "$(SRCROOT)/PrivilegesCLI/PrivilegesCLI-Info.plist";
1107-
MARKETING_VERSION = 1.5.3;
1113+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1114+
MARKETING_VERSION = 1.5.4;
11081115
OTHER_LDFLAGS = "";
11091116
PRODUCT_BUNDLE_IDENTIFIER = corp.sap.privileges.cli;
11101117
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1149,7 +1156,8 @@
11491156
GCC_WARN_UNUSED_FUNCTION = YES;
11501157
INFOPLIST_FILE = PrivilegesTile/Info.plist;
11511158
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
1152-
MARKETING_VERSION = 1.5.3;
1159+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1160+
MARKETING_VERSION = 1.5.4;
11531161
OTHER_LDFLAGS = (
11541162
"-framework",
11551163
AppKit,
@@ -1202,7 +1210,8 @@
12021210
GCC_WARN_UNUSED_FUNCTION = YES;
12031211
INFOPLIST_FILE = PrivilegesTile/Info.plist;
12041212
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
1205-
MARKETING_VERSION = 1.5.3;
1213+
MACOSX_DEPLOYMENT_TARGET = 10.13;
1214+
MARKETING_VERSION = 1.5.4;
12061215
OTHER_LDFLAGS = (
12071216
"-framework",
12081217
AppKit,

source/Privileges/AppDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
AppDelegate.h
3-
Copyright 2016-2022 SAP SE
3+
Copyright 2016-2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

source/Privileges/AppDelegate.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
AppDelegate.m
3-
Copyright 2016-2022 SAP SE
3+
Copyright 2016-2023 SAP SE
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -190,13 +190,13 @@ - (void)changeAdminGroup:(NSString*)userName remove:(BOOL)remove
190190
[self connectAndExecuteCommandBlock:^(NSError *connectError) {
191191

192192
if (connectError) {
193-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! %{public}@", connectError);
193+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: %{public}@", connectError);
194194
[self displayErrorNotificationAndExit];
195195

196196
} else {
197197

198198
[[self.helperToolConnection remoteObjectProxyWithErrorHandler:^(NSError *proxyError) {
199-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! %{public}@", proxyError);
199+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: %{public}@", proxyError);
200200
[self displayErrorNotificationAndExit];
201201

202202
}] changeAdminRightsForUser:userName
@@ -206,7 +206,7 @@ - (void)changeAdminGroup:(NSString*)userName remove:(BOOL)remove
206206
withReply:^(NSError *error) {
207207

208208
if (error) {
209-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! Unable to change privileges: %{public}@", error);
209+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: Unable to change privileges: %{public}@", error);
210210
[self displayErrorNotificationAndExit];
211211

212212
} else {
@@ -285,12 +285,12 @@ - (void)checkForHelper
285285

286286
- (void)helperCheckFailed:(NSString*)errorMessage
287287
{
288-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! %{public}@", errorMessage);
288+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: %{public}@", errorMessage);
289289

290290
[self connectToXPCService];
291291
[[self.xpcServiceConnection remoteObjectProxyWithErrorHandler:^(NSError *proxyError) {
292292

293-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! %{public}@", proxyError);
293+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: %{public}@", proxyError);
294294

295295
[self displayDialog:NSLocalizedString(@"notificationText_Error", nil)
296296
messageText:nil
@@ -309,7 +309,7 @@ - (void)helperCheckFailed:(NSString*)errorMessage
309309

310310
} else {
311311

312-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! Installation of the helper tool failed: %{public}@", installError);
312+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: Installation of the helper tool failed: %{public}@", installError);
313313

314314
[self displayDialog:NSLocalizedString(@"notificationText_Error", nil)
315315
messageText:nil
@@ -841,11 +841,11 @@ -(void)applicationWillTerminate:(NSNotification *)aNotification
841841
[self connectAndExecuteCommandBlock:^(NSError * connectError) {
842842

843843
if (connectError) {
844-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! %{public}@", connectError);
844+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: %{public}@", connectError);
845845
} else {
846846

847847
[[self.helperToolConnection remoteObjectProxyWithErrorHandler:^(NSError *proxyError) {
848-
os_log(OS_LOG_DEFAULT, "SAPCorp: ERROR! %{public}@", proxyError);
848+
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_ERROR, "SAPCorp: %{public}@", proxyError);
849849
}] quitHelperTool];
850850
}
851851
}

source/Privileges/Base.lproj/MainMenu.xib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21179.7" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21179.7"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
66
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
77
</dependencies>
88
<objects>

source/Privileges/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>1330</string>
22+
<string>1375</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>
2626
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2727
<key>NSDockTilePlugIn</key>
2828
<string>PrivilegesTile.docktileplugin</string>
2929
<key>NSHumanReadableCopyright</key>
30-
<string>Copyright © 2016-2022 SAP SE. All rights reserved.</string>
30+
<string>Copyright © 2016-2023 SAP SE. All rights reserved.</string>
3131
<key>NSMainNibFile</key>
3232
<string>MainMenu</string>
3333
<key>NSPrincipalClass</key>

0 commit comments

Comments
 (0)