Changeset 4011
- Timestamp:
- 04/02/06 14:21:33 (2 years ago)
- Files:
-
- WiredServer/trunk/WCAccountsController.m (modified) (2 diffs)
- WiredServer/trunk/WCConfigController.m (modified) (7 diffs)
- WiredServer/trunk/WCDashboardController.h (modified) (1 diff)
- WiredServer/trunk/WCDashboardController.m (modified) (1 diff)
- WiredServer/trunk/wired.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredServer/trunk/WCAccountsController.m
r3950 r4011 271 271 if([controller movePath:temp toPath:path]) { 272 272 if([controller changeOwnerOfPath:path 273 toOwner:[config stringForKey:@"user"]273 toUser:[config stringForKey:@"user"] 274 274 group:[config stringForKey:@"group"]]) { 275 275 _touched = NO; … … 300 300 if([controller movePath:temp toPath:path]) { 301 301 if([controller changeOwnerOfPath:path 302 toOwner:[config stringForKey:@"user"]302 toUser:[config stringForKey:@"user"] 303 303 group:[config stringForKey:@"group"]]) { 304 304 _touched = NO; WiredServer/trunk/WCConfigController.m
r3950 r4011 49 49 50 50 - (void)_setLaunchesAtBoot:(BOOL)value; 51 - (void)_changeOwnerOfPrefixPathToUser:(NSString *)user group:(NSString *)group; 51 52 52 53 @end … … 252 253 253 254 - (BOOL)_writeToFile:(NSString *)path { 254 NSString *temp ;255 NSString *temp, *owner; 255 256 WCDashboardController *controller; 256 257 … … 333 334 if([_config writeToFile:temp]) { 334 335 if([controller movePath:temp toPath:path]) { 335 if([controller changeOwnerOfPath: [WCSettings objectForKey:WCPrefixPath]336 toOwner:[_config stringForKey:@"user"]336 if([controller changeOwnerOfPath:path 337 toUser:[_config stringForKey:@"user"] 337 338 group:[_config stringForKey:@"group"]]) { 339 owner = [[NSFileManager defaultManager] ownerAtPath:[WCSettings objectForKey:WCPrefixPath]]; 340 341 if(![owner isEqualToString:[_config stringForKey:@"user"]]) 342 [self _changeOwnerOfPrefixPathToUser:[_config stringForKey:@"user"] group:[_config stringForKey:@"group"]]; 343 338 344 _touched = NO; 339 345 … … 359 365 if([controller movePath:temp toPath:path]) { 360 366 if([controller changeOwnerOfPath:path 361 toOwner:[_config stringForKey:@"user"]367 toUser:[_config stringForKey:@"user"] 362 368 group:[_config stringForKey:@"group"]]) 363 369 return YES; … … 382 388 if([controller createFileAtPath:path]) { 383 389 [controller changeOwnerOfPath:path 384 toOwner:[_config stringForKey:@"user"]390 toUser:[_config stringForKey:@"user"] 385 391 group:[_config stringForKey:@"group"]]; 386 392 } 387 393 } else { 388 394 [controller removeFileAtPath:path]; 395 } 396 } 397 398 399 400 - (void)_changeOwnerOfPrefixPathToUser:(NSString *)user group:(NSString *)group { 401 NSEnumerator *enumerator; 402 NSString *path, *file; 403 WCDashboardController *controller; 404 405 controller = [WCDashboardController dashboardController]; 406 path = [WCSettings objectForKey:WCPrefixPath]; 407 408 if(![controller changeOwnerOfPath:path toUser:user group:group]) 409 return; 410 411 enumerator = [[[NSFileManager defaultManager] directoryContentsAtPath:path] objectEnumerator]; 412 413 while((file = [enumerator nextObject])) { 414 if(![controller changeOwnerOfPath:[path stringByAppendingPathComponent:file] toUser:user group:group]) 415 return; 389 416 } 390 417 } … … 667 694 if([controller movePath:temp toPath:path]) { 668 695 if([controller changeOwnerOfPath:path 669 toOwner:[_config stringForKey:@"user"]696 toUser:[_config stringForKey:@"user"] 670 697 group:[_config stringForKey:@"group"]]) { 671 698 [_config setString:path forKey:@"banner"]; … … 759 786 if([controller movePath:temp toPath:path]) { 760 787 if([controller changeOwnerOfPath:path 761 toOwner:[_config stringForKey:@"user"]788 toUser:[_config stringForKey:@"user"] 762 789 group:[_config stringForKey:@"group"]]) { 763 790 [_config setString:WCExpandWiredPath(@"etc/certificate.pem") forKey:@"certificate"]; WiredServer/trunk/WCDashboardController.h
r3950 r4011 58 58 - (BOOL)movePath:(NSString *)fromPath toPath:(NSString *)toPath; 59 59 - (BOOL)removeFileAtPath:(NSString *)path; 60 - (BOOL)changeOwnerOfPath:(NSString *)path to Owner:(NSString *)user group:(NSString *)group;60 - (BOOL)changeOwnerOfPath:(NSString *)path toUser:(NSString *)user group:(NSString *)group; 61 61 62 62 - (IBAction)start:(id)sender; WiredServer/trunk/WCDashboardController.m
r3950 r4011 291 291 292 292 293 - (BOOL)changeOwnerOfPath:(NSString *)path to Owner:(NSString *)user group:(NSString *)group {293 - (BOOL)changeOwnerOfPath:(NSString *)path toUser:(NSString *)user group:(NSString *)group { 294 294 NSArray *arguments; 295 295 296 296 arguments = [NSArray arrayWithObjects: 297 @"- Rh",297 @"-h", 298 298 [NSSWF:@"%@:%@", user, group], 299 299 path, WiredServer/trunk/wired.sh
r3989 r4011 92 92 93 93 lipo -create $HL2WIRED_BINARIES -output run/hl2wired || exit 1 94 lipo -create $WIRED_BINARIES -output run/wired || exit 1 94 lipo -create $WIRED_BINARIES -output run/wired || exit 1 95 95 96 96 # Install wired into /Library/Wired
