× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



At job start:

Get your own profile handle: QSYGETPH('*CURRENT': '*NOPWDCHK':
myHandle) ;
Get your target profile handle: QSYGETPH(userID: '*NOPWDCHK':
ownHandle) ;

Creating a new file:

Switch to target profile: QSYGETP(ownHandle) ;
Create your file: open(...) ;
Switch to your profile: QSYGETP(myHandle) ;

Carry on...

I don't see why this would not do what Mark suggests. Requires "only" *USE
authority to the target User Profile.

QPGMR and QSECOFR are _not_ in the list of user profiles for which a handle
cannot be retrieved.

I have used this technique for creating special ownership of other objects
but have not tried with IFS.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Better to remain silent and be thought a fool than to speak out and remove
all doubt."
-- Abraham Lincoln


Mark said:
You can also use QWTSETP (set profile handle) and QSYGETPH (get
profile
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.

Well, chgown() says explicitly that it doesn't use adopted authority,
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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.