Samba 3.0.22 Porting by Vidya Sagar

7
int setgid(gid_t);
int setuid(uid_t);
The etuid() must be invoked in privileged mode. The simulated version takes care of
non-simulated version of s
this as well as one change directory bug listed below. setgid() also required in privileged mode ( Invoke
GETPRIVMODE()) but does not do anything as MPE/iX does not support direct gid switching. Please see notes
on supplementary groups discussed later.
setuid() side effect: There is a potential bug in MPE/iX POSIX implementation of setuid() is that the current
he
MAX+1]; \
cwd)); \
CWD */
working directory is changed to the home directory of the user. Also the group id is changed to the account. T
workaround is to restore the cwd as shown below:
/* Save the CWD */
char saved_cwd[PATH_
getcwd(saved_cwd, sizeof(saved_
/* set uid */
setuid(x);
the
/* Restore
chdir(saved_cwd);
pplementary Groups
Su : In UNIX environment one user can be associated with many groups and this
er
ir() and seekdir()
information is kept in /etc/groups. MPE/iX lacks supplementary group and hence /etc/groups. MPE/iX us
associates them with only one group and that is the account in which the user belongs to. For example user
MGR.SAMBA can be the member of only one group, the MPE/iX account SAMBA. Hence, MPE/iX does not
initgroups() and setgroups() routines. The routines getgroups() returns 0 and Samba is very well
programmed to handle these deficiencies.
Missing telld : MPE/iX lacks the implementation of telldir() and seekdir(). The workaround is to
ir(){
Make sure there is no error returned */
d seekdir(DIR* dp){
e sure there is no error returned */:w
dif /
return 0 for telldir() call and do nothing for seekdir() call. Doing this would force the application to use the key as
directory name rather than using the return value of telldir(). Even if you try to implement your own version of
telldir() and seekdir using MPE/iX intrinsic it would not work properly as expected for directories referring to group
and account. I fake the absence of telldir() and seekdir() as follows:
#ifdef mpeix
long int telld
errno = 0; /*
return 0;
}
oi
v
errno = 0; /* Mak
return;
}
#en /*mpeix*
nsigned long long
U : The data type unsigned long long (ULL) is supported on MPE/iX. gcc-3.3.1 and gcc-3.2 has
If your co ULL then either force them not to use ULL and use unsigned long instead or upgrade to gcc
a potential bug that truncates the ULL to unsigned long. Following is the byte wise output of an ULL when
compiled with gcc-3.3.1:
B[0]: 0
B[1]: 0
B[2]: 0
B[3]: 0
B[4]: ff
B[5]: ff
B[6]: ff
B[7]: ff
de is using
4.0.2 from http://invent3k.external.hp.com/~MANAGER.DIS/
Sockets: MPE/iX sockets impose various limitations listed below: