Subject: bug#98 closed by Jason Rumney <[email-masked]> ([Fwd: Re: 23.0.60; uid problems on w32])

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#98: 23.0.60; uid problems on w32

It has been closed by Jason Rumney <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Jason Rumney <[email-masked]> by
replying to this email.

-- 
98: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=98
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Fri Apr 11 13:54:33 2008
Date: Fri, 11 Apr 2008 21:54:07 +0100
From: Jason Rumney <[email-masked]>
To: [email-masked]
Subject: [Fwd: Re: 23.0.60; uid problems on w32]
OpenPGP: id=8086879D

This is a multi-part message in MIME format.
--------------070206030009040504020808
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

--------------070206030009040504020808
Content-Type: message/rfc822;
 name="Re: 23.0.60; uid problems on w32.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Re: 23.0.60; uid problems on w32.eml"

Message-ID: <[email-masked]>
Date: Mon, 31 Mar 2008 15:28:15 +0100
From: Jason Rumney <[email-masked]>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
To: Eli Zaretskii <[email-masked]>
CC: [email-masked], [email-masked], 
 [email-masked]
Subject: Re: 23.0.60; uid problems on w32
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
In-Reply-To: <[email-masked]>
X-Enigmail-Version: 0.95.6
OpenPGP: id=8086879D
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Eli Zaretskii wrote:
>> Eli Zaretskii wrote:
>>     
>>> Actually, one (in `struct passwd') is `signed int', the other (in
>>> `struct stat') is `signed short'.  Darn that MS-supplied stat.h!
>>>       
>
> OK, I will add this to my todo.  Thanks.
>   

I have just checked in a hack to Ffile_attributes that casts the uid in 
the stat structure to unsigned short on windows to make it consistent 
with getuid.
You'll need to remove this hack if/when you make the above more 
comprehensive change. I think the current %= 60001 in several places in 
w32.c where uid and gid are initialised will be able to be removed once 
you have made this change too.

--------------070206030009040504020808--

>From [email-masked] Sat Mar 29 15:55:35 2008
Resent-Message-ID: <[email-masked]>
Resent-To: [email-masked]
Resent-From: Stefan Monnier <[email-masked]>
Resent-Date: Sat, 29 Mar 2008 18:55:26 -0400
Date: Sat, 29 Mar 2008 23:09:07 +0100
From: "Lennart Borgman \(gmail\)" <[email-masked]>
To: [email-masked]
Cc: 
Subject: 23.0.60; uid problems on w32
Sender: emacs-devel-bounces+monnier=[email-masked]

I have got at bug report from Thierry Daucourt through

   http://www.emacswiki.org/cgi-bin/wiki/EmacsW32

It looks like this could be a bug in Emacs. The crucial part of that bug 
report are the values investigated at the end of 
`server-ensure-safe-dir' where the user get the following for 
file-attributes and user-id:

  attrs (t 1 -14706 513 (18414 17797) (18414 17797) (18414 17797) 0 
drwxrwxrwx
  nil 34842 (7173 . 33003))
  nth 2 attrs **-14706**
  user id **50830**

He also checked with Cygwin which gave other values than the two 
different above for the uid:

  $ ls -ld server/
  drwxr-xr-x+ 2 my_user mkgroup-l-d 0 Mar 29 14:35 server/
  $ id
  uid=**60830**(my_user) gid=10545(mkgroup-l-d) 
groups=0(root),544(Administrators),545(Users),10545(mkgroup-l-d)

If I do not misunderstand him he has got these values from the unpatched 
version below.

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
  of 2008-03-25