Thanks for the information, I was using the qwtsetp API
and was looking for a better way. My initial tests with
these Unix APIs were promising. In a few places they
refer to groups (plural) and I was hoping that the set
effective group ID profile accepted an array and I was
just dense.

The trouble with the qwtsetp API is that you have to
change the profile first, and there is no lightweight way
(that I know of) to do that. From the information you sent
it looks like the set effective group GID should do what
I want, but just one at a time. I can retrieve the GID,
which appears to correspond to the GID I set on the
profile.  When I pass it to the setegid API, it ends up
setting my group to *NONE. I am just calling qsysetegid()
with a 4-byte integer that contains the GID I get back
from getgrname().

Any ideas on whether this will work?

David Morris

>>> edfishel@us.ibm.com 01/31/02 10:43AM >>>


>Can anyone explain the difference between an effective
>user id and a real user id. Same with group. I have been
>playing with the qsyseteuid(), qsysetreuid(), and qsysetuid(),
>etc. apis and am wondering if anyone can explain their use.

These are "Unix" APIs. The related Unix terms have not been
into the OS/400 documentation. The terms for real, effective, and
user/group ID can be found here:

>I also wonder why getpwnam() and getgroups() imply that you
>can set more than one group id but there doesn't seem to be
>an api that allows you to set more than one at a time. It may just
>be a typo in the documentation.

You are correct that there is no API to just change the groups, but you
change the user ID and all of its groups by using the Set Profile
(QWTSETP, QsySetProfileHandle) API.

Ed Fishel,

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.