From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; uid problems on w32 Date: Mon, 31 Mar 2008 22:37:45 +0300 Message-ID: References: <47EEBE03.9030104@gmail.com> <47EEE4D9.9090600@gnu.org> <47EFA826.6070907@gnu.org> <47EFB17F.70903@gmail.com> <47EFF936.8080108@gmail.com> <47EFFE20.6030209@gmail.com> <47F0A3C6.6090006@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1206992307 20349 80.91.229.12 (31 Mar 2008 19:38:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Mar 2008 19:38:27 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, lennart.borgman@gmail.com, monnier@iro.umontreal.ca To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 31 21:38:59 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JgPqM-0000DH-HE for ged-emacs-devel@m.gmane.org; Mon, 31 Mar 2008 21:38:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgPpk-0003QC-IK for ged-emacs-devel@m.gmane.org; Mon, 31 Mar 2008 15:38:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JgPpg-0003Pl-M4 for emacs-devel@gnu.org; Mon, 31 Mar 2008 15:38:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JgPpg-0003PZ-4Y for emacs-devel@gnu.org; Mon, 31 Mar 2008 15:38:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgPpg-0003PP-1R for emacs-devel@gnu.org; Mon, 31 Mar 2008 15:38:16 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JgPpf-0007rj-R5 for emacs-devel@gnu.org; Mon, 31 Mar 2008 15:38:15 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JgPpf-0002jT-FH for emacs-pretest-bug@gnu.org; Mon, 31 Mar 2008 15:38:15 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JgPpc-0007r5-IC for emacs-pretest-bug@gnu.org; Mon, 31 Mar 2008 15:38:15 -0400 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JgPpY-0007qD-Nb; Mon, 31 Mar 2008 15:38:08 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-21-134.inter.net.il [80.230.21.134]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FJU02634 (AUTH halo1); Mon, 31 Mar 2008 22:37:45 +0300 (IDT) In-reply-to: <47F0A3C6.6090006@gnu.org> (message from Jason Rumney on Mon, 31 Mar 2008 09:41:42 +0100) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94062 gmane.emacs.pretest.bugs:21825 Archived-At: > Date: Mon, 31 Mar 2008 09:41:42 +0100 > From: Jason Rumney > CC: "Lennart Borgman (gmail)" , > monnier@iro.umontreal.ca, emacs-pretest-bug@gnu.org > > 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').