From unknown Sat Aug 16 18:17:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1009 <1009@debbugs.gnu.org> To: bug#1009 <1009@debbugs.gnu.org> Subject: Status: Carbon: posix-file-name-to-mac Reply-To: bug#1009 <1009@debbugs.gnu.org> Date: Sun, 17 Aug 2025 01:17:34 +0000 retitle 1009 Carbon: posix-file-name-to-mac reassign 1009 emacs22 submitter 1009 David Reitter severity 1009 normal thanks From david.reitter@gmail.com Sat Sep 20 05:33:39 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=BAYES_00,FOURLA, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Sep 2008 12:33:39 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8KCXZhh010900 for ; Sat, 20 Sep 2008 05:33:36 -0700 Received: from mx10.gnu.org ([199.232.76.166]:53705) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kh1cc-0005II-V7 for emacs-pretest-bug@gnu.org; Sat, 20 Sep 2008 08:31:35 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Kh1eU-0001IB-TU for emacs-pretest-bug@gnu.org; Sat, 20 Sep 2008 08:33:34 -0400 Received: from ug-out-1314.google.com ([66.249.92.170]:44307) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kh1eU-0001Ht-EK for emacs-pretest-bug@gnu.org; Sat, 20 Sep 2008 08:33:30 -0400 Received: by ug-out-1314.google.com with SMTP id z36so1504034uge.17 for ; Sat, 20 Sep 2008 05:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:mime-version:subject:date:x-mailer; bh=hLVNgSaoGUX6KSm+2BwViVRj3imhjzZuIu9GFNcI3Po=; b=TD65IePAmBnI+EQpSBBw/3iPp7ozOOgErZ/b1o8b/JJwzFz45J8jFTB1GD2rvfL+ZE qt3f/nZ21cLPf/TneEv1Fqdi1Ojbx/IAMNqEm3yBYhERc1pwLXteajRV5G+0yP4NcguL ZGqqUUlpN8QKGeE6sCeKui4Y2ygu8cGnKK2b8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; b=qvm+d3G5hdCqy+gXx4t+Cxm1qkurVNEL6uktGUQqP+s0sJS2vJrpDqX18WuTnSH+t7 wOcEe9SZpxTE64QFEe9sEQXwf9nHrSdEtEqhmJrSQgw/qilcNOjwagfJHLP8YqBRxPz5 UR12e4fIaqUS0cy+O1wy12JSwVpj1tiP7Cm6g= Received: by 10.66.233.14 with SMTP id f14mr1193006ugh.12.1221914006412; Sat, 20 Sep 2008 05:33:26 -0700 (PDT) Received: from ?10.0.1.3? ( [151.201.37.141]) by mx.google.com with ESMTPS id 29sm575077uga.26.2008.09.20.05.33.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Sep 2008 05:33:25 -0700 (PDT) Message-Id: <702E333A-FA7D-4ECE-A116-3DA9C3A64F8E@gmail.com> From: David Reitter To: emacs-pretest-bug@gnu.org Content-Type: multipart/signed; boundary=Apple-Mail-16-941150426; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Carbon: posix-file-name-to-mac Date: Sat, 20 Sep 2008 08:33:22 -0400 X-Mailer: Apple Mail (2.929.2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) --Apple-Mail-16-941150426 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit (posix-file-name-to-mac "~emacs/asd") (posix-file-name-to-mac "/tmp/") will crash a 22 branch Carbon Emacs. A fix is below - it disables ~emacs and /tmp expansion when getpwnam or get_temp_dir_name return NULL, which they seem to do. (OS X has /tmp, so I'm not sure if the code isn't leftover from MacOS and stopped working at some point.) - D Index: mac.c =================================================================== RCS file: /sources/emacs/emacs/src/Attic/mac.c,v retrieving revision 1.77.2.10 diff -c -r1.77.2.10 mac.c *** mac.c 29 Aug 2008 08:18:07 -0000 1.77.2.10 --- mac.c 20 Sep 2008 12:29:24 -0000 *************** *** 214,237 **** if (strncmp (p, "~emacs/", 7) == 0) { struct passwd *pw = getpwnam ("emacs"); ! p += 7; ! if (strlen (pw->pw_dir) + strlen (p) > MAXPATHLEN) ! return 0; ! strcpy (expanded_pathname, pw->pw_dir); ! strcat (expanded_pathname, p); ! p = expanded_pathname; ! /* now p points to the pathname with emacs dir prefix */ } else if (strncmp (p, "/tmp/", 5) == 0) { char *t = get_temp_dir_name (); ! p += 5; ! if (strlen (t) + strlen (p) > MAXPATHLEN) ! return 0; ! strcpy (expanded_pathname, t); ! strcat (expanded_pathname, p); ! p = expanded_pathname; ! /* now p points to the pathname with emacs dir prefix */ } else if (*p != '/') /* relative pathname */ strcat (mfn, ":"); --- 215,244 ---- if (strncmp (p, "~emacs/", 7) == 0) { struct passwd *pw = getpwnam ("emacs"); ! if (pw != NULL) ! { ! p += 7; ! if (strlen (pw->pw_dir) + strlen (p) > MAXPATHLEN) ! return 0; ! strcpy (expanded_pathname, pw->pw_dir); ! strcat (expanded_pathname, p); ! p = expanded_pathname; ! /* now p points to the pathname with emacs dir prefix */ ! } } else if (strncmp (p, "/tmp/", 5) == 0) { char *t = get_temp_dir_name (); ! if (t != NULL) ! { ! p += 5; ! if (strlen (t) + strlen (p) > MAXPATHLEN) ! return 0; ! strcpy (expanded_pathname, t); ! strcat (expanded_pathname, p); ! p = expanded_pathname; ! /* now p points to the pathname with emacs dir prefix */ ! } } else if (*p != '/') /* relative pathname */ strcat (mfn, ":"); --Apple-Mail-16-941150426 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIFxDCCAn0w ggHmoAMCAQICEEfSZyInpN9bVdFPsdICbiIwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA3MTIwOTIzMDM0OFoXDTA4MTIwODIzMDM0 OFowYjEQMA4GA1UEBBMHUmVpdHRlcjEOMAwGA1UEKhMFRGF2aWQxFjAUBgNVBAMTDURhdmlkIFJl aXR0ZXIxJjAkBgkqhkiG9w0BCQEWF2RhdmlkLnJlaXR0ZXJAZ21haWwuY29tMIGfMA0GCSqGSIb3 DQEBAQUAA4GNADCBiQKBgQDIS4kZGULD+CxprkxDnEccAnZ2GQQxfn55aiAPoy5kJ+uLhelaZP4p lgx3Vq8xYK1bjsLepGYp8qzVlHsyQPb6OfvRzrUXHxlJrHME0+Lblx37PBLxGDxc5W8qfZFJpej8 Dk3LUMga8laR9CRghbALoTV3UThUSMqk1cVwTY99KQIDAQABozQwMjAiBgNVHREEGzAZgRdkYXZp ZC5yZWl0dGVyQGdtYWlsLmNvbTAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBQUAA4GBAKU8XIS6 R/R3Hg6ae5p0i4iUJURq+sDVMX9RGB3Ge5V8oKKglIQGaY03leem65pqICL6mdgX/Px21JoaKVAA 8XITLFVEFHL6BfZ/eePnzNi93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-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.5 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,VALID_BTS_CONTROL,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 20 Sep 2008 20:12:35 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8KKCWLQ012873 for ; Sat, 20 Sep 2008 13:12:33 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kh8ml-0000Va-Af; Sat, 20 Sep 2008 16:10:31 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18645.22711.247004.516530@fencepost.gnu.org> Date: Sat, 20 Sep 2008 16:10:31 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: \+jP+k:Pafy7D2yhbaq&euv5,Cc!?R^q.nd}eJ;6ZM3G`k4`2CEB5hKvXDq>drh;%q~U!d X-Debbugs-No-Ack: yes reassign 1009 emacs22 From mituharu@math.s.chiba-u.ac.jp Sun Sep 21 18:25:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,FOURLA,GMAIL, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1009) by emacsbugs.donarmstrong.com; 22 Sep 2008 01:25:17 +0000 Received: from mathmail.math.s.chiba-u.ac.jp (mathmail.math.s.chiba-u.ac.jp [133.82.132.2]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8M1PEr6030617 for <1009@emacsbugs.donarmstrong.com>; Sun, 21 Sep 2008 18:25:15 -0700 Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 5AD9A2C40; Mon, 22 Sep 2008 10:25:12 +0900 (JST) Date: Mon, 22 Sep 2008 10:25:12 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: David Reitter , 1009@debbugs.gnu.org Subject: Re: bug#1009: Carbon: posix-file-name-to-mac In-Reply-To: <702E333A-FA7D-4ECE-A116-3DA9C3A64F8E@gmail.com> References: <702E333A-FA7D-4ECE-A116-3DA9C3A64F8E@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII >>>>> On Sat, 20 Sep 2008 08:33:22 -0400, David Reitter said: > (posix-file-name-to-mac "~emacs/asd") > (posix-file-name-to-mac "/tmp/") > will crash a 22 branch Carbon Emacs. > A fix is below - it disables ~emacs and /tmp expansion when getpwnam > or get_temp_dir_name return NULL, which they seem to do. (OS X has > /tmp, so I'm not sure if the code isn't leftover from MacOS and > stopped working at some point.) Thanks. Maybe posix-file-name-to-mac and mac-file-name-to-posix should have been made Mac OS Classic only. Actually, they have already been removed from my local tree, because they are using some functions that are not available on 64-bit environment. Do you have some use cases of them on Mac OS X? I'm not sure if changes to the EMACS_22_BASE branch is still allowed. Please apply your patch if so. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 10 01:47:22 2011 Received: (at 1009-done) by debbugs.gnu.org; 10 Mar 2011 06:47:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxZec-0006OS-JD for submit@debbugs.gnu.org; Thu, 10 Mar 2011 01:47:22 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxZea-0006OF-Qe for 1009-done@debbugs.gnu.org; Thu, 10 Mar 2011 01:47:21 -0500 Received: from localhost ([127.0.0.1]:60257) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxZeV-0002ox-Mr; Thu, 10 Mar 2011 01:47:15 -0500 From: Glenn Morris To: 1009-done@debbugs.gnu.org Subject: Re: bug#1009: Carbon: posix-file-name-to-mac References: <702E333A-FA7D-4ECE-A116-3DA9C3A64F8E@gmail.com> X-Spook: STARLAN Honduras bce Security Council Maple Cohiba Etacs X-Ran: N4}@hau1uI6{g@}OKJ"R+=jjI8^Nbc$0vxDcaON.NWXTt|MHf=nY"{CGO!&DmtO_`B|~$O X-Hue: white X-Attribution: GM Date: Thu, 10 Mar 2011 01:47:15 -0500 In-Reply-To: (YAMAMOTO Mitsuharu's message of "Mon, 22 Sep 2008 10:25:12 +0900") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 1009-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Thanks for the report. Emacs 22 is very old and has not been supported for some time. The latest version is 23.3. Please open new reports for any issues you have with the new version. From unknown Sat Aug 16 18:17:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Apr 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator