Hello,i am planning to deploy a rebranded version of Tunnelblick with Munki, the only issue i have so long is that Tunnelblick ask for administrative rights on the first run but none of my standard users have and should have those rights. Is there a way to run those tasks in the moment of the installation via a script?RegardsHenning--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tunnelblick-dis...@googlegroups.com.
Visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks for your fast response.as the installer of Munki runs with administrative privileges i will try to run the "installer" program as a postinstall script, hopefully that will work. I will give a response how it worked outRegardsHenning
To unsubscribe from this group and stop receiving emails from it, send an email to tunnelblick-discuss+unsub...@googlegroups.com.
Visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
sudo install 4
sudo install 16
I tried serval different possibilities but had no success in guessing the right syntax.a sudo ./installer 0x0004u (in define.h: #define INSTALLER_SECURE_APP 0x0004u) give the following log entry:APPNAME installer started 2013-05-30 13:53:53. 1 arguments: 0x0000
Unable to create directory /var/root/Library/Application Support/VCCPTunnel with permissions 750
stat of /tmp/tunnelblick-authorized-running failed
Error was 'No such file or directory'
the logentry from the standard firstrun looks like this:
APPNAME installer started 2013-05-30 13:30:53. 1 arguments: 0x0005
of course i also tried the 0x0005 but same result as above ;-)
What i am doing wrong?
Any help is appreciated especially I am a total rookie in terms of interpreting code from an app ;-)
Regards
Henning
To unsubscribe from this group and stop receiving emails from it, send an email to tunnelblick-discuss+unsubscribe...@googlegroups.com.
Visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tunnelblick-discuss+unsub...@googlegroups.com.
Visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Thank for you help again.you are right sudo won't make the trick and unfortunately munki neither as it is started by a launchd with root privileges.but looking at the logs of standard successful first run, you can see all needed commands to secure the application. I tried to do this via a script and was quite successful with that. the only side effect was that the code signing broke ;-).Henning
Unfortunately that was exact the way i did this.I even double checked this again by running codesign --verify /Applications/THEAPP.app before and after I run the following commands:chown -R 0:0 /Applications/APPNAME.appchmod 744 /Applications/APPNAME.app/Contents/Resources/atsystemstartchmod 744 /Applications/APPNAME.app/Contents/Resources/installerchmod 744 /Applications/APPNAME.app/Contents/Resources/leasewatchchmod 744 /Applications/APPNAME.app/Contents/Resources/leasewatch3chmod 744 /Applications/APPNAME.app/Contents/Resources/process-network-changeschmod 744 /Applications/APPNAME.app/Contents/Resources/standardize-scutil-outputchmod 744 /Applications/APPNAME.app/Contents/Resources/client.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.route-pre-down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.1.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.1.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.2.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.2.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.3.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.3.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/openvpn/openvpn-2.2.1/openvpn-down-root.sochmod 744 /Applications/APPNAME.app/Contents/Resources/openvpn/openvpn-2.3.1/openvpn-down-root.sochmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/VCCP.tblk/Contents/Resources/ca.crtchmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/VCCP.tblk/Contents/Resources/client.crtchmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/VCCP.tblk/Contents/Resources/client.pemchmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/VCCP.tblk/Contents/Resources/config.ovpnchmod 4555 /Applications/APPNAME.app/Contents/Resources/openvpnstartbefore the everything was fine as nothing was returned from the command.after running the commands the codesign returned:APPNAME.app: a sealed resource is missing or invalid.In architecture: i386Henning
I use : sudo codesign -s "3rd Party Mac Developer Application: CompanyName (XXXXXXXXXXX)" APPNAME.app
codesigning the other binaries did not fix the issue.the problem seams to be in changing the files inside the .tblk to POSIX -rw-------, as by this the normal codesigning can not read the files anymore...the command: codesign --verify -vv APPNAME.app is claiming that those resources are missing.if i do a: sudo codesign --verify --vv APPNAME.app the command can read the resources and does not complain.if a start this app on a 10.8 system i get a dialog from the application itself saying that the code signing is invalid.any idea?Regards
Henning
Am Sonntag, 2. Juni 2013 14:17:52 UTC+2 schrieb he.ke...@googlemail.com:Okay that could be the issue I will give this a try as soon as possible.thanks again for your fast responseHenning
Am Sonntag, 2. Juni 2013 23:12:16 UTC+2 schrieb jkbull...gmail.com:Ah. So it is the signing of the .tblks (or parts of them) that is the problem. That's why it doesn't show up with the standard Tunnelblicks.codesign --verify fails when run as the user. Does that mean that OS X itself actually thinks the signature is invalid? In other words, when you try to run the program, does OS X allow it, or warn about it not being signed by an Apple-recognized developer (if you are one). And does OS X allow the program to use a Keychain entry that a prior version, had signed with the same signing authority?
The system is not complaining. Its only the application...
Because otherwise it's a bug in OS X.If OS X is doing it properly, I can modify Tunnelblick to check the signature as root -- I haven't looked, but I assume right now I check as the user. I think the only thing that Tunnelblick does with an invalid signature is give you a warning which you can ignore.
Even if my problem is surely a rare issue it would be great if you could find some time to modify the behavior of Tunnelblick is this case. Because telling the users that they should dismiss and not care about a security warning is probably not the wisest advice ;-).RegardsHenning
Hi Jonathan,did you already had a chance to modify the code accordingly? I just had look at the source and the most update Rev is 2402 and i am not really sure if that Rev already includes the changes...RegardsHenning
Am Sonntag, 2. Juni 2013 23:47:40 UTC+2 schrieb he.ke...@googlemail.com:Jonathan many thanks for you efforts.I will give that a try tomorrow.Best regardsHenning
Okay Jonathan now i got it :-)Just run the following test:System is 10.8.3Deploy the App by simple copying it into Applications with ARDthen I run the following script as root:#!/bin/sh#
chown -R 0:0 /Applications/APPNAME.appchmod 744 /Applications/APPNAME.app/Contents/Resources/atsystemstartchmod 744 /Applications/APPNAME.app/Contents/Resources/installerchmod 744 /Applications/APPNAME.app/Contents/Resources/leasewatchchmod 744 /Applications/APPNAME.app/Contents/Resources/leasewatch3chmod 744 /Applications/APPNAME.app/Contents/Resources/process-network-changeschmod 744 /Applications/APPNAME.app/Contents/Resources/standardize-scutil-outputchmod 744 /Applications/APPNAME.app/Contents/Resources/client.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.route-pre-down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.1.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.1.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.2.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.2.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.3.up.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/client.3.down.tunnelblick.shchmod 744 /Applications/APPNAME.app/Contents/Resources/openvpn/openvpn-2.2.1/openvpn-down-root.sochmod 744 /Applications/APPNAME.app/Contents/Resources/openvpn/openvpn-2.3.1/openvpn-down-root.so
chmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/ca.crtchmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/client.crtchmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/client.pemchmod 600 /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/config.ovpnchmod 4555 /Applications/APPNAME.app/Contents/Resources/openvpnstartmkdir -p /Library/Application\ Support/APPNAME/Logsmkdir -p /Library/Application\ Support/APPNAME/Sharedmkdir -p /Library/Application\ Support/APPNAME/Userschown -R 0:0 /Library/Application\ Support/APPNAMEchmod -R 755 /Library/Application\ Support/APPNAMEchmod 750 /Library/Application\ Support/APPNAME/Userschecking codesigning as user:mbp15:tmp admin$ codesign --verify -vv /Applications/APPNAME.app/Applications/APPNAME.app: a sealed resource is missing or invalidIn architecture: i386resource missing: /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/client.crtresource missing: /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/ca.crtresource missing: /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/client.pemresource missing: /Applications/APPNAME.app/Contents/Resources/Deploy/COMPANY.tblk/Contents/Resources/config.ovpnchecking code signing as rootmbp15:tmp admin$ sudo !!sudo codesign --verify -vv /Applications/APPNAME.appPassword:/Applications/APPNAME.app: valid on disk/Applications/APPNAME.app: satisfies its Designated Requirementmbp15:tmp admin$Starting the application gives repetitively the warning dialog from the application that the codesigning is invalid but none from the system. I then started a connecting, entered the credentials and checked the box for storing those in the Keychain.After this I ended the connection and restarted the computer and started another try and the credentials were taken from the Keychain.... :-)Sounds like an success, right?Should I check some more??RegardsHenning
Running the update test by adding "# added for update check" to the .ovpn file worked like charm.The updated application had still access to the credentials in the keychain.RegardsHenningadding "# added for update check" to the .ovpn file
Thank for you help again.you are right sudo won't make the trick and unfortunately munki neither as it is started by a launchd with root privileges.but looking at the logs of standard successful first run, you can see all needed commands to secure the application. I tried to do this via a script and was quite successful with that. the only side effect was that the code signing broke ;-).