Home
Monday, August 21, 2017
2:33:28 PM
Users online: 0   You are here >> Home > Mac

Forums | Mac Forums search
Forum FAQ
   
  1  
Dumping all sharing/access prefs via .plist
TinBane 
6/8/08 8:56:52 PM
Mod
Hero

Immortal


Does anyone know what .plists I need to dump to reset file sharing etc preferences on 10.5.2?

-----
absit iniuria verbis

Quote by MrFriendly
"Will laser burn body for clothes"



zebra 
7/8/08 7:21:14 PM
SuperHero
Titan


...Am tracing and it is hitting:

 
com.apple.security.plist
com.apple.systempreferences.plist
com.apple.sharepoint.group.x.plist
com.apple.AppleFileServer.plist
com.apple.nmbd.plist
com.apple.smbd.plist


Hope that helps.

z


Edited by zebra: 7/8/2008 07:29:14 PM

-----
Specs:

I don't own a computer.

Linux_Inside V2 
7/8/08 8:25:55 PM
Immortal

Quote by zebra
...Am tracing and it is hitting:

 
com.apple.security.plist
com.apple.systempreferences.plist
com.apple.sharepoint.group.x.plist
com.apple.AppleFileServer.plist
com.apple.nmbd.plist
com.apple.smbd.plist


Hope that helps.

z


Edited by zebra: 7/8/2008 07:29:14 PM



How did you do that!

GDB?

-----

TinBane 
7/8/08 8:38:17 PM
Mod
Hero

Immortal


Yeah, how the hell did you do that?

Thanks Zeb (and plebs, for the PM)!

Got it all sorted!

-----
absit iniuria verbis

Quote by MrFriendly
"Will laser burn body for clothes"



Slace 
7/8/08 11:07:59 PM
Hero
Titan


Add me to the "how did you do it" list!

-----

Why can't a programmer tell the difference between Halloween and Christmas? 
Because OCT31 = DEC25


What's playing? http://www.last.fm/user/slace/

zebra 
8/8/08 7:26:42 AM
SuperHero
Titan


Oh hai geebs.

Ok. Well, you all know how chummy Sun are with Apple right? ZFS, AutoFS, NFS...and...DTrace .

