[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#905129: marked as done (im-config: Wrongly run shell scripts with user's shell interpreter, raises error with zsh)



Your message dated Wed, 01 Aug 2018 14:50:28 +0000
with message-id <E1fksSK-0005HY-TK@fasolo.debian.org>
and subject line Bug#905129: fixed in im-config 0.36-1
has caused the Debian Bug report #905129,
regarding im-config: Wrongly run shell scripts with user's shell interpreter, raises error with zsh
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
905129: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905129
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: im-config
Severity: important
Version: 0.30-1
X-Debbugs-CC: osamu@debian.org

Hi Osamu and debian-input-method team members,

TL;DR: file /etc/X11/Xsession.d/70im-config_launch is *not* called by /bin/sh,
as written in shabang; it is called by user's shell interpreter
instead, which may
result in unexpected outcome when user's default shell is neither
/bin/dash nor /bin/bash.

How to confirm that 70im-config_launch is not using "/bin/sh"
================================================

1. Add a single line at l13:
    logger "im-config: WARNING: Currently the shell is ${SHELL}..."
2. Reboot, login and examine syslog. ${SHELL} is replaced by user
shell interpreter. If the user is using zsh, it will show "/usr/bin/zsh", which
is highly undesired.

Zsh-incompatible shell grammar in im-config shell snippet
==============================================

In file /usr/share/im-config/data/21_ibus.rc:

GTK_IM_MODULE=xim
# use immodule only when available for both GTK 2.0 and 3.0
IM_CONFIG_MARKER2=0
for IM_CONFIG_MARKER in /usr/lib/*/gtk-2.0/*/immodules/im-ibus.so \
                        /usr/lib/gtk-2.0/*/immodules/im-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        IM_CONFIG_MARKER2=1
        break
    fi
done

Zsh does not accept the for statement, since on current unstable system
/usr/lib/gtk-2.0/*/immodules/im-ibus.so matches nothing. Zsh would fail here
while Bash and dash ignore the unmatched string.

Solution
=======

While the zsh-incompatible grammar can be fixed (perhaps with a thorough
examination of all im-config source code), the problem that
Xsession.d scripts are executed by user shell interpreter is a big problem
and should receive further examination.

--
Regards,
Boyuan Yang

--- End Message ---
--- Begin Message ---
Source: im-config
Source-Version: 0.36-1

We believe that the bug you reported is fixed in the latest version of
im-config, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 905129@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Osamu Aoki <osamu@debian.org> (supplier of updated im-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 01 Aug 2018 22:51:23 +0900
Source: im-config
Binary: im-config
Architecture: source all
Version: 0.36-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Input Method Team <debian-input-method@lists.debian.org>
Changed-By: Osamu Aoki <osamu@debian.org>
Description:
 im-config  - Input method configuration framework
Closes: 905129
Changes:
 im-config (0.36-1) unstable; urgency=medium
 .
   [ Boyuan Yang ]
   * Make code compatible with zsh.  Closes: #905129
   * Update package requirement for fcitx.
   * Update zh_CN translation.
Checksums-Sha1:
 24ac68b65851a3e6dfc9d82066e8bd59b2df2f38 1864 im-config_0.36-1.dsc
 cfefa4efb71174a5c5f77984d3e12ac26e375084 44528 im-config_0.36.orig.tar.xz
 55d72a26dffba3bc3f4c47b631f63dedbb0d2454 8048 im-config_0.36-1.debian.tar.xz
 00f69af87209209d57e43b29ff35cda46a893cc9 53112 im-config_0.36-1_all.deb
 68235fc26dd853beb357d58619a6fcf637686553 5529 im-config_0.36-1_amd64.buildinfo
Checksums-Sha256:
 802276b22385a538a5ce23d9ca3e8606f31753303213617791fe903f6fd27f5e 1864 im-config_0.36-1.dsc
 8739d91988f0140f20c5afb65a5f8b900a3d3ec2e636e17bcb4aff0db4f59258 44528 im-config_0.36.orig.tar.xz
 05509054d8893e569ceba694c5d0d0d5e4b1e9b9dabe5c2b1991e56adc162383 8048 im-config_0.36-1.debian.tar.xz
 6a15a8890273042f37cd5e7fe4fdbbd59bb4517f6cb69700845aff26ad2522c6 53112 im-config_0.36-1_all.deb
 86a6405f3fa497ba01bad5223df486cb64de4598f8fb9ac487d332d21de2683e 5529 im-config_0.36-1_amd64.buildinfo
Files:
 e3d1bf6eb09619369ed24c98bdd7152c 1864 x11 optional im-config_0.36-1.dsc
 5cd15d14acc6842f349975daddd5edcc 44528 x11 optional im-config_0.36.orig.tar.xz
 0a19a3ed75f483b8d515ab65afed929b 8048 x11 optional im-config_0.36-1.debian.tar.xz
 1f76561ccd71bb20266a6e2e8c951ce2 53112 x11 optional im-config_0.36-1_all.deb
 c27a73f52ca4242c0b35750124cfad42 5529 x11 optional im-config_0.36-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEMTNyTWIHiBV56V1iHhNWiB3Y15EFAlthvNYACgkQHhNWiB3Y
15Fe9w/9HbfdpDHwp+lQ0fZiIa2rmFThbVzX+4rCsgzpBAfX6brx3zTSLs/n+lkM
wL3yRB+qwR3QrizkiLSFd08wu/6nicHwAZTe/2GBcWgpXD+9cEy8Tu+FwGZOlVy2
RSPEJp0qBK1xuzXwd3ONsM/8Zu54m5aCm6tj06uFmx8cCK4HK+5VW8bz+bT4xiKU
p06Zr/hG4vLCnOK2swApmNdw48YQVCVvWUagR0qQmhr8C+9+2E6LGI9SMLAe5y2m
1JtwD6Kk2bGc6fj/Dj1Ob6q6pA424o+v/rD9g4VUyJiCc+jU+EJYVmDi200sI0N/
AIJyBdWNVlUsbBOtGCeYIK0apX6H0ecfpG/Cz+Yi+xZ3yR8e/jepgng2z7EHrikV
y8BYpAPmIksUhGt6uu9YgD7ai3mg4zzfmcPJEl/bwA+oF9HORd6hsQ1v3I4n9EX9
OD/JxazSMag7crRZuVGRfnks8Ltlh+UcTmhgLU42ddxgtLQKVCQb51hjJEehnE0i
KFis8URW/iN9UEWsb6sbZfvS7xmikSC2o9qlNrn5qenJWAzWOk0C1DpYr9rjwBS2
4Y8LUzw2YGPyeFXzlbFe4FCyAeU1JO96HhGE4Xel4PYDIbFt5pbFgLYqENREM9Zf
GO0KKwJjxFXpHjLUi1930aZcWEvtWYxzFAZnAldj1TN0iC06eb8=
=f0Oj
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: