MIG & RPC Fun


Index


Why can't I make Mach calls unless I'm root (under MkLinux)?

It seems like the programmers working on the MkLinux mach server (and perhaps other servers as well?) decided that making Mach system calls exposed a possible security hole (I dunno what kind...), making them resort to prohibiting their use by processes not running with the uid of root (0).


What do all these strange acronyms mean?

There are a number of acronyms that are frequently used when dealing with Mach remote messaging stuff. Here's a small listing of some of them with their expanded meanings:


What is the general procedure for making a Mach RPC system?

The general procedure for making an RPC system, or subsystem, is as follows:

  1. Make a .defs file to define the facilities and protocols provided by your subsystem
  2. Run your .defs file through mig. Mig will produce three files (xxxServer.c, xxxUser.c, and xxxUser.h, where xxx is the name of the subsystem defined).
  3. Make a server process that receives mach messages on a particular port, perhaps in a loop, using mach_msg(port, MACH_RCV_MSG,...).
  4. Make a client process that sends messages over the port that the server is listening on, using mach_msg(port, MACH_SEND_MSG,...).


This page is copyrighted 1997, by David T. McWherter.