Subject: Bug#1458: [X2Go-Dev] Bug#1458: unattended Debian installations (using preseed) fail when x2gobroker-ssh is involved

From: Ulrich Sibiller <[email-masked]>
Date: Fri, 17 Apr 2020 16:24:57 +0200

I think it is a totally wrong approach to fiddle with nscd. Creating a
group using system tools should take of that already. If not it's a
bug, I'd say.

Besides: what about sssd that can also cache groups?

On Fri, Apr 17, 2020 at 4:11 PM Stefan Baur <[email-masked]> wrote:
>
> package: x2gobroker-ssh
> version 0.0.4.1
> severity: important
>
> The postinst file for x2gobroker-ssh contains a check to see if the nscd
> binary is somewhere in the path.  If it is, then nscd -i group is
> called, to purge the group cache (which makes sense, as a new group has
> been added in a previous step, so the cached information is outdated).
> If it is not, then it is assumed that nscd is not installed, thus, no
> group information is cached, and thus, no purge is needed.
>
> This fails to take into account that nscd might be (freshly) installed,
> but not running.  Which is the case during a preseeded Debian
> installation (and probably when running debootstrap as well).
>
> The result is that "nscd -i group" is called even though nscd isn't
> active at the moment.
>
> Which triggers a return code of "1".
>
> Which in turn causes the postinst script to report "1" as its return code.
>
> This, of course, gets passed back up to the debian-installer, which
> decides to abort the installation, as it seems that something went wrong
> during installation of the package.
>
> The patch is rather simple: Instead of checking for the presence of the
> executable in the file system, check if it is currently running:
>
> -                                        if which nscd 1>/dev/null; then
> +                                        if ps -C nscd 1>/dev/null; then
>
> As this is currently breaking all automated x2gobroker-ssh installs, I
> would suggest releasing a new version containing only this patch ASAP,
> if a full release with all changes since the last proper release of
> x2gobroker-ssh would bring too many changes at once for a timely release.
>
> Kind Regards,
> Stefan Baur
>
> --
> BAUR-ITCS UG (haftungsbeschränkt)
> Geschäftsführer: Stefan Baur
> Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
> Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
> _______________________________________________
> x2go-dev mailing list
> [email-masked]
> https://lists.x2go.org/listinfo/x2go-dev