This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems on accessing Windows network resources


Corinna Vinschen wrote:
> 
> On Thu, Jun 12, 2003 at 12:01:31PM -0400, Pierre A. Humblet wrote:
> > If changing the type to return a value is likely to break
> > existing applications, I would no do it.
> 
> I don't think so.  Well... it might in case the compiler's optimizer
> relied somehow on the fact that the function didn't return a value
> so far.  I'm not sure.  That disturbs me a bit.

Same here.

> > The feedback is meant for application writers or porters
> > who attempt to use the function in a way it was not designed
> > for.
> 
> What would that be?  You mean, when running under an impersonated
> account, another new token and seteuid would fail on other systems
> and therefore returning EPERM makes some sort of sense?  

On recent Windows one can call LogonUser without privileges. Someone
could try to implement some kind of su. The problem would show up
when running that command twice.

> The (not
> really big) problem I see with this approach is that the old
> currently impersonated token is a token which might *have* appropriate
> privileges so the EPERM would be somewhat misleading.

I looked at all codes in errno.h and couln't find anything better.
POSIX says: " EPERM Operation not permitted. "
Cygwin doesn't permit that operation in some cases...

> > The patch turns those calls into noops (with strace
> > output), which should suffice in practice.
> 
> I don't understand what you mean.  The call would nevertheless replace
> the old token so what means "noop" here?

Nope, the old token isn't replaced (in the patch).

> Except for the above point I think the patch is fine.  Just give me the
> weekend for some testing, ok?

The more testing, the better.
I hope you also have other weekend plans!

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]