I used a combination of DTrace and fs_usage to look at what was passing through the kernel when I changed a system preference in the "Sharing" preference pane - as that was what TinBane wanted to know about. eg:

 
bash-3.2# fs_usage | grep -i pref
07:24:13 lstat /System/Library/PreferencePanes/SharingPref.prefPane 0.000092 System Prefe
07:24:13 stat /System/Library/PreferencePanes/SharingPref.prefPane 0.000009 System Prefe
07:24:13 access /System/Library/PreferencePanes/SharingPref.prefPane 0.000010 System Prefe
07:24:13 stat /System/Library/PreferencePanes/SharingPref.prefPane 0.000009 System Prefe
07:24:13 open /System/Library/PreferencePanes/SharingPref.prefPane 0.000018 System Prefe
07:24:13 fcntl 0.000003 System Prefe
07:24:13 fstatfs 0.000007 System Prefe
07:24:13 RdMeta 0.010930 W System Prefe
07:24:13 getdirentries 0.011088 W System Prefe
07:24:13 getdirentries 0.000048 System Prefe
07:24:13 close 0.000054 System Prefe
07:24:13 stat /System/Library/PreferencePanes/SharingPref.prefPane/Contents 0.000085 System Prefe
07:24:13 open /System/Library/PreferencePanes/SharingPref.prefPane/Contents 0.000023 System Prefe
07:24:13 fcntl 0.000003 System Prefe
07:24:13 fstatfs 0.000009 System Prefe
07:24:13 getdirentries 0.000043 System Prefe
07:24:13 getdirentries 0.000029 System Prefe
07:24:13 close 0.000022 System Prefe
07:24:13 open /dev/autofs_nowait 0.000075 System Prefe
07:24:13 open /System/Library/PreferencePanes/SharingPref.prefPane/Contents/Info.plist 0.000072 System Prefe
07:24:13 fstat 0.000006 System Prefe
07:24:13 RdData[async] 0.019654 W System Prefe
07:24:13 read 0.019748 W System Prefe
07:24:13 close 0.000060 System Prefe
07:24:13 close 0.000015 System Prefe
07:24:13 stat /System/Library/PreferencePanes/SharingPref.prefPane/Contents/Resources 0.000092 System Prefe
07:24:13 open /System/Library/PreferencePanes/SharingPref.prefPane/Contents/Resources 0.000025 System Prefe
07:24:13 fcntl 0.000004 System Prefe
07:24:13 fstatfs 0.000009 System Prefe
07:24:13 getdirentries 0.000086 System Prefe
07:24:13 getdirentries 0.000036 System Prefe
07:24:13 close 0.000029 System Prefe
07:24:13 stat Library/PreferencePanes/SharingPref.prefPane/Contents/Resources/English.lproj 0.000075 System Prefe
07:24:13 open Library/PreferencePanes/SharingPref.prefPane/Contents/Resources/English.lproj 0.000020 System Prefe
07:24:13 fcntl 0.000012 System Prefe
07:24:13 fstatfs 0.000006 System Prefe
07:24:13 RdMeta 0.000407 W System Prefe
07:24:13 getdirentries 0.000534 W System Prefe
07:24:13 getdirentries 0.000037 System Prefe
07:24:13 close 0.000024 System Prefe
07:24:13 open /dev/autofs_nowait 0.000069 System Prefe
07:24:13 open Panes/SharingPref.prefPane/Contents/Resources/English.lproj/InfoPlist.strings 0.000069 System Prefe
07:24:13 fstat 0.000006 System Prefe
07:24:13 RdData[async] 0.025016 W System Prefe
07:24:13 read 0.025105 W System Prefe
07:24:13 close 0.000061 System Prefe
07:24:13 close 0.000014 System Prefe
07:24:13 PAGE_IN 0.000008 System Prefe
07:24:13 stat ystem/Library/PreferencePanes/SharingPref.prefPane/Contents/MacOS/SharingPref 0.000011 System Prefe
07:24:13 stat ystem/Library/PreferencePanes/SharingPref.prefPane/Contents/MacOS/SharingPref 0.000010 System Prefe
07:24:13 open ystem/Library/PreferencePanes/SharingPref.prefPane/Contents/MacOS/SharingPref 0.000021 System Prefe
07:24:13 RdData[async] 0.000588 W System Prefe
07:24:13 read 0.000652 System Prefe
07:24:13 lseek 0.000004 System Prefe
07:24:13 RdData[async] 0.000279 W System Prefe
07:24:13 read 0.000323 System Prefe
07:24:13 close 0.000061 System Prefe
07:24:13 stat ystem/Library/PreferencePanes/SharingPref.prefPane/Contents/MacOS/SharingPref 0.000012 System Prefe
07:24:13 open ystem/Library/PreferencePanes/SharingPref.prefPane/Contents/MacOS/SharingPref 0.000014 System Prefe
07:24:13 pread 0.000014 System Prefe
07:24:13 pread 0.000038 System Prefe
07:24:13 RdData[async] 0.000243 W System Prefe
07:24:13 mmap 0.000222 System Prefe
07:24:13 mmap 0.000018 System Prefe
07:24:13 mmap 0.000015 System Prefe
07:24:13 mmap 0.000015 System Prefe
07:24:13 mmap 0.000036 System Prefe
07:24:13 PgIn[async] 0.000440 W System Prefe
07:24:13 PAGE_IN 0.000507 W System Prefe
07:24:13 PgIn[async] 0.000507 W System Prefe
07:24:13 PAGE_IN 0.000560 W System Prefe
07:24:13 fcntl 0.000053 System Prefe
07:24:13 close 0.000012 System Prefe
07:24:13 stat /System/Library/PrivateFrameworks/Admin.framework/Versions/A/Admin 0.000035 System Prefe
07:24:13 open /System/Library/PrivateFrameworks/Admin.framework/Versions/A/Admin 0.000021 System Prefe
07:24:13 pread 0.000020 System Prefe
07:24:13 pread 0.000011 System Prefe
07:24:13 mmap 0.000022 System Prefe
07:24:13 mmap 0.000014 System Prefe
07:24:13 mmap 0.000014 System Prefe
07:24:13 mmap 0.000014 System Prefe
07:24:13 mmap 0.000013 System Prefe
07:24:13 PAGE_IN 0.000006 System Prefe
07:24:13 RdData[async] 0.000399 W System Prefe
07:24:13 fcntl 0.000012 System Prefe
07:24:13 close 0.000011 System Prefe
07:24:13 stat /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211 0.000018 System Prefe
07:24:13 open /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211 0.000013 System Prefe


Then, we can strip it down further with DTrace probes to see the very files being tickled, or use something like fseventer to display it graphically.

Hope that helps. Tools such as fseventer are entirely free, just to let you guys know. Bloody handeh!

Technical note for Linux v2...

The thing about GDB here, or any static debug tool in this case, is that we'd have to actually set a load point and "walk" the kernel. This is sort of dangerous/ill-advised on a live/production or "used" system, as...well, as you know - you can make a mess with GDB. If we use DTrace, we have dynamic load points, so you get that cool kind of birds eye view of stuff passing a long a conveyor belt along the kerbel path - rather than walking on that conveyor belt and picking things up/interrupting the flow. It also incurrs a 0% system overhead.

Hope my analogy makes sense. You are correct all the same. GDB could do this - just not as quickly and not as safely.

z


Edited by zebra: 8/8/2008 07:38:38 AM

-----
Specs:

