Bug 24738

Summary: Add support for GNU/Hurd
Product: ConsoleKit Reporter: Michael Biebl <mbiebl>
Component: DaemonAssignee: william.jon.mccann
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium CC: toscano.pino
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552393
Whiteboard:
i915 platform: i915 features:
Attachments: GNU/Hurd support
GNU sysdeps backend
Fix unconditional PATH_MAX usage

Description Michael Biebl 2009-10-26 10:00:40 UTC
Created attachment 30701 [details] [review]
GNU/Hurd support

currently consolekit fails to build on GNU/Hurd mainly becase there's no sysdeps
backend for the GNU OS implemented. Also there is a unconditional PATH_MAX
usage.

The attached patch proposes a sysdeps-gnu backend, which implements the process
management using Hurd's libps, the *ttyent API for the part of the console
implementation and the rest using similar (valid) approaches of other backends.
Also, it fixes the PATH_MAX usage in pam-ck-connector/pam-ck-connector.c by
using a variable-length malloc'ed buffer.

The patch is by  Pino Toscano <pino@kde.org>
Comment 1 Pino Toscano 2010-05-29 06:52:27 UTC
Any news?
Note I have an account on freedesktop, so in case I could be added to the project and maintaining the proposed platform stuff.
Comment 2 Lennart Poettering 2010-09-19 15:21:47 UTC
Hmm, in the PAM module you *must* check the return value of malloc(). PAM stuff is security relevant, and this looks like a vulnerability if the user somehow manages to trigger an OOM.
Comment 3 Pino Toscano 2010-09-19 15:48:47 UTC
(In reply to comment #2)
> Hmm, in the PAM module you *must* check the return value of malloc(). PAM stuff
> is security relevant, and this looks like a vulnerability if the user somehow
> manages to trigger an OOM.

Good point, I'll fix that shortly and update the patch (which needs the implementation of a new function in sysdeps, recently added in HEAD).
Comment 4 Pino Toscano 2010-09-20 08:58:26 UTC
Created attachment 38819 [details] [review]
GNU sysdeps backend

This patch provides a first implementation of sysdeps backend for GNU/Hurd.
It is updated to ConsoleKit 0.4.2.
Comment 5 Pino Toscano 2010-09-20 08:59:53 UTC
Created attachment 38820 [details] [review]
Fix unconditional PATH_MAX usage

This patch uses a custom malloc'ed buffer instead of a PATH_MAX fixed one, given that PATH_MAX is not mandatory in POSIX and not implemented in GNU/Hurd.
Comment 6 Michael Biebl 2012-03-19 08:50:47 UTC
Committed as
e722b11a8240991b57bc4f5269c4f375fb6d29af and 4d06b16b69f8e9323ce128c92db4bb3e99cbd3aa

Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.