GNU bug report logs -
#19191
24.4; su command in *shell* buffer does not work
Previous Next
Reported by: 白井彰 <okshirai <at> gmail.com>
Date: Wed, 26 Nov 2014 10:02:02 UTC
Severity: normal
Merged with 19927,
20555,
20686
Found in versions 24.4, 24.4.90
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
"su: Sorry" also occurs on Emacs 24.5.
% gzcat emacs-24.3.tar.gz | tar xfp -
% (cd emacs-24.3; ./configure --with-jpeg=no --with-gif=no; make)
% gzcat emacs-24.5.tar.gz | tar xfp -
% (cd emacs-24.5; ./configure --with-jpeg=no --with-gif=no; make)
% grep '#.*PTY' emacs-24.3/src/config.h > /tmp/config.h_PTY_emacs-24.3
% grep '#.*PTY' emacs-24.5/src/config.h > /tmp/config.h_PTY_emacs-24.5
% diff /tmp/config.h_PTY_emacs-24.3 /tmp/config.h_PTY_emacs-24.5
9c9
< #define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }
---
> #define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, "%s", ptyname); }
% cat /tmp/config.h_PTY_emacs-24.3 | grep PTY_TTY_NAME_SPRINTF | sed 's/#define//' | indent -st > /tmp/config.h_PTY_emacs-24.3_indent-st
% cat /tmp/config.h_PTY_emacs-24.5 | grep PTY_TTY_NAME_SPRINTF | sed 's/#define//' | indent -st > /tmp/config.h_PTY_emacs-24.5_indent-st
% diff /tmp/config.h_PTY_emacs-24.3_indent-st /tmp/config.h_PTY_emacs-24.5_indent-st
6c6
< sigaddset(&blocked, SIGCLD);
---
> sigaddset(&blocked, SIGCHLD);
13c13
< } snprintf(pty_name, sizeof pty_name, "%s", ptyname);
---
> } snprintf(pty_name, PTY_NAME_SIZE, "%s", ptyname);
% (cd emacs-24.5/src; ./emacs -Q)
M-x shell
Warning: no access to tty; thus no job control in this shell...
% su
su: Sorry
%
=> su command in *shell* buffer does not work.
su does not ask for the password and exits with "su: Sorry".
This bug report was last modified 9 years and 351 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.