From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: copy-directory Date: Sun, 04 Oct 2009 22:02:43 +0200 Message-ID: <87y6nr2aho.fsf@gmx.de> References: <8763avuyt3.fsf@gmx.de> <83zl87nw88.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254686601 491 80.91.229.12 (4 Oct 2009 20:03:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Oct 2009 20:03:21 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 04 22:03:13 2009 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 1MuXIJ-0001ko-FF for ged-emacs-devel@m.gmane.org; Sun, 04 Oct 2009 22:02:59 +0200 Original-Received: from localhost ([127.0.0.1]:33277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuXIJ-0005b0-DK for ged-emacs-devel@m.gmane.org; Sun, 04 Oct 2009 16:02:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuXIC-0005ZV-N2 for emacs-devel@gnu.org; Sun, 04 Oct 2009 16:02:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuXI7-0005Y1-UH for emacs-devel@gnu.org; Sun, 04 Oct 2009 16:02:52 -0400 Original-Received: from [199.232.76.173] (port=42586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuXI7-0005Xr-PM for emacs-devel@gnu.org; Sun, 04 Oct 2009 16:02:47 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:59529) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MuXI6-0003WI-Vm for emacs-devel@gnu.org; Sun, 04 Oct 2009 16:02:47 -0400 Original-Received: (qmail invoked by alias); 04 Oct 2009 20:02:45 -0000 Original-Received: from p57A20AEF.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.10.239] by mail.gmx.net (mp071) with SMTP; 04 Oct 2009 22:02:45 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1//ZjcoSOb/Vkx6d54cPXmHdl742NmsPy25ax+bDV sHsyGe482YgdCx In-Reply-To: (Stefan Monnier's message of "Sun, 04 Oct 2009 12:41:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:115901 Archived-At: Stefan Monnier writes: >> Please don't rely on the `chown' command being available for the >> preserve-uid-gid option. > > Especially since chown only works for root anyway, and since I don't > think we should cater specially for root-uses of Emacs (I rather > discourage the use of Emacs when running as root), I'd rather we don't > touch the uid. I've tried to be as close as possible to `copy-file'. There is the code #ifndef MSDOS /* Preserve the original file modes, and if requested, also its owner and group. */ if (input_file_statable_p) { if (! NILP (preserve_uid_gid)) fchown (ofd, st.st_uid, st.st_gid); fchmod (ofd, st.st_mode & 07777); } #endif /* not MSDOS */ Shall we add a subroutine function for this, as proposed by Eli? Or shall we remove PRESERVE-UID-GID from `copy-directory'? > Stefan Best regards, Michael.