|
Thank you Scott.
On Fri, 2 Apr 2004 10:26:49 -0600 (CST), "Scott Klement"
<klemscot@xxxxxxxxxxxx> said:
>
> Hi Michael,
>
> On Fri, 2 Apr 2004 michaelr_41@xxxxxxxxxxxxxx wrote:
> >
> > D SetEUid PR 10U 0 ExtProc('qsyseteuid')
> > D UID 10U 0 Const
>
> This prototype has two major problems:
>
> 1) the return value for seteuid is "int", yet you have it prototype as
> "unsigned." That's a minor problem, though -- the only problem it'll
> cause is that errors will return 4294967295 instead of -1. You can fix
> that problem by making the return value "10I 0"
>
> 2) The UID parameter is supposed to be passed by VALUE. This is a big
> problem -- the procedure is expecting to receive an integer, and you're
> sending it a pointer instead.
>
> The only reason that this API would work the way you've got it prototyped
> is if the 4 bytes of the address of the variable that you pass happens to
> be the same value as is stored in the variable. That will happen quite
> often with a value of zero, but I bet it won't happen with work with any
> other value.
>
> The fix is to remove "CONST" and add "VALUE" in it's place.
>
> _______________________________________________
> 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.
>
--
michaelr_41@xxxxxxxxxxxxxx
--
http://www.fastmail.fm - A no graphics, no pop-ups email service
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.