osx: let prefpane knows where binaries can be found 07/12507/2
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Wed, 11 Jan 2017 14:05:04 +0000 (06:05 -0800)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 12 Jan 2017 03:47:47 +0000 (22:47 -0500)
Starting from OS X 10.11, the OpenAFS binaries were moved to the
following directories: /opt/openafs/bin and /opt/openafs/sbin. However,
the OpenAFS prefpane is not aware of the change mentioned above. As a
result, some functionalities provided by the OpenAFS prefpane are not
working properly.

To fix this problem, add the new paths to the proper environment
variable.

Change-Id: Idaa2f0329af2092cf9ad1d63f1a01300b150227a
Reviewed-on: https://gerrit.openafs.org/12507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/platform/DARWIN/AFSPreference/TaskUtil.m

index 3c94524..5eaed2d 100644 (file)
@@ -42,7 +42,7 @@
        NSString *result = nil;
        int status = 0;
        NSFileHandle *file = nil;
-       NSDictionary *environment =  [NSDictionary dictionaryWithObjectsAndKeys: @"$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin",@"PATH",nil];
+       NSDictionary *environment = [NSDictionary dictionaryWithObjectsAndKeys: @"$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/openafs/bin:/opt/openafs/sbin",@"PATH",nil];
                
        NSPipe *pipe = [NSPipe pipe];
        NSTask *taskToRun  = [[NSTask alloc] init];