[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support open-process and friends on MS-Windows

From: Eli Zaretskii
Subject: Re: Support open-process and friends on MS-Windows
Date: Sun, 03 Jul 2016 06:47:37 +0300

> From: Mark H Weaver <address@hidden>
> Cc: address@hidden (Ludovic Courtès),  address@hidden,
>   address@hidden
> Date: Sat, 02 Jul 2016 19:02:08 -0400
> Eli Zaretskii <address@hidden> writes:
> > +# define getuid()              (500) /* Local Administrator */
> > +# define getgid()              (513) /* None */
> > +# define setuid(u)             (0)
> > +# define setgid(g)             (0)
> As I've said before, I'm not comfortable with these definitions.  These
> are not operations that can be safely ignored.  If we cannot do a job
> that's requested of us, we should raise an exception.  We should not
> make numbers up out of thin air and pass them off as fact, nor should we
> claim to have successfully done a job that we are unable to do.
> More to the point, we should not assume that the caller's requests are
> unimportant.  Feigning success on ignored requests and fabricating
> misinformation might be okay in some cases, but in other cases it is
> likely to lead to security holes and other bugs.  For example, a common
> pattern is to use 'setuid' to drop privileges before running some
> untrusted code.  We must not silently ignore such requests.

As I've said before, these operations either have no meaning on
MS-Windows, or cannot be easily mapped to the equivalent Windows
notions.  All other applications ported from Posix platforms that I
know of do something like the above, and I have yet to hear a single
complaint.  Raising exceptions in these cases will simply get in the
way of writing portable Guile programs, because the application
programmer will have to work around the exception in Guile code, or
declare that the program does not support MS-Windows.

Please accept my opinions that are based on many years of experience
in porting Unix and GNU applications to MS-DOS and MS-Windows.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]