Samba 3.0.22 Porting by Vidya Sagar

readily apparent from the stack traces of the afflicted process(es). Installing the latest Streams/iX patch for your
MPE release is always a good idea before you start your porting activities.
Hard Links vs. Symbolic Links
The MPE HFS file system does not support hard links. It is frequently acceptable to modify applications to create
symbolic links instead.
SVIPC Resources
Note that MPE does not release SVIPC semaphore or shared memory resources when processes normally or
abnormally terminate. Usually a well-behaved application will free these resources prior to termination. But while
you are debugging your port for the first time, you may experience process aborts which don’t free your SVIPC
resources. There is a limited pool of these resources, and over time, repeated aborts can exhaust the pool.
When pool exhaustion happens, you can either reboot the system, or use the IPCS.HPBIN.SYS,
IPCRM.HPBIN.SYS, and SVIPC.HPBIN.SYS utilities to free up resources. Note that these utilities in HPBIN.SYS
are actually CI command files.
UID 0 Superusers
One very key difference between Unix and MPE is that MPE doesn’t implement the Unix concept of a superuser
as defined when the POSIX userid (UID) is equal to zero. The Unix root concept is roughly analogous to the MPE
concept of SM capability and/or PM capability. Some Unix applications check the current userid of the process
and reserve certain functionality for root users only. Other Unix applications may want to change their UID to zero
in order to gain read/write access to files that would be protected from normal users, or to be able to invoke
certain Unix functionality reserved only for root users, like bind()-ing to ports less than 1024. If your application
depends heavily on UID zero (i.e. superusers), you may have quite a porting challenge ahead of you. Both
Samba and Sendmail are heavily dependent on UID zero, and large and complicated porting solutions had to be
developed to simulate much of the UID zero functionality that would exist on a real Unix system.
UID and GID Issues
On MPE, a UID is an integer number corresponding to an MPE user object, and a GID (Group ID) is an integer
number corresponding to an MPE account object. The MPE implementation of POSIX UIDs and GIDs requires
that your UID and GID both refer to the same MPE account. Unix allows a user to belong to multiple groups, but
on MPE a user can only belong to one group (that corresponds to the MPE account).
Terminal I/O
Support for POSIX terminal I/O (sometimes called the General Terminal Interface or GTI) was never fully
implemented in MPE. However, some terminal interfaces are provided in <termios.h>. Note that you will find
those functions in the -lcurses library /usr/lib/libcurses.a.
Child Processes Killed When Parent Terminates
As mentioned in section 1.4 a typical Unix server application architecture may call fork() to spawn child processes
(daemons) that will continue running even if the parent process terminates. However when a process terminates
on MPE, all child processes of the terminating process will also be terminated. So, when porting applications with
such parent/child architectures to MPE, one make sure the parent process does not terminate if child processes
are required by the application to function.
5 References
[1] MPE/iX Developer's Kit Reference Manual Volume 1 (36430-90001) (http:/docs.hp.com/en/36430-90007/index.html)
[2] MPE/iX Developer's Kit Reference Manual Volume 2 (36430-90002) (
http://docs.hp.com/en/36430-90008/index.html)
[3] Mark Bixby’s Porting guide (
http://www.bixby.org/mark/porting.html)
[4] Pretty Good porting for MPE/iX (http://www.editcorp.com/Personal/Lars_Appel/pgp-ix.html)
[5] Implementation details of POSIX on MPE/iX (
http://www.docs.hp.com/cgi-bin/doc3k/B3021690178.13563/42)
[6] How to make POSIX work on MPE (
http://www.3000newswire.com/FNPlug-N-Play.html)
30
[7] Samba-3.0.22 communicator article (
http://jazz.external.hp.com/papers/Communicator/7.5/Samba_3.0.22.html)