|
Mark said:
You can also use QWTSETP (set profile handle) and QSYGETPH (get profileWell, chgown() says explicitly that it doesn't use adopted authority,
handle) to swap to the profile you want to own the IFS files, before
your program creates them. This technique avoids having to use chown
(or equivalent) after the fact. If your application ships with or
installs an application owning profile, you could change to that
profile, so that all IFS files created by this application are owned by
that profile.
and I've determined empirically that the CL CHGOWN command apparently
doesn't use adopted authority (including *OWNER authority), either. So
"no joy" on transferring the IFS objects to an IBM-supplied user
profile. It looks like an "owning profile" might be at least part of the
answer. But probably not by swapping profiles; I believe that requires a
password at least to swap out, (maybe also to swap back?).
Hmm. IDEA: Suppose we give public *ADD authority to the application's
administrative user profile. Then, we could either get that profile's
user number at program-launch, and either chown or fchown the IFS object
on creation, or we could simply (since this is happening in C) shell out
a CHGOWN command on IFS object creation (I wonder which option has the
least overhead).
--
JHHL
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.