emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; uid problems on w32


From: Eli Zaretskii
Subject: Re: 23.0.60; uid problems on w32
Date: Mon, 31 Mar 2008 22:37:45 +0300

> Date: Mon, 31 Mar 2008 09:41:42 +0100
> From: Jason Rumney <address@hidden>
> CC: "Lennart Borgman (gmail)" <address@hidden>, 
>  address@hidden, address@hidden
> 
> There is a function user-real-uid that may be able to be extended to 
> contain the full id. Currently it is documented as returning a float or 
> int, neither of which will contain a SID without losing precision. We'd 
> have to check the users first. If elisp had a bignum type, it would be 
> the best choice, as a cons cell will require different code for 
> processing it. But before embarking on this, I'd like to see a case that 
> actually needs it, as there are many other areas where we could be 
> spending our limited resources.

I'm not sure such an endeavor would be justified.  After all, it's
quite possible to have two users on two Posix machines that have the
same uid, right?  So this problem is not unique to Windows.

Cygwin added the offset because they had a specific problem in the
mkpasswd program: it would create 2 user accounts for 2 different
users with the same uid.  Emacs doesn't have such a problem: we don't
create user accounts.  All we need to do is return a uid and user name
for each SID we get, and perhaps also handle the case where two
different SIDs map to the same uid, so that we don't return incorrect
user name for a given uid or vice versa.  This can be done by caching
the full SIDs internally (I have somewhere a version of `stat' that
does precisely that, which I wrote for my private port of GNU `ls').




reply via email to

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