I don't own a computer.

TinBane 
8/8/08 8:44:25 AM
Mod
Hero

Immortal


/neo "Whoa!"

-----
absit iniuria verbis

Quote by MrFriendly
"Will laser burn body for clothes"



Slace 
8/8/08 8:48:47 AM
Hero
Titan


mmmm hawt

-----

Why can't a programmer tell the difference between Halloween and Christmas? 
Because OCT31 = DEC25


What's playing? http://www.last.fm/user/slace/

Linux_Inside V2 
8/8/08 10:53:40 AM
Immortal

Ahh true Zeb, I just never knew about DTrace - thanks for taking the time to explain in detail :)

I should've realised that was possible, being that I recently setup Dovecot on my OSX Server - which tells me all about how on Darwin/OSX it can watch for FS Events so that when a message comes in, it notifies my IDLEing clients :)

But armed with this info, I should be able to get my hands dirty messing around with even more stuff related to the inner workings of OSX and my main focus at the moment - the iPhone :D

Cheers

-----

zebra 
8/8/08 9:03:17 PM
SuperHero
Titan


Quote by Linux_Inside V2
But armed with this info, I should be able to get my hands dirty messing around with even more stuff related to the inner workings of OSX and my main focus at the moment - the iPhone :D

Cheers



Think this kind of thing would make a good atomic article? (E.g - kernel debug), or too esoteric?

-----
Specs:

I don't own a computer.

PC FREAK 
9/8/08 1:25:17 PM
Guru

It would, dunno whether youd wanna show more a few other tricks as well. But in general stuff like this = handy.

-----
Game Doesnt Support Wide Screens?
http://www.atomicmpc.com.au/forums.asp?s=2&c=26&t=21
Specs:
Q6700 | GA-X38-DQ6 (P45 On The Way) | 2GB Crucial Ballistix PC8500@1086 4-4-4-12 | HD4870 790/1100 (waiting on block) | Corsair HX520 | Antec

siegfried 
11/8/08 3:52:16 AM
Champion

I can't speak for anyone else, zebra, but I'd be lining up to read that!

-----
Otherwise known as luftkopf

Gigabyte GA-MA78GM-S2h (AMD 780G) | Athlon X2 4600+ | 2GB OCZ RAM | A couple of ancient IDE 60GB HDDs | Winfast DTV2000H | Samsung 226BW | XP SP3

Linux_Inside V2 
11/8/08 6:40:08 PM
Immortal

Quote by siegfried
I can't speak for anyone else, zebra, but I'd be lining up to read that!



+1

Make it nice and long too, I'm off work for a couple of days

-----

zebra 
11/8/08 10:12:07 PM
SuperHero
Titan


I'm in talks with the big man with the cool hair. Let you know how it goes...

-----
Specs:

I don't own a computer.

Mael 
13/8/08 4:54:14 PM
SuperHero
Titan


So this whole thing about Mac's being for computing retards...

If that isn't evidence of MAXIMUM POWER COMPUTING then I apparently have no concept of such.

-----
A long, long time ago...
I can still remember
How that music used to make me smile.
And I knew if I had my chance
That I could make those people dance
And, maybe, they’d be happy for a while.

err0r 
15/8/08 10:40:25 AM
Overlord

Quote by Mael
So this whole thing about Mac's being for computing retards...

If that isn't evidence of MAXIMUM POWER COMPUTING then I apparently have no concept of such.




Go go DTrace!

Possibly Sun's most popular software release of recent vintage - it has made it's way (or is making it's way) to nearly all the 'nixes.

Mind you, remember the uproar when it was discovered that Apple had crippled DTrace on OSX so that it wouldn't look into what Apple didn't want it looking into (iTunes comes to mind)?

-----
----------
-----

Linux_Inside V2 
16/8/08 10:47:38 AM
Immortal

Quote by err0r
Mind you, remember the uproar when it was discovered that Apple had crippled DTrace on OSX so that it wouldn't look into what Apple didn't want it looking into (iTunes comes to mind)?




wtf?!
Can't you just compile your own dtrace from sources to get around that?

-----

zebra 
16/8/08 11:02:30 AM
SuperHero
Titan


Quote by Linux_Inside V2
Quote by err0r
Mind you, remember the uproar when it was discovered that Apple had crippled DTrace on OSX so that it wouldn't look into what Apple didn't want it looking into (iTunes comes to mind)?




wtf?!
Can't you just compile your own dtrace from sources to get around that?



No, you can't, but there is another way around it anyway. It was sort of over-hyped. Apple didn't damage or taint DTrace in any way to achieve what they did. The used immutable_ticks objects in their applications to prevent tracing using certain fbt providers. Again, easy ways around it.

No biggie. You can trace what you like.

z


Edited by zebra: 16/8/2008 11:39:36 AM

-----
Specs:

I don't own a computer.

  1  
Forums | Mac