|
About Andrew Choi
MIDI Programs
MIDI File Player (External Device)
MIDI Destination Pop-Up Button
MIDI File Player (Internal Synth)
MusicSequence Sample Code
MIDI File Writer
MIDI Name Document Parser
NameConfigSetup
Fish Creek MIDI Framework
MidnamUtility
SysExSenderX
Other Programs
FCBlogEditor
FCBlog and Patch
Chinese Checkers Program
jyut6 ping3 Cantonese Input Method
Cocoa Sample Programs
Syntax Coloring Using Flex
NSTextField and Undo
NSToolbar
Implementing File Import
Launch Application and Open URL
Saving Uncommitted Text Field Edits
Algorithms
Jazz Chord Analysis as Optimization
Optimal Line Breaking for Music
Optimal Chord Spacing
|
|
|
|
A blog where I will write mostly about programming in Cocoa and CoreMIDI, and experiences from my ports of Emacs and XEmacs to the Mac OS.
|
Accessing Linux File Systems from OS X
|
Wednesday December 1, 2004
Im still working on my software protection and license key implementation. I cant write about it but Ive come up with a few interesting techniques that I havent read about anywhere. A bit of insight Ive gained from studying the problem and existing solutions is this: since absolute crack-proofing isnt possible, a good scheme always tries to avoid single points of failure. This may involve redundancy, multiple methods, and randomization. Code obfuscation helps. But the protection it provides is still weak if it hides a single point that may be attacked by crackers. Anyway, I can say no more :-).
Lets talk about the use of a Fedora Core Linux PC as a file server for Macs running OS X. Setting up the server was a pleasure since all the configuration programs have GUIs and can be accessed from a Mac using X11. Of course one does that by enabling X forwarding when logging in to the server (ssh with -X option).
The first method I tried was NFS. On the server side, one has to enable the nfs service by running the system-config-services program. If a firewall is running on the server, it needs to be configured to allow nfs requests from your clients. I use a program called firestarter, which does not come with the Fedora Core distribution but installing it is just a matter of downloading a RPM file and double clicking on its icon in the file manager. One then sets up the exports using the system-config-nfs program. The insecure option needs to specified for the exported volumes, as described in the NFS-HOWTO, e.g., for BSD systems. This corresponds to choosing the Allow connections from ports 1024 and higher in the General Options panel. On the client side, all one needs to do is choose the Go->Connect toServer menu item. Note that to allow file access by specific users, the uids of the accounts for that user on the two file systems must match. Unfortunately by default the first ordinary user created on OS X and Fedora Core has uid 501 and 500, respectively. The uid of an existing user can be changed using the command usermod in Linux.
NFS determines access permissions by matching IP addresses and uids. Although this is probably secure enough for my current setup, I thought it would be nice to at least have password protection. So I looked at samba. Again on the server side, the smb service needs to be enabled and the firewall needs to be configured to let the traffic through. Then, the system-config-samba program can be used to specify the export directories. To export my home directory, e.g., I added the samba user choi and specify my samba password. Then I added an export for the directory /home/choi and grant the user choi read and write access. On the client (OS X) side, I choose Go->Connect toServer in the Finder and enter the server address smb://server/choi (where server is the name of the server). A nice option provided by the Finder at this time allows the samba password to be saved to my keychain.
After copying a few large directories, Ive noticed samba works a bit faster than NFS for this client-server combination.
Another method I use for sharing files doesnt require set up at all. It uses rsync, which will work as long as we can login to the server using ssh. Heres the command I use to backup an Xcode project Proj to the machine server.
rsync --exclude "build/" -azv . choi@server:Documents/Proj/
Rsync is nice because it only transfers the data that is necessary to synchronize the two sides.
|
| December 2004 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
1 |
2 |
3 |
4 |
← |
| 5 |
6 |
7 |
8 |
9 |
10 |
11 |
• |
| 12 |
13 |
14 |
15 |
16 |
17 |
18 |
| 19 |
20 |
21 |
22 |
23 |
24 |
25 |
• |
| 26 |
27 |
28 |
29 |
30 |
31 |
|
Search this blog with
Lists
Less-Known Facts About Emacs
Emacs Rants
Chinese Restaurants in Calgary
Calgary/Banff Tourist Attractions
C++ Reading List
Science Fiction Series
Top-10 Reason I Stopped Working on Emacs
Top-10 Types of Questions I Get About Emacs
10 Defining Moments as Programmer
Misc
Carbon XEmacs
Emacs for
Mac OS X
|