From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 21 22:32:29 2020 Received: (at submit) by debbugs.gnu.org; 22 Oct 2020 02:32:30 +0000 Received: from localhost ([127.0.0.1]:51034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVQOz-0004zp-9W for submit@debbugs.gnu.org; Wed, 21 Oct 2020 22:32:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:52652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVQOx-0004zf-GU for submit@debbugs.gnu.org; Wed, 21 Oct 2020 22:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVQOx-0008FC-7m for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2020 22:32:27 -0400 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:35604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVQOv-0005UA-Jc for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2020 22:32:26 -0400 Received: by mail-io1-xd2a.google.com with SMTP id k6so5370104ior.2 for ; Wed, 21 Oct 2020 19:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=9eUJ2rvdAy/fpX485xa2mnuQ99O9NlmLAT2Lj46/Vdk=; b=f7vHfw+KXHtwZLp8Hm7pcmnaYt30sn3Qiy14HlgFZiLTjIkdaH5UEvEBJYgbbTZdYs sv1Snm3Lt72UP3PnevG0kZhDkxV9qeG1t/+GzYITp2ZexVJmJt4efMmNWBCgZCUQiY8M TuPShxob9yQtB/54xbASBpSqbKwyARnhts/HGkALM64JghJi7S/i9eVYj1DpkD+mhLOY PBvGbNj4/HztfxWtQpct3Pyc54wuRKiGH4ivWTzvkJmL3n7Nahi8MwETOo++7tlAg0Em RVBa6S6Cbf47AMB9X5tOPbiSwRwHHEqtwJNCe7kqJi9n97s+Uwwkv4Sa+ZGAmLjOLkAj KcjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=9eUJ2rvdAy/fpX485xa2mnuQ99O9NlmLAT2Lj46/Vdk=; b=fbFn9E4vA6hXJrch04O3xZihr1YEuDymgd7+Xms5m03JKf4g5pqT11bhJwOqm8JNYP kDPhFWKzvZRBucUwEHcrcW+Od9MxhKUUnNEyGkTkcTNr7k97CQqlebbReCiHs9i3MZ/b 7eMbI3PKUzBm7hX0NP+Lfd22i/+7RX1x8LGUFcECf9/fJd7xsFn3ReV2WWQEBrn71X/9 pU9YXLYeGx6JO391nxiZUXaUVDlf0s6wLK4ksfD/i8kuXTZ+yOq4weIO1TO/eia65ZbE kYf7EL83izKaPXrhvkHfJr7n/6W/gcn0LhAJ6RIJNlewC/ajQ+qVMlWxQHVdI8HAGQN7 IfGg== X-Gm-Message-State: AOAM532FiYu/ZmcKhbolR7Yh9P5Lj/4yY6Jf03ZW2I0ATaT6Jt9oLJAV 87KnCpOdXmPa2+SIdB7wrHSIN4Zmad0= X-Google-Smtp-Source: ABdhPJzx3VnwAA3e/rQSqI8OTI6JVFgMGPDkm4c/XIxwRoYZCVwcxGbrePtkwyVl3lTwZdgInD2BOQ== X-Received: by 2002:a6b:7841:: with SMTP id h1mr364571iop.72.1603333943959; Wed, 21 Oct 2020 19:32:23 -0700 (PDT) Received: from debian ([140.190.57.67]) by smtp.gmail.com with ESMTPSA id a6sm195710ili.11.2020.10.21.19.32.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 19:32:23 -0700 (PDT) From: Andrew Eggenberger To: bug-gnu-emacs@gnu.org Subject: 28.0.50; emacsclient Invalid socket owner error in gccemacs Date: Thu, 22 Oct 2020 02:32:04 -0500 Message-ID: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::d2a; envelope-from=andrew.eggenberger@gmail.com; helo=mail-io1-xd2a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 9 X-Spam_score: 0.9 X-Spam_bar: / X-Spam_report: (0.9 / 5.0 requ) BAYES_00=-1.9, DATE_IN_FUTURE_03_06=3.027, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The emacsclient binary produced by the native-comp branch cannot connect to the server. When a connection is attempted, the error message "emacsclient: Invalid socket owner" is displayed. I have 27.1 [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (andrew.eggenberger[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.7 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) The emacsclient binary produced by the native-comp branch cannot connect to the server. When a connection is attempted, the error message "emacsclient: Invalid socket owner" is displayed. I have 27.1 without native-comp installed, and that emacsclient can connect to the native-comp server without issue. The error is the result of a failed uid comparison in lib-src/emacsclient.c. It appears that the uid produced by geteuid() isn't matching the uid for the server socket. I first noticed the issue while trying to do a magit commit. But the same error happens when trying to run emacsclient from the command line. In GNU Emacs 28.0.50 (build 1, i686-unknown-gnu0.9, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-10-21 built on debian Repository revision: 3be93390fb6680d1e0c3256af72c86635a9eb327 Repository branch: feature/native-comp System Description: Debian GNU/Hurd bullseye/sid Configured using: 'configure --with-nativecomp --prefix=/home/demo/.local/' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO DBUS GSETTINGS GLIB NOTIFY GFILENOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES NATIVE_COMP THREADS LIBSYSTEMD PDUMPER LCMS2 Important settings: locale-coding-system: nil Major mode: Magit Process Minor modes in effect: global-undo-tree-mode: t undo-tree-mode: t global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t which-key-mode: t projectile-mode: t global-flycheck-mode: t global-company-mode: t company-mode: t helm-mode: t helm-ff-cache-mode: t shell-dirtrack-mode: t helm--remap-mouse-mode: t async-bytecomp-package-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail helm-command helm-elisp helm-eval edebug backtrace helm-info magit-extras mule-util face-remap vc-git cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs winner image-file image-converter helm-external helm-net xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap ffap term/xterm xterm jka-compr undo-tree magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor server which-key comp warnings projectile grep compile text-property-search ibuf-ext ibuffer ibuffer-loaddefs thingatpt flycheck find-func rx dash company-oddmuse company-keywords company-etags etags fileloop generator xref project company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company paredit helm-mode helm-files tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601 time-date ls-lisp helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp format-spec helm-utils helm-help helm-types helm-config helm easy-mmode async-bytecomp advice helm-global-bindings helm-easymenu edmacro kmacro helm-source eieio-compat helm-multi-match helm-lib async cl-extra help-mode use-package-ensure use-package-core finder-inf disp-table info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face pcase macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind gfilenotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process nativecomp emacs) Memory information: ((conses 8 312548 30532) (symbols 24 26544 10) (strings 16 87420 8718) (string-bytes 1 3294833) (vectors 8 44603) (vector-slots 4 791812 51818) (floats 8 144 434) (intervals 28 736 356) (buffers 564 20)) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 08:54:44 2020 Received: (at 44131) by debbugs.gnu.org; 22 Oct 2020 12:54:44 +0000 Received: from localhost ([127.0.0.1]:51745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVa7A-0006wk-JB for submit@debbugs.gnu.org; Thu, 22 Oct 2020 08:54:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVa79-0006wR-3F for 44131@debbugs.gnu.org; Thu, 22 Oct 2020 08:54:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8/FJXCWvUIY9DJG8ZnTNehnocRWmHwadmbg3vHEa0l8=; b=Ao7ZpY112LN/8F3pr+yZ+3wU47 2zON0Os8Y4KqkxCVLwIrHbtpAbIc5CUhNRiiivxDE8Ml6krepzb3dg3qRWoXxi2qbyPH2T/wuS4Fu LIAC3tOmY8qmZ4q3zdh4kRo/jig0saY5lSy+x1ILCTj6mvdrGKQvlqoqTWJKlP3DhafY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVa70-0003S4-PC; Thu, 22 Oct 2020 14:54:37 +0200 From: Lars Ingebrigtsen To: Andrew Eggenberger Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error in gccemacs References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> X-Now-Playing: LCD Soundsystem's _Freak Out Starry Eyes_: "North American Scum (Anciritic Club)" Date: Thu, 22 Oct 2020 14:54:33 +0200 In-Reply-To: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> (Andrew Eggenberger's message of "Thu, 22 Oct 2020 02:32:04 -0500") Message-ID: <87lffymnee.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Andrew Eggenberger writes: > The emacsclient binary produced by the native-comp branch cannot connect > to the server. When a connection is attempted, the error message > "emacsclient: Invalid socket owner" is displayed. I have [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrew Eggenberger writes: > The emacsclient binary produced by the native-comp branch cannot connect > to the server. When a connection is attempted, the error message > "emacsclient: Invalid socket owner" is displayed. I have 27.1 without > native-comp installed, and that emacsclient can connect to the > native-comp server without issue. I tried this with the current native-comp branch: $ ./src/emacs -Q M-x server-start $ ./lib-src/emacsclient -t and everything worked as it should, so I'm unable to reproduce this bug. Do you have a recipe for reproducing this? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 08:54:55 2020 Received: (at control) by debbugs.gnu.org; 22 Oct 2020 12:54:55 +0000 Received: from localhost ([127.0.0.1]:51748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVa7K-0006x7-Rr for submit@debbugs.gnu.org; Thu, 22 Oct 2020 08:54:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVa7I-0006wu-Vz for control@debbugs.gnu.org; Thu, 22 Oct 2020 08:54:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hrk9AH7ZlgNttAaL0soVzx2AHHZ/O6OWGHqeEeoY3FI=; b=hfo+O7/xECfaZkC/OR8jrMDvYN kM36RLKTo/qHgdPXVum3SK6hQl6hNrZ3uB3say98R9uAqzlGPaXgZ4DzL9FdEGpndcK+kUykNoNQh x/aiVJNQsjvOJVVYU4aYlERwghMej4PZfcGbxR7wVId1rW/pPoEiIrsq/5AnS6bsrm88=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVa7B-0003SA-4I for control@debbugs.gnu.org; Thu, 22 Oct 2020 14:54:47 +0200 Date: Thu, 22 Oct 2020 14:54:43 +0200 Message-Id: <87k0vimne4.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #44131 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 44131 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 44131 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 16:41:23 2020 Received: (at 44131) by debbugs.gnu.org; 22 Oct 2020 20:41:23 +0000 Received: from localhost ([127.0.0.1]:54033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVhOk-0002wi-N5 for submit@debbugs.gnu.org; Thu, 22 Oct 2020 16:41:22 -0400 Received: from mab.sdf.org ([205.166.94.33]:56174 helo=ma.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVhOi-0002wa-Jd for 44131@debbugs.gnu.org; Thu, 22 Oct 2020 16:41:20 -0400 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1kVhOh-0001dA-8R; Thu, 22 Oct 2020 20:41:19 +0000 From: Andrea Corallo To: Andrew Eggenberger Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error in gccemacs References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 22 Oct 2020 20:41:19 +0000 In-Reply-To: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> (Andrew Eggenberger's message of "Thu, 22 Oct 2020 02:32:04 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrew Eggenberger writes: > The emacsclient binary produced by the native-comp branch cannot connect > to the server. When a connection is attempted, the error message > "emacsclient: Invalid socket owner" is displayed. I have 27.1 without > native-comp installed, and that emacsclient can connect to the > native-comp server without issue. > > The error is the result of a failed uid comparison in > lib-src/emacsclient.c. It appears that the uid produced by geteuid() > isn't matching the uid for the server socket. > > I first noticed the issue while trying to do a magit commit. But the > same error happens when trying to run emacsclient from the command line. Hi Andrew, thanks for reporting. I believe this should not be related to the native compilaiton (BTW for me it works, I always use emacsclient). Could you try if you get the same error building master? Thanks! Andrea From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 19:45:34 2020 Received: (at 44131) by debbugs.gnu.org; 22 Oct 2020 23:45:34 +0000 Received: from localhost ([127.0.0.1]:54188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVkH0-0007Z0-3a for submit@debbugs.gnu.org; Thu, 22 Oct 2020 19:45:34 -0400 Received: from mail-ot1-f52.google.com ([209.85.210.52]:42423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVkGy-0007Yn-Ca for 44131@debbugs.gnu.org; Thu, 22 Oct 2020 19:45:32 -0400 Received: by mail-ot1-f52.google.com with SMTP id h62so3285813oth.9 for <44131@debbugs.gnu.org>; Thu, 22 Oct 2020 16:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jHrjB2rGSdOE0OCx6OM0gb5wfNepzyWkzTYfx1zcAnU=; b=hgCavq/2oS6XfA+ImlGLWhKda8UIrqmZ+KwyrFN3Y4SmnZYQ//vCOiUwK+XU4S+hLp mzAaiF4+byoU54RaUQzrA/zHZT6+yfSer10CsPuONMIbVxyTRm/1D2RhGZk5YJLbc7w7 FCW6cubJVCktqTp6zDEsTkZqWVd00WDNAJAOk7sWM8V28Ih+69+ihxrXhvqSAtOuzrj2 PqVi415jUAn7g9YRDMZ4Kx7uT/sjHpYDfokZOnzCM1plqB4ZWyw1FOgmIMqKfbh8Mn/E 9KD3I9f7JEJ4s0fYXOvN4ClvKAcJYjAZv+zLIsDRjjxpInWZm/c5lsrFGdbFdMyLHOrl hw0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jHrjB2rGSdOE0OCx6OM0gb5wfNepzyWkzTYfx1zcAnU=; b=AT04iGoGEIcZg5+fUe18Ov+KboFvq6aD5QOWtagQmW5xl0RbPHEDe4y1KdfPVp49Oj TtB2wPnkDIGSClP/YnaRWsh61kYrUryUqqAZ8vElZqfMf9Yrj4/QWh1j2XIlatkEmx5+ iky4S67VuYEG5XMqPN+Q9xKE+lMvtAEkSZ1jYjIG+TYrSmldpXh7mRjIr7K/e7Fde9fN eB54g+OvXc00x5XDlaFiWGAGrIk5DNJGLddglVlPUfUcqte7ZkvnmW8CWXEXYMflyf5t xyZ5WEJJRQNwL8XJ3YXVbS61HCvI/9xe/S/c9/jNISbw75L3RrK8yg+12LGRESOm4OQX GyiA== X-Gm-Message-State: AOAM530GKbZx9kq9LljuPclTJwy+nX39Jy15KDQ1RZLn0CKvC9rLJpIU O90+MG8ZvBNa7FRkk473JbWGU7PvqGYvef48riA= X-Google-Smtp-Source: ABdhPJwCymQYeKfPZQyA5MmqSeugjMNVOTtrSBxkT+Z/Py2jLG9OKRRzGKM+7GpkwNaUO1xTw+PEEscq4jVrLRf6VT4= X-Received: by 2002:a9d:2282:: with SMTP id y2mr3263635ota.124.1603410326601; Thu, 22 Oct 2020 16:45:26 -0700 (PDT) MIME-Version: 1.0 References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: From: Andrew Eggenberger Date: Thu, 22 Oct 2020 18:45:15 -0500 Message-ID: Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error in gccemacs To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000f2425605b24b0e6f" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000f2425605b24b0e6f Content-Type: text/plain; charset="UTF-8" Thanks all. It looks like the socket verification logic changes in Commit 3e5d7755454bea9b6ffd232b1d115c629cdb193d. I realized my other version where it works was 26.3, before that change. I think my problem might be hurd-specific, but I'll have to do some more digging. Andrew --000000000000f2425605b24b0e6f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks all. It looks like the socket veri= fication logic changes in=C2=A0Commit 3e5d7755454bea9b6ffd232b1d115c629cdb1= 93d. I realized my other version where it works was 26.3, before that chang= e. I think my problem might be hurd-specific, but I'll have to do some = more digging.

Andrew
--000000000000f2425605b24b0e6f-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 19:46:38 2020 Received: (at 44131) by debbugs.gnu.org; 22 Oct 2020 23:46:38 +0000 Received: from localhost ([127.0.0.1]:54192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVkI2-0007az-CC for submit@debbugs.gnu.org; Thu, 22 Oct 2020 19:46:38 -0400 Received: from mail-oi1-f172.google.com ([209.85.167.172]:39168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVkI1-0007am-3l for 44131@debbugs.gnu.org; Thu, 22 Oct 2020 19:46:37 -0400 Received: by mail-oi1-f172.google.com with SMTP id u127so3830668oib.6 for <44131@debbugs.gnu.org>; Thu, 22 Oct 2020 16:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g52RH1xm36KDwRz8dx0nEVNK5mcmK47vVms35B4NlHM=; b=khlkEKtjvxHT4JxtznpdGfqPFbtYDylEd5arLNi3b+wWULtwkdOjyq0qD/JUqbZsfT b3KSkuElmj7vJ8XSf7y0DUPev1dystRhw1w2TPt/1a3AP2O2QvhFrzxCo3jrfYar8WUb PUgsHmK0YOdCB4LVvjjOcefW7FqI1H4O/c/Nedk7O41iyFpinWrh08Y8j1udHil+VqhQ WNG0AKoy6stfX/uxxpaFHCQj/gKtYPKks60RcHd+GF48AL0nRoiCd3bo83Q3wcnRayJb Qaje5lK5rN6Qwp0szJo8FSXcQDfkl9sPYRsqZXmRgPD6VAnDhynyfeU7DWGSwKVc979i fBkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g52RH1xm36KDwRz8dx0nEVNK5mcmK47vVms35B4NlHM=; b=W3lf4lsXZgKxebcJpeDDPOeINYNOF5G7fsKdRviINfTUThfSq5U1tBUe4TUAnN5oBc RnHDGAR194OgSWhAIAdzMq7wKoYTuPJ3D+xJUBK2ioPaWT0JaMiaaf/AV3E4r2HCCf4E EgrbPesiW6bDl0RgIIPEOCcbgQGZzybOv+K01dYieIVaS2mX9QFFlF01cxGg7EjNE9mO iTXZIxf9uUKC5AA0bJoKJVi7mveSwT4tdvebIvE1ls3OgXgUBB+fKVEjxAB/aTa699cY thU8Gk+wsUV1lcOb2cmk5OlSOLAyCKuMC+v8hzN60u6XnqrWx1w2FPn6NUeMdu9yy0iI nPKQ== X-Gm-Message-State: AOAM533DxBk2F2kMTCUG3D1SgP20n8+enulbg5B5YRc//fTw0pY566f4 e3yvdQ5iatCBuJNm3UUt9D4k/h1kAhQOXhVoFS0= X-Google-Smtp-Source: ABdhPJx/ISuBmhpPi2PeiQ5vhPXPwkVqTp5NpoHB62fgKylrOKL7r6aZKqLzv6uLliV17o49sbcj3zN7Xaa1N4EBxGQ= X-Received: by 2002:aca:b141:: with SMTP id a62mr2481842oif.101.1603410391470; Thu, 22 Oct 2020 16:46:31 -0700 (PDT) MIME-Version: 1.0 References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: From: Andrew Eggenberger Date: Thu, 22 Oct 2020 18:46:20 -0500 Message-ID: Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error in gccemacs To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000d018ba05b24b12a8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000d018ba05b24b12a8 Content-Type: text/plain; charset="UTF-8" Sorry, and to answer your question: the problem was still there when I compiled 28 master. > --000000000000d018ba05b24b12a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry, and to answer your question: the problem was s= till there when I compiled 28 master.
--000000000000d018ba05b24b12a8-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 02:40:35 2020 Received: (at request) by debbugs.gnu.org; 23 Oct 2020 06:40:35 +0000 Received: from localhost ([127.0.0.1]:54654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVqkc-0003Uj-V3 for submit@debbugs.gnu.org; Fri, 23 Oct 2020 02:40:35 -0400 Received: from mab.sdf.org ([205.166.94.33]:48732 helo=ma.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVqkb-0003Ub-3z for request@debbugs.gnu.org; Fri, 23 Oct 2020 02:40:33 -0400 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1kVqkZ-0002t1-IB for request@debbugs.gnu.org; Fri, 23 Oct 2020 06:40:31 +0000 From: Andrea Corallo To: request@debbugs.gnu.org Subject: bug#44131 Date: Fri, 23 Oct 2020 06:40:31 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: request X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) retitle 44131 28.0.50; emacsclient Invalid socket owner error stop From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 02:48:06 2020 Received: (at 44131) by debbugs.gnu.org; 23 Oct 2020 06:48:07 +0000 Received: from localhost ([127.0.0.1]:54661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVqru-0005mo-ML for submit@debbugs.gnu.org; Fri, 23 Oct 2020 02:48:06 -0400 Received: from mab.sdf.org ([205.166.94.33]:52424 helo=ma.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVqrt-0005me-7O for 44131@debbugs.gnu.org; Fri, 23 Oct 2020 02:48:05 -0400 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1kVqrr-0005xd-LZ; Fri, 23 Oct 2020 06:48:03 +0000 From: Andrea Corallo To: Andrew Eggenberger Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> Date: Fri, 23 Oct 2020 06:48:03 +0000 In-Reply-To: (Andrew Eggenberger's message of "Thu, 22 Oct 2020 18:46:20 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrew Eggenberger writes: > Sorry, and to answer your question: the problem was still there when I compiled 28 master. Hi Andrew, thanks for checking, I've re-titled to bug. Let us know if you discover it's hurd specific we can narrow it down further. Thanks Andrea From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 01 20:25:00 2020 Received: (at 44131) by debbugs.gnu.org; 2 Nov 2020 01:25:00 +0000 Received: from localhost ([127.0.0.1]:39076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZOai-0006Lt-Ip for submit@debbugs.gnu.org; Sun, 01 Nov 2020 20:25:00 -0500 Received: from mail-ot1-f53.google.com ([209.85.210.53]:43119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZOag-0006Le-E0 for 44131@debbugs.gnu.org; Sun, 01 Nov 2020 20:24:59 -0500 Received: by mail-ot1-f53.google.com with SMTP id y22so662476oti.10 for <44131@debbugs.gnu.org>; Sun, 01 Nov 2020 17:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=78MOsSIlS9/gxoZ1IXTgWfEBI4RKWDbCQRaB0J8r3ew=; b=BsCw/3o3eleqZ6yIx+V9nwbtu0TzFPLFQOVDxcxpPDSD7kPLxCBylYP7rb2HuyIaOl 9/AR6+Pvrgj+T9ORpKRuzPZoCSsBZ3oMSosjvHEBvB8vMCDVj+IM/2RaByeCoxwq0Sn0 Joirk8CpOUOh2CEA5u1nOmiv+NQRdyEenP44trWhPcBJW4PFD3uH2Wl+IBToPF7qL9kR PeUxb/XTAtWbR84A67kmR9SFgN6QMZitBg3F4ehmJmRYkrnozZMw3YPSH0593NNEvw8k 1oIzydS2MT7rN2RKb2b/1HAn0pK34kJ/iApwdMm1mTND7YjlBO4MWB3BilFfVQQT//kl jHvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=78MOsSIlS9/gxoZ1IXTgWfEBI4RKWDbCQRaB0J8r3ew=; b=amY1dep/62xqzsZM8UlLFSb52/XhgQazbVcFPA5TvN3jzHRRat3U6jcbdLdsTetEXU 2VQVc5/A+aLb79Uza1azQA1+nJzbM4phx8GqYUqqnAfi4zl47pBX4DdswgSGEcLd0av5 3hnLxMzX5sItZnOxp21AnyDh2JWi5pSbq0abjxON0bs7YSuVBEt2MVSFm2sJJcByy09L EHhtdG36fl2/KfVDKd+TQzsbOtTod/+dEuiKcbZgPCDi6uZZMZdfiIBaqoS8gq0bDzgg YwgbeViebcjkulR+48QFT4tH3qNHEpbV5qr99HoQo29EAQlgWSGlUYVKSPivlz2irkKM GxrQ== X-Gm-Message-State: AOAM533m4ncSUSdF0bAsXmR8FE6B3Wf9bpYE4cPwhlxCHF/WJ74HQItx 0TY87R2U3bofraPzvLEP+A3sPQ8mPtdjMygqSUo= X-Google-Smtp-Source: ABdhPJysr6f37hS06M3NoppSPUP6jzhJtf/Ty0OpLqvCAUsyyDsSx2iKixyn/FQlZexor+/VzDcEhYRDgdZi5uUzn2M= X-Received: by 2002:a05:6830:1c62:: with SMTP id s2mr9717223otg.177.1604280292860; Sun, 01 Nov 2020 17:24:52 -0800 (PST) MIME-Version: 1.0 References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: From: Andrew Eggenberger Date: Sun, 1 Nov 2020 19:24:42 -0600 Message-ID: Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000f9e6ea05b3159c6b" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000f9e6ea05b3159c6b Content-Type: text/plain; charset="UTF-8" Hi, The problem seems to stem from the way the hurd treats fstat calls on local socket file descriptors. They all have the uid of 0 (root), while emacsclient can be run by other users. After trying to teach the hurd's local socket server to use the uid of the user who requested the socket and failing, I created the naive patch below that fixes the problem. Please let me know if there's a better solution. I git blamed the changes that led to this issue and I don't understand the race condition the uid comparison is supposed prevent. Andrew Eggenberger diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 871fa7a8d3..6059993ff6 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1480,8 +1480,13 @@ set_local_socket (char const *server_name) sock_status = errno; else if (connect_stat.st_uid == uid) return s; +#ifdef __GNU__ + else + return s; +#else else sock_status = -1; +#endif CLOSE_SOCKET (s); } --000000000000f9e6ea05b3159c6b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

The pro= blem seems to stem from the way the hurd treats fstat calls on local socket=
file descriptors. They all have the uid of 0 (root), while emacs= client can be run by=C2=A0
other users. After trying to teach the= hurd's local socket server to use the uid of=C2=A0
the user = who requested the socket and failing, I created the naive patch below that<= /div>
fixes the problem.

Please let me know if= there's a better solution. I git blamed the changes that led to this
issue and I don't understand the race condition the uid compar= ison is supposed prevent.

Andrew Eggenberger
=

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclien= t.c
index 871fa7a8d3..6059993ff6 100644
--- a/lib-src/e= macsclient.c
+++ b/lib-src/emacsclient.c
@@ -1480,8 +14= 80,13 @@ set_local_socket (char const *server_name)
=C2=A0 =C2=A0= =C2=A0 =C2=A0 sock_status =3D errno;
=C2=A0 =C2=A0 =C2=A0 =C2=A0= else if (connect_stat.st_uid =3D=3D uid)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 return s;
+#ifdef __GNU__
+ =C2=A0 =C2=A0 =C2=A0els= e
+ =C2=A0 =C2=A0 =C2=A0 return s;
+#else
=C2= =A0 =C2=A0 =C2=A0 =C2=A0else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 sock_sta= tus =3D -1;
+#endif

=C2=A0 =C2=A0 =C2=A0= =C2=A0CLOSE_SOCKET (s);
=C2=A0 =C2=A0 =C2=A0}
--000000000000f9e6ea05b3159c6b-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 07 03:47:44 2020 Received: (at 44131) by debbugs.gnu.org; 7 Nov 2020 08:47:44 +0000 Received: from localhost ([127.0.0.1]:57920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbJst-0005CT-Na for submit@debbugs.gnu.org; Sat, 07 Nov 2020 03:47:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbJss-0005CG-2H for 44131@debbugs.gnu.org; Sat, 07 Nov 2020 03:47:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55281) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbJsk-0001yg-Vm; Sat, 07 Nov 2020 03:47:34 -0500 Received: from [176.228.60.248] (port=3004 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kbJsk-0007UV-BG; Sat, 07 Nov 2020 03:47:34 -0500 Date: Sat, 07 Nov 2020 10:47:35 +0200 Message-Id: <83pn4p7dug.fsf@gnu.org> From: Eli Zaretskii To: Andrew Eggenberger , Paul Eggert In-Reply-To: (message from Andrew Eggenberger on Sun, 1 Nov 2020 19:24:42 -0600) Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44131 Cc: 44131@debbugs.gnu.org, akrl@sdf.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andrew Eggenberger > Date: Sun, 1 Nov 2020 19:24:42 -0600 > Cc: 44131@debbugs.gnu.org > > The problem seems to stem from the way the hurd treats fstat calls on local socket > file descriptors. They all have the uid of 0 (root), while emacsclient can be run by > other users. After trying to teach the hurd's local socket server to use the uid of > the user who requested the socket and failing, I created the naive patch below that > fixes the problem. > > Please let me know if there's a better solution. I git blamed the changes that led to this > issue and I don't understand the race condition the uid comparison is supposed prevent. > > Andrew Eggenberger > > diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c > index 871fa7a8d3..6059993ff6 100644 > --- a/lib-src/emacsclient.c > +++ b/lib-src/emacsclient.c > @@ -1480,8 +1480,13 @@ set_local_socket (char const *server_name) > sock_status = errno; > else if (connect_stat.st_uid == uid) > return s; > +#ifdef __GNU__ > + else > + return s; > +#else > else > sock_status = -1; > +#endif > > CLOSE_SOCKET (s); > } Paul, any better ideas? Or should I push this fix? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 10 22:31:13 2020 Received: (at 44131) by debbugs.gnu.org; 11 Nov 2020 03:31:13 +0000 Received: from localhost ([127.0.0.1]:39689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcgqn-0000t7-FL for submit@debbugs.gnu.org; Tue, 10 Nov 2020 22:31:13 -0500 Received: from mail-ot1-f43.google.com ([209.85.210.43]:42677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcgqm-0000ss-IZ for 44131@debbugs.gnu.org; Tue, 10 Nov 2020 22:31:12 -0500 Received: by mail-ot1-f43.google.com with SMTP id 30so869586otx.9 for <44131@debbugs.gnu.org>; Tue, 10 Nov 2020 19:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m6QQ3JAHbcEF+wlYOcKhJyZMiIW5RWVNBeUZplZH8xI=; b=WxpiFSdB4QElXtwaD6YeV7qc7kaRqsmKkHJmFGxvCG2Wr8NMleQufo+cuC1eu5yq90 XnSoaueH+b+NLIFUEyr5pt0vp+1KPqf62ATJZKZKb55HWXOLYFT0Wx4/cnOeRhE9lzME Z7BjMvB9nnsAXh1tgsoMGhLNK2v8cVS6xUTv1cBz4R2IzSfNp4cQ/iqx5VbVUUMHwhP2 a09trBgvXWchd/CZ09llV0na0tXPavPzJtpChvg5pOTovCW0pGVftfne6U0x1Do+gzPp LxiulDiRGN3YKabspZZXMM5M2xSw4ec0XrgN8kcSxP7oBEsJVMZED23ZbHJ+Au8zSoAp 6dMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m6QQ3JAHbcEF+wlYOcKhJyZMiIW5RWVNBeUZplZH8xI=; b=c74Wyxlw9OSJAjz2rQxB44zR0W/Jee4tZ92lssZTeqT7cmLpdecTNlTc/Mr2FR+fVV xDR2N0j0zHXzDV9S9DgVA4nPTJpkSaOj/jpvcuVBKR71vTJf6m1A4qBwM6xt/4orlnPL yopiNsDbyGOsSN7cI86qIKxFqK50cxyMdJqpZRNDFs0V3Fd5MhGU+6W2Cuno94aINsUn lpZLfeWHegHGHEVsmlAvmsu8Jf76OTMqscQvQu4DHKglCfGejF30gxUCX3dzDd+/imhM ElfsIHuGBc1jiw86DWe4DhUCq0/piomuc6x1VIVKZ487f8i1HikGLwRZ971VRiJlZj0K eyjQ== X-Gm-Message-State: AOAM5325rfC5MK5R3+Xc7uBBw103r8gINS51YWlbYzXWKQIwf0h2JIIC QB9Fn82gTa/peqVggLu3/zmJTEFlZA3Wvzm+H38= X-Google-Smtp-Source: ABdhPJwyZrhcfE3DYftzN7FaJMxHr3pCUDH9x64QSeDagV54hWM6v8IW5LqcXWizW+clVxjYt3ppNk30WSoSEde131U= X-Received: by 2002:a9d:2282:: with SMTP id y2mr15076966ota.124.1605065466948; Tue, 10 Nov 2020 19:31:06 -0800 (PST) MIME-Version: 1.0 References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> <83pn4p7dug.fsf@gnu.org> In-Reply-To: <83pn4p7dug.fsf@gnu.org> From: Andrew Eggenberger Date: Tue, 10 Nov 2020 21:30:56 -0600 Message-ID: Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000ffb0c405b3cc6c80" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: Paul Eggert , 44131@debbugs.gnu.org, Andrea Corallo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000ffb0c405b3cc6c80 Content-Type: text/plain; charset="UTF-8" Hi Eli, I've just submitted a patch to the hurd mailing list that resolves the issue without any changes to emacsclient. I think we can close this issue. Thanks Andrew --000000000000ffb0c405b3cc6c80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eli,

I've just submitted a patch= to the hurd mailing list that resolves the issue without any
cha= nges to emacsclient. I think we can close this issue.

<= div>Thanks
Andrew
--000000000000ffb0c405b3cc6c80-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 11 04:44:37 2020 Received: (at 44131) by debbugs.gnu.org; 11 Nov 2020 09:44:37 +0000 Received: from localhost ([127.0.0.1]:40245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcmg9-0006Cl-Eh for submit@debbugs.gnu.org; Wed, 11 Nov 2020 04:44:37 -0500 Received: from quimby.gnus.org ([95.216.78.240]:35420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcmg7-0006CX-KE for 44131@debbugs.gnu.org; Wed, 11 Nov 2020 04:44:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kQ3L6BdzCFuD0p3R1MM8oXzWriZAs5KvNmjf9I2CzsQ=; b=RY69+ceLcoCLq7SGV9yvZFal2z 45jjTP54uFeok9XRttNsuGTiJIiXbsTFpJkYPOYdOM0gOLhlaT/5v5orAstuI4U6CCOL8JSf8c0xe E/2vOH0WbCI3b3mlx8WXVmFGOakPH+RqfAELl3VyBSoThv6FK4V6r3ZMSYH0d7gOrl9o=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcmfw-0008Ja-7h; Wed, 11 Nov 2020 10:44:27 +0100 From: Lars Ingebrigtsen To: Andrew Eggenberger Subject: Re: bug#44131: 28.0.50; emacsclient Invalid socket owner error References: <871rhqsoln.fsf@debian.i-did-not-set--mail-host-address--so-tickle-me> <83pn4p7dug.fsf@gnu.org> X-Now-Playing: =?utf-8?B?UsOzaXPDrW4=?= Murphy's _The Rumble_: "World's Crazy" Date: Wed, 11 Nov 2020 10:44:22 +0100 In-Reply-To: (Andrew Eggenberger's message of "Tue, 10 Nov 2020 21:30:56 -0600") Message-ID: <87h7pwdy89.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Andrew Eggenberger writes: > I've just submitted a patch to the hurd mailing list that resolves the > issue without any changes to emacsclient. I think we can close this > issue. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44131 Cc: Eli Zaretskii , Paul Eggert , 44131@debbugs.gnu.org, Andrea Corallo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrew Eggenberger writes: > I've just submitted a patch to the hurd mailing list that resolves the > issue without any changes to emacsclient. I think we can close this > issue. OK; done. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 11 04:44:43 2020 Received: (at control) by debbugs.gnu.org; 11 Nov 2020 09:44:44 +0000 Received: from localhost ([127.0.0.1]:40248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcmgF-0006D3-Ol for submit@debbugs.gnu.org; Wed, 11 Nov 2020 04:44:43 -0500 Received: from quimby.gnus.org ([95.216.78.240]:35436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcmgE-0006Ck-Gw for control@debbugs.gnu.org; Wed, 11 Nov 2020 04:44:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RQlJWIwyw/jTyJviLoVg0c2v2m1qFpJMlXkgt8CuGq4=; b=mVPg/3lOdzhRbuRqUmd9uUo2K4 Y4Bp720wOHexr5FC5rT7ttvwwBlcQI9dFtKdJb03Bp9VmBiO2XxEZsfuDdM7N6oorFuptF8+vEgwu OCTx5mfLMEVbwLwZAcCwd7ra9Knh77Nt6wQl8/Y1GWbq6X8NT2rAuIIxEkWL738rK96E=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcmg6-0008Jm-Of for control@debbugs.gnu.org; Wed, 11 Nov 2020 10:44:36 +0100 Date: Wed, 11 Nov 2020 10:44:33 +0100 Message-Id: <87ft5gdy7y.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #44131 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 44131 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 44131 quit From unknown Sun Aug 17 04:17:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 09 Dec 2020 12:24:06 +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