Skip to content

Commit 05c5ba9

Browse files
committed
update test recipe for Sonoma
1 parent 4549d06 commit 05c5ba9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/cookbooks/macos_test/recipes/remote_access.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22

33
tcc_db_path = '/Library/Application Support/com.apple.TCC/TCC.db'
44

5+
tcc_db_screensharing_entry = if node['platform_version'] >= '14'
6+
"'com.apple.screensharing.agent',0,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1700100444,NULL,NULL,'UNUSED',0);"
7+
else
8+
"'com.apple.screensharing.agent',0,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1639743960);"
9+
end
10+
511
execute 'authorize screensharing client to utilize the kTCCServicePostEvent service' do
6-
command ['/usr/bin/sqlite3', tcc_db_path, "INSERT OR REPLACE INTO access VALUES('kTCCServicePostEvent','com.apple.screensharing.agent',0,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1639743960);" ]
12+
command ['/usr/bin/sqlite3', tcc_db_path, "INSERT OR REPLACE INTO access VALUES('kTCCServicePostEvent',#{tcc_db_screensharing_entry}" ]
713
not_if { RemoteManagement::TCC::DB.correct_privileges? }
814
only_if { shell_out('/usr/sbin/system_profiler', 'SPSoftwareDataType').stdout.match?(Regexp.new('System Integrity Protection: Disabled')) }
915
end
1016

1117
execute 'authorize screensharing client to utilize the kTCCServiceScreenCapture service' do
12-
command ['/usr/bin/sqlite3', tcc_db_path, "INSERT OR REPLACE INTO access VALUES ('kTCCServiceScreenCapture','com.apple.screensharing.agent',0,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1639743960);" ]
18+
command ['/usr/bin/sqlite3', tcc_db_path, "INSERT OR REPLACE INTO access VALUES ('kTCCServiceScreenCapture',#{tcc_db_screensharing_entry}" ]
1319
not_if { RemoteManagement::TCC::DB.correct_privileges? }
1420
only_if { shell_out('/usr/sbin/system_profiler', 'SPSoftwareDataType').stdout.match?(Regexp.new('System Integrity Protection: Disabled')) }
1521
end

0 commit comments

Comments
 (